| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ |
| 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ | 6 #define CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ |
| 7 | 7 |
| 8 #include "base/android/jni_android.h" | 8 #include "base/android/jni_android.h" |
| 9 #include "base/android/jni_weak_ref.h" | 9 #include "base/android/jni_weak_ref.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 80 // Fetches the icon at the given URL asynchronously. | 80 // Fetches the icon at the given URL asynchronously. |
| 81 // Returns |false| if this couldn't be kicked off. | 81 // Returns |false| if this couldn't be kicked off. |
| 82 bool FetchIcon(JNIEnv* env, | 82 bool FetchIcon(JNIEnv* env, |
| 83 jobject obj, | 83 jobject obj, |
| 84 jstring jimage_url); | 84 jstring jimage_url); |
| 85 | 85 |
| 86 // Fetches the icon at the given URL asynchronously. | 86 // Fetches the icon at the given URL asynchronously. |
| 87 // Returns |false| if this couldn't be kicked off. | 87 // Returns |false| if this couldn't be kicked off. |
| 88 bool FetchIcon(const GURL& image_url); | 88 bool FetchIcon(const GURL& image_url); |
| 89 | 89 |
| 90 // Installs the app defined by the manifest. |
| 91 // TODO(dfalcantara): Fold into Install() when more CLs land. |
| 92 static void InstallManifestApp(const content::Manifest& manifest, |
| 93 const SkBitmap& icon); |
| 94 |
| 90 // WebContentsObserver overrides. | 95 // WebContentsObserver overrides. |
| 91 virtual void DidNavigateMainFrame( | 96 virtual void DidNavigateMainFrame( |
| 92 const content::LoadCommittedDetails& details, | 97 const content::LoadCommittedDetails& details, |
| 93 const content::FrameNavigateParams& params) override; | 98 const content::FrameNavigateParams& params) override; |
| 94 virtual void DidFinishLoad(content::RenderFrameHost* render_frame_host, | 99 virtual void DidFinishLoad(content::RenderFrameHost* render_frame_host, |
| 95 const GURL& validated_url) override; | 100 const GURL& validated_url) override; |
| 96 virtual bool OnMessageReceived(const IPC::Message& message) override; | 101 virtual bool OnMessageReceived(const IPC::Message& message) override; |
| 97 | 102 |
| 98 // BitmapFetcherDelegate overrides. | 103 // BitmapFetcherDelegate overrides. |
| 99 virtual void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override; | 104 virtual void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override; |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 | 136 |
| 132 DISALLOW_COPY_AND_ASSIGN(AppBannerManager); | 137 DISALLOW_COPY_AND_ASSIGN(AppBannerManager); |
| 133 }; // class AppBannerManager | 138 }; // class AppBannerManager |
| 134 | 139 |
| 135 // Register native methods | 140 // Register native methods |
| 136 bool RegisterAppBannerManager(JNIEnv* env); | 141 bool RegisterAppBannerManager(JNIEnv* env); |
| 137 | 142 |
| 138 } // namespace banners | 143 } // namespace banners |
| 139 | 144 |
| 140 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ | 145 #endif // CHROME_BROWSER_ANDROID_BANNERS_APP_BANNER_MANAGER_H_ |
| OLD | NEW |