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

Side by Side Diff: chrome/browser/thumbnails/thumbnail_service.h

Issue 1461463002: Reland fix for thumbnail generation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_THUMBNAILS_THUMBNAIL_SERVICE_H_ 5 #ifndef CHROME_BROWSER_THUMBNAILS_THUMBNAIL_SERVICE_H_
6 #define CHROME_BROWSER_THUMBNAILS_THUMBNAIL_SERVICE_H_ 6 #define CHROME_BROWSER_THUMBNAILS_THUMBNAIL_SERVICE_H_
7 7
8 #include "components/history/core/common/thumbnail_score.h" 8 #include "components/history/core/common/thumbnail_score.h"
9 #include "components/keyed_service/core/refcounted_keyed_service.h" 9 #include "components/keyed_service/core/refcounted_keyed_service.h"
10 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
11 11
12 class GURL; 12 class GURL;
13 13
14 namespace base { 14 namespace base {
15 class RefCountedMemory; 15 class RefCountedMemory;
16 } 16 }
17 17
18 namespace thumbnails { 18 namespace thumbnails {
19 19
20 class ThumbnailingAlgorithm; 20 class ThumbnailingAlgorithm;
21 struct ThumbnailingContext; 21 class ThumbnailingContext;
22 22
23 // An interface abstracting access to thumbnails. Intended as a temporary 23 // An interface abstracting access to thumbnails. Intended as a temporary
24 // bridge facilitating switch from TopSites as the thumbnail source to a more 24 // bridge facilitating switch from TopSites as the thumbnail source to a more
25 // robust way of handling these artefacts. 25 // robust way of handling these artefacts.
26 class ThumbnailService : public RefcountedKeyedService { 26 class ThumbnailService : public RefcountedKeyedService {
27 public: 27 public:
28 // Sets the given thumbnail for the given URL. Returns true if the thumbnail 28 // Sets the given thumbnail for the given URL. Returns true if the thumbnail
29 // was updated. False means either the URL wasn't known to us, or we felt 29 // was updated. False means either the URL wasn't known to us, or we felt
30 // that our current thumbnail was superior to the given one. 30 // that our current thumbnail was superior to the given one.
31 virtual bool SetPageThumbnail(const ThumbnailingContext& context, 31 virtual bool SetPageThumbnail(const ThumbnailingContext& context,
(...skipping 25 matching lines...) Expand all
57 // Returns true if the page thumbnail should be updated. 57 // Returns true if the page thumbnail should be updated.
58 virtual bool ShouldAcquirePageThumbnail(const GURL& url) = 0; 58 virtual bool ShouldAcquirePageThumbnail(const GURL& url) = 0;
59 59
60 protected: 60 protected:
61 ~ThumbnailService() override {} 61 ~ThumbnailService() override {}
62 }; 62 };
63 63
64 } // namespace thumbnails 64 } // namespace thumbnails
65 65
66 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_SERVICE_H_ 66 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_SERVICE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698