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

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

Issue 59903010: Ensure using chrome://thumb2/... adds the URL as a forced URL in TopSites so that a thumbnail is ca… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Take 2. Created 7 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 | Annotate | Revision Log
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 "chrome/common/thumbnail_score.h" 8 #include "chrome/common/thumbnail_score.h"
9 #include "components/browser_context_keyed_service/refcounted_browser_context_ke yed_service.h" 9 #include "components/browser_context_keyed_service/refcounted_browser_context_ke yed_service.h"
10 #include "ui/gfx/image/image.h" 10 #include "ui/gfx/image/image.h"
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // If an exact thumbnail URL match fails, |prefix_match| specifies whether or 43 // If an exact thumbnail URL match fails, |prefix_match| specifies whether or
44 // not to try harder by matching the query thumbnail URL as URL prefix (as 44 // not to try harder by matching the query thumbnail URL as URL prefix (as
45 // defined by UrlIsPrefix()). 45 // defined by UrlIsPrefix()).
46 // As this method may be invoked on any thread the ref count needs to be 46 // As this method may be invoked on any thread the ref count needs to be
47 // incremented before this method returns, so this takes a scoped_refptr*. 47 // incremented before this method returns, so this takes a scoped_refptr*.
48 virtual bool GetPageThumbnail( 48 virtual bool GetPageThumbnail(
49 const GURL& url, 49 const GURL& url,
50 bool prefix_match, 50 bool prefix_match,
51 scoped_refptr<base::RefCountedMemory>* bytes) = 0; 51 scoped_refptr<base::RefCountedMemory>* bytes) = 0;
52 52
53 // Add or updates a |url| for which we should force the capture of a thumbnail
54 // next time it's visited.
55 virtual void AddForcedURL(const GURL& url) = 0;
56
53 // Returns true if the page thumbnail should be updated. 57 // Returns true if the page thumbnail should be updated.
54 virtual bool ShouldAcquirePageThumbnail(const GURL& url) = 0; 58 virtual bool ShouldAcquirePageThumbnail(const GURL& url) = 0;
55 59
56 protected: 60 protected:
57 virtual ~ThumbnailService() {} 61 virtual ~ThumbnailService() {}
58 }; 62 };
59 63
60 } // namespace thumbnails 64 } // namespace thumbnails
61 65
62 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_SERVICE_H_ 66 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAIL_SERVICE_H_
OLDNEW
« no previous file with comments | « chrome/browser/history/top_sites_impl_unittest.cc ('k') | chrome/browser/thumbnails/thumbnail_service_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698