| OLD | NEW |
| 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 |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "chrome/browser/extensions/extension_function.h" | 12 #include "chrome/browser/extensions/extension_function.h" |
| 13 #include "content/public/browser/notification_observer.h" | 13 #include "content/public/browser/notification_observer.h" |
| 14 #include "content/public/browser/notification_registrar.h" | 14 #include "content/public/browser/notification_registrar.h" |
| 15 #include "googleurl/src/gurl.h" | 15 #include "googleurl/src/gurl.h" |
| 16 | 16 |
| 17 class BackingStore; | 17 class BackingStore; |
| 18 class GURL; | 18 class GURL; |
| 19 class PrefService; | 19 class PrefServiceSyncable; |
| 20 class SkBitmap; | 20 class SkBitmap; |
| 21 | 21 |
| 22 namespace base { | 22 namespace base { |
| 23 class DictionaryValue; | 23 class DictionaryValue; |
| 24 } | 24 } |
| 25 | 25 |
| 26 namespace content { | 26 namespace content { |
| 27 class WebContents; | 27 class WebContents; |
| 28 } | 28 } |
| 29 | 29 |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 virtual void Observe(int type, | 164 virtual void Observe(int type, |
| 165 const content::NotificationSource& source, | 165 const content::NotificationSource& source, |
| 166 const content::NotificationDetails& details) OVERRIDE; | 166 const content::NotificationDetails& details) OVERRIDE; |
| 167 void GotLanguage(const std::string& language); | 167 void GotLanguage(const std::string& language); |
| 168 content::NotificationRegistrar registrar_; | 168 content::NotificationRegistrar registrar_; |
| 169 DECLARE_EXTENSION_FUNCTION_NAME("tabs.detectLanguage") | 169 DECLARE_EXTENSION_FUNCTION_NAME("tabs.detectLanguage") |
| 170 }; | 170 }; |
| 171 class CaptureVisibleTabFunction : public AsyncExtensionFunction, | 171 class CaptureVisibleTabFunction : public AsyncExtensionFunction, |
| 172 public content::NotificationObserver { | 172 public content::NotificationObserver { |
| 173 public: | 173 public: |
| 174 static void RegisterUserPrefs(PrefService* service); | 174 static void RegisterUserPrefs(PrefServiceSyncable* service); |
| 175 | 175 |
| 176 protected: | 176 protected: |
| 177 enum ImageFormat { | 177 enum ImageFormat { |
| 178 FORMAT_JPEG, | 178 FORMAT_JPEG, |
| 179 FORMAT_PNG | 179 FORMAT_PNG |
| 180 }; | 180 }; |
| 181 | 181 |
| 182 // The default quality setting used when encoding jpegs. | 182 // The default quality setting used when encoding jpegs. |
| 183 static const int kDefaultQuality; | 183 static const int kDefaultQuality; |
| 184 | 184 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 199 // The format (JPEG vs PNG) of the resulting image. Set in RunImpl(). | 199 // The format (JPEG vs PNG) of the resulting image. Set in RunImpl(). |
| 200 ImageFormat image_format_; | 200 ImageFormat image_format_; |
| 201 | 201 |
| 202 // Quality setting to use when encoding jpegs. Set in RunImpl(). | 202 // Quality setting to use when encoding jpegs. Set in RunImpl(). |
| 203 int image_quality_; | 203 int image_quality_; |
| 204 | 204 |
| 205 DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab") | 205 DECLARE_EXTENSION_FUNCTION_NAME("tabs.captureVisibleTab") |
| 206 }; | 206 }; |
| 207 | 207 |
| 208 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_H__ | 208 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_H__ |
| OLD | NEW |