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

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

Issue 10692110: screenshot disabling policy (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Addressed comments (4) Created 8 years, 5 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
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 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
11 11
12 #include "base/compiler_specific.h" 12 #include "base/compiler_specific.h"
13 #include "chrome/browser/extensions/extension_function.h" 13 #include "chrome/browser/extensions/extension_function.h"
14 #include "content/public/browser/notification_observer.h" 14 #include "content/public/browser/notification_observer.h"
15 #include "content/public/browser/notification_registrar.h" 15 #include "content/public/browser/notification_registrar.h"
16 #include "googleurl/src/gurl.h" 16 #include "googleurl/src/gurl.h"
17 17
18 class BackingStore; 18 class BackingStore;
19 class GURL; 19 class GURL;
20 class PrefService;
20 class SkBitmap; 21 class SkBitmap;
21 class TabContents; 22 class TabContents;
22 23
23 namespace base { 24 namespace base {
24 class DictionaryValue; 25 class DictionaryValue;
25 } 26 }
26 27
27 namespace content { 28 namespace content {
28 class WebContents; 29 class WebContents;
29 } 30 }
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 159
159 virtual void Observe(int type, 160 virtual void Observe(int type,
160 const content::NotificationSource& source, 161 const content::NotificationSource& source,
161 const content::NotificationDetails& details) OVERRIDE; 162 const content::NotificationDetails& details) OVERRIDE;
162 void GotLanguage(const std::string& language); 163 void GotLanguage(const std::string& language);
163 content::NotificationRegistrar registrar_; 164 content::NotificationRegistrar registrar_;
164 DECLARE_EXTENSION_FUNCTION_NAME("tabs.detectLanguage") 165 DECLARE_EXTENSION_FUNCTION_NAME("tabs.detectLanguage")
165 }; 166 };
166 class CaptureVisibleTabFunction : public AsyncExtensionFunction, 167 class CaptureVisibleTabFunction : public AsyncExtensionFunction,
167 public content::NotificationObserver { 168 public content::NotificationObserver {
169 public:
170 static void RegisterUserPrefs(PrefService* service);
171
168 protected: 172 protected:
169 enum ImageFormat { 173 enum ImageFormat {
170 FORMAT_JPEG, 174 FORMAT_JPEG,
171 FORMAT_PNG 175 FORMAT_PNG
172 }; 176 };
173 177
174 // The default quality setting used when encoding jpegs. 178 // The default quality setting used when encoding jpegs.
175 static const int kDefaultQuality; 179 static const int kDefaultQuality;
176 180
177 virtual ~CaptureVisibleTabFunction() {} 181 virtual ~CaptureVisibleTabFunction() {}
(...skipping 14 matching lines...) Expand all
192 // The format (JPEG vs PNG) of the resulting image. Set in RunImpl(). 196 // The format (JPEG vs PNG) of the resulting image. Set in RunImpl().
193 ImageFormat image_format_; 197 ImageFormat image_format_;
194 198
195 // Quality setting to use when encoding jpegs. Set in RunImpl(). 199 // Quality setting to use when encoding jpegs. Set in RunImpl().
196 int image_quality_; 200 int image_quality_;
197 201
198 DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab") 202 DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab")
199 }; 203 };
200 204
201 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_H__ 205 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698