Home | History | Annotate | Download | only in profiles
      1 // Copyright 2014 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CHROME_BROWSER_ANDROID_PROFILES_PROFILE_DOWNLOADER_ANDROID_H_
      6 #define CHROME_BROWSER_ANDROID_PROFILES_PROFILE_DOWNLOADER_ANDROID_H_
      7 
      8 #include <jni.h>
      9 
     10 #include <string>
     11 
     12 #include "base/strings/string16.h"
     13 
     14 class SkBitmap;
     15 
     16 // Android wrapper of the ProfileDownloader which provides access from the Java
     17 // layer. This class should only be accessed from the UI thread.
     18 class ProfileDownloaderAndroid {
     19  public:
     20   // Registers the ProfileDownloaderAndroid's native methods through JNI.
     21   static bool Register(JNIEnv* env);
     22 
     23   static void OnProfileDownloadSuccess(
     24       const std::string& account_id_,
     25       const base::string16& full_name,
     26       const SkBitmap& bitmap);
     27 
     28  private:
     29   DISALLOW_COPY_AND_ASSIGN(ProfileDownloaderAndroid);
     30 };
     31 
     32 #endif  // CHROME_BROWSER_ANDROID_PROFILES_PROFILE_DOWNLOADER_ANDROID_H_
     33