Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(349)

Side by Side Diff: chrome/browser/enhanced_bookmarks/android/bookmark_image_service_android.h

Issue 1031293002: Fix crashes due to gfx::Image unsafe thread passing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove unnecessary Pass() Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/enhanced_bookmarks/android/bookmark_image_service_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // image. If it is, invokes RetrieveSalientImageFromContext() for the relevant 43 // image. If it is, invokes RetrieveSalientImageFromContext() for the relevant
44 // urls. 44 // urls.
45 void FinishSuccessfulPageLoadForTab(content::WebContents* web_contents, 45 void FinishSuccessfulPageLoadForTab(content::WebContents* web_contents,
46 bool update_bookmark); 46 bool update_bookmark);
47 47
48 private: 48 private:
49 void RetrieveSalientImageFromContextCallback(const GURL& page_url, 49 void RetrieveSalientImageFromContextCallback(const GURL& page_url,
50 bool update_bookmark, 50 bool update_bookmark,
51 const base::Value* result); 51 const base::Value* result);
52 52
53 gfx::Image ResizeImage(gfx::Image image) override; 53 scoped_ptr<gfx::Image> ResizeImage(const gfx::Image& image) override;
54 54
55 content::BrowserContext* browser_context_; 55 content::BrowserContext* browser_context_;
56 // The script injected in a page to extract image urls. 56 // The script injected in a page to extract image urls.
57 base::string16 script_; 57 base::string16 script_;
58 // Maximum size for retrieved salient images in pixels. This is used when 58 // Maximum size for retrieved salient images in pixels. This is used when
59 // resizing an image. 59 // resizing an image.
60 gfx::Size max_size_; 60 gfx::Size max_size_;
61 61
62 class BitmapFetcherHandler : private chrome::BitmapFetcherDelegate { 62 class BitmapFetcherHandler : private chrome::BitmapFetcherDelegate {
63 public: 63 public:
(...skipping 19 matching lines...) Expand all
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_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/enhanced_bookmarks/android/bookmark_image_service_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698