15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright 2014 The Chromium Authors. All rights reserved.
25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Use of this source code is governed by a BSD-style license that can be
35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// found in the LICENSE file.
45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef CHROME_BROWSER_ANDROID_PROFILES_PROFILE_DOWNLOADER_ANDROID_H_
65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define CHROME_BROWSER_ANDROID_PROFILES_PROFILE_DOWNLOADER_ANDROID_H_
75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include <jni.h>
95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include <string>
115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "base/strings/string16.h"
135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class SkBitmap;
155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Android wrapper of the ProfileDownloader which provides access from the Java
175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// layer. This class should only be accessed from the UI thread.
185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)class ProfileDownloaderAndroid {
195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) public:
205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  // Registers the ProfileDownloaderAndroid's native methods through JNI.
215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  static bool Register(JNIEnv* env);
225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  static void OnProfileDownloadSuccess(
245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const std::string& account_id_,
255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const base::string16& full_name,
265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)      const SkBitmap& bitmap);
275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) private:
295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)  DISALLOW_COPY_AND_ASSIGN(ProfileDownloaderAndroid);
305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)};
315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)
325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif  // CHROME_BROWSER_ANDROID_PROFILES_PROFILE_DOWNLOADER_ANDROID_H_
33