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

Unified Diff: chrome/browser/extensions/extension_tabs_module.h

Issue 1527015: Support PNG and quality control in chrome.tabs.captureVisibleTab(). (Closed)
Patch Set: Rebase for checkin. Created 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/extensions/extension_function.cc ('k') | chrome/browser/extensions/extension_tabs_module.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/extension_tabs_module.h
diff --git a/chrome/browser/extensions/extension_tabs_module.h b/chrome/browser/extensions/extension_tabs_module.h
index a2aaf0d5bddf37a7e96b088c705e80a43fabb457..839e3cb39756e4d72ee8f33c58e1aed6a1ea4444 100644
--- a/chrome/browser/extensions/extension_tabs_module.h
+++ b/chrome/browser/extensions/extension_tabs_module.h
@@ -1,4 +1,4 @@
-// Copyright (c) 2009 The Chromium Authors. All rights reserved.
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -141,6 +141,14 @@ class DetectTabLanguageFunction : public AsyncExtensionFunction,
class CaptureVisibleTabFunction : public AsyncExtensionFunction,
public NotificationObserver {
private:
+ enum ImageFormat {
+ FORMAT_JPEG,
+ FORMAT_PNG
+ };
+
+ // The default quality setting used when encoding jpegs.
+ static const int kDefaultQuality;
+
~CaptureVisibleTabFunction() {}
virtual bool RunImpl();
virtual bool CaptureSnapshotFromBackingStore(BackingStore* backing_store);
@@ -151,6 +159,12 @@ class CaptureVisibleTabFunction : public AsyncExtensionFunction,
NotificationRegistrar registrar_;
+ // The format (JPEG vs PNG) of the resulting image. Set in RunImpl().
+ ImageFormat image_format_;
+
+ // Quality setting to use when encoding jpegs. Set in RunImpl().
+ int image_quality_;
+
DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab")
};
« no previous file with comments | « chrome/browser/extensions/extension_function.cc ('k') | chrome/browser/extensions/extension_tabs_module.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698