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

Side by Side Diff: chrome/browser/extensions/api/tabs/tabs.h

Issue 11031055: Introduce PlatformBitmap, which is a minimal helper class that wraps an SkBitmap (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 2 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs.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 (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_EXTENSIONS_API_TABS_TABS_H__ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_H__
6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_H__ 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_H__
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 22
23 namespace base { 23 namespace base {
24 class DictionaryValue; 24 class DictionaryValue;
25 } 25 }
26 26
27 namespace content { 27 namespace content {
28 class WebContents; 28 class WebContents;
29 } 29 }
30 30
31 namespace skia { 31 namespace skia {
32 class PlatformCanvas; 32 class PlatformBitmap;
33 } 33 }
34 34
35 // Windows 35 // Windows
36 class GetWindowFunction : public SyncExtensionFunction { 36 class GetWindowFunction : public SyncExtensionFunction {
37 virtual ~GetWindowFunction() {} 37 virtual ~GetWindowFunction() {}
38 virtual bool RunImpl() OVERRIDE; 38 virtual bool RunImpl() OVERRIDE;
39 DECLARE_EXTENSION_FUNCTION_NAME("windows.get") 39 DECLARE_EXTENSION_FUNCTION_NAME("windows.get")
40 }; 40 };
41 class GetCurrentWindowFunction : public SyncExtensionFunction { 41 class GetCurrentWindowFunction : public SyncExtensionFunction {
42 virtual ~GetCurrentWindowFunction() {} 42 virtual ~GetCurrentWindowFunction() {}
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 185
186 virtual ~CaptureVisibleTabFunction() {} 186 virtual ~CaptureVisibleTabFunction() {}
187 virtual bool RunImpl() OVERRIDE; 187 virtual bool RunImpl() OVERRIDE;
188 virtual bool GetTabToCapture(content::WebContents** web_contents); 188 virtual bool GetTabToCapture(content::WebContents** web_contents);
189 virtual void Observe(int type, 189 virtual void Observe(int type,
190 const content::NotificationSource& source, 190 const content::NotificationSource& source,
191 const content::NotificationDetails& details) OVERRIDE; 191 const content::NotificationDetails& details) OVERRIDE;
192 void SendResultFromBitmap(const SkBitmap& screen_capture); 192 void SendResultFromBitmap(const SkBitmap& screen_capture);
193 193
194 private: 194 private:
195 void CopyFromBackingStoreComplete(skia::PlatformCanvas* canvas, 195 void CopyFromBackingStoreComplete(skia::PlatformBitmap* bitmap,
196 bool succeeded); 196 bool succeeded);
197 197
198 content::NotificationRegistrar registrar_; 198 content::NotificationRegistrar registrar_;
199 199
200 // The format (JPEG vs PNG) of the resulting image. Set in RunImpl(). 200 // The format (JPEG vs PNG) of the resulting image. Set in RunImpl().
201 ImageFormat image_format_; 201 ImageFormat image_format_;
202 202
203 // Quality setting to use when encoding jpegs. Set in RunImpl(). 203 // Quality setting to use when encoding jpegs. Set in RunImpl().
204 int image_quality_; 204 int image_quality_;
205 205
206 DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab") 206 DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab")
207 }; 207 };
208 208
209 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_H__ 209 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_H__
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698