| 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_ENHANCED_BOOKMARKS_ANDROID_BOOKMARK_IMAGE_SERVICE_ANDROID
_H_ | 5 #ifndef CHROME_BROWSER_ENHANCED_BOOKMARKS_ANDROID_BOOKMARK_IMAGE_SERVICE_ANDROID
_H_ |
| 6 #define CHROME_BROWSER_ENHANCED_BOOKMARKS_ANDROID_BOOKMARK_IMAGE_SERVICE_ANDROID
_H_ | 6 #define CHROME_BROWSER_ENHANCED_BOOKMARKS_ANDROID_BOOKMARK_IMAGE_SERVICE_ANDROID
_H_ |
| 7 | 7 |
| 8 #include "components/enhanced_bookmarks/bookmark_image_service.h" | 8 #include "components/enhanced_bookmarks/bookmark_image_service.h" |
| 9 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h" | 9 #include "chrome/browser/bitmap_fetcher/bitmap_fetcher.h" |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 public: | 63 public: |
| 64 explicit BitmapFetcherHandler(BookmarkImageServiceAndroid* service, | 64 explicit BitmapFetcherHandler(BookmarkImageServiceAndroid* service, |
| 65 const GURL& image_url) | 65 const GURL& image_url) |
| 66 : service_(service), bitmap_fetcher_(image_url, this) {} | 66 : service_(service), bitmap_fetcher_(image_url, this) {} |
| 67 void Start(content::BrowserContext* browser_context, | 67 void Start(content::BrowserContext* browser_context, |
| 68 const std::string& referrer, | 68 const std::string& referrer, |
| 69 net::URLRequest::ReferrerPolicy referrer_policy, | 69 net::URLRequest::ReferrerPolicy referrer_policy, |
| 70 int load_flags, | 70 int load_flags, |
| 71 bool update_bookmark, | 71 bool update_bookmark, |
| 72 const GURL& page_url); | 72 const GURL& page_url); |
| 73 void OnFetchComplete(const GURL url, const SkBitmap* bitmap) override; | 73 void OnFetchComplete(const GURL& url, const SkBitmap* bitmap) override; |
| 74 | 74 |
| 75 protected: | 75 protected: |
| 76 ~BitmapFetcherHandler() override {} | 76 ~BitmapFetcherHandler() override {} |
| 77 | 77 |
| 78 private: | 78 private: |
| 79 BookmarkImageServiceAndroid* service_; | 79 BookmarkImageServiceAndroid* service_; |
| 80 chrome::BitmapFetcher bitmap_fetcher_; | 80 chrome::BitmapFetcher bitmap_fetcher_; |
| 81 bool update_bookmark_; | 81 bool update_bookmark_; |
| 82 GURL page_url_; | 82 GURL page_url_; |
| 83 | 83 |
| 84 DISALLOW_COPY_AND_ASSIGN(BitmapFetcherHandler); | 84 DISALLOW_COPY_AND_ASSIGN(BitmapFetcherHandler); |
| 85 }; | 85 }; |
| 86 | 86 |
| 87 DISALLOW_COPY_AND_ASSIGN(BookmarkImageServiceAndroid); | 87 DISALLOW_COPY_AND_ASSIGN(BookmarkImageServiceAndroid); |
| 88 }; | 88 }; |
| 89 | 89 |
| 90 } // namespace enhanced_bookmarks | 90 } // namespace enhanced_bookmarks |
| 91 | 91 |
| 92 #endif // CHROME_BROWSER_ENHANCED_BOOKMARKS_ANDROID_BOOKMARK_IMAGE_SERVICE_ANDR
OID_H_ | 92 #endif // CHROME_BROWSER_ENHANCED_BOOKMARKS_ANDROID_BOOKMARK_IMAGE_SERVICE_ANDR
OID_H_ |
| OLD | NEW |