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

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

Issue 15458003: Plugs in the new thumbnailing algorithm to ThumbnailTabHelper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed up a compile problem (indpendent change). Created 7 years, 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_THUMBNAILING_ALGORITHM_H_ 5 #ifndef CHROME_BROWSER_THUMBNAILS_THUMBNAILING_ALGORITHM_H_
6 #define CHROME_BROWSER_THUMBNAILS_THUMBNAILING_ALGORITHM_H_ 6 #define CHROME_BROWSER_THUMBNAILS_THUMBNAILING_ALGORITHM_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "chrome/browser/thumbnails/thumbnailing_context.h" 9 #include "chrome/browser/thumbnails/thumbnailing_context.h"
10 #include "ui/gfx/rect.h" 10 #include "ui/gfx/rect.h"
(...skipping 23 matching lines...) Expand all
34 gfx::Size* target_size) const = 0; 34 gfx::Size* target_size) const = 0;
35 35
36 // Invoked to produce a thumbnail image from a |bitmap| extracted by the 36 // Invoked to produce a thumbnail image from a |bitmap| extracted by the
37 // callee from source canvas according to instructions provided by a call 37 // callee from source canvas according to instructions provided by a call
38 // to GetCanvasCopyInfo. 38 // to GetCanvasCopyInfo.
39 // Note that ProcessBitmap must be able to handle bitmaps which might have not 39 // Note that ProcessBitmap must be able to handle bitmaps which might have not
40 // been processed (scalled/cropped) as requested. |context| gives additional 40 // been processed (scalled/cropped) as requested. |context| gives additional
41 // information on the source, including if and how it was clipped. 41 // information on the source, including if and how it was clipped.
42 // The function shall invoke |callback| once done, passing in fully populated 42 // The function shall invoke |callback| once done, passing in fully populated
43 // |context| along with resulting thumbnail bitmap. 43 // |context| along with resulting thumbnail bitmap.
44 virtual void ProcessBitmap(ThumbnailingContext* context, 44 virtual void ProcessBitmap(scoped_refptr<ThumbnailingContext> context,
45 const ConsumerCallback& callback, 45 const ConsumerCallback& callback,
46 const SkBitmap& bitmap) = 0; 46 const SkBitmap& bitmap) = 0;
47 47
48 protected: 48 protected:
49 virtual ~ThumbnailingAlgorithm() {} 49 virtual ~ThumbnailingAlgorithm() {}
50 friend class base::RefCountedThreadSafe<ThumbnailingAlgorithm>; 50 friend class base::RefCountedThreadSafe<ThumbnailingAlgorithm>;
51 }; 51 };
52 52
53 } 53 }
54 54
55 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAILING_ALGORITHM_H_ 55 #endif // CHROME_BROWSER_THUMBNAILS_THUMBNAILING_ALGORITHM_H_
OLDNEW
« no previous file with comments | « chrome/browser/thumbnails/thumbnail_tab_helper.cc ('k') | chrome/browser/thumbnails/thumbnailing_context.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698