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_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_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 "chrome/common/extensions/extension_resource.h" | 13 #include "chrome/common/extensions/extension_resource.h" |
14 #include "chrome/common/extensions/user_script.h" | 14 #include "chrome/common/extensions/user_script.h" |
15 #include "content/public/browser/notification_observer.h" | 15 #include "content/public/browser/notification_observer.h" |
16 #include "content/public/browser/notification_registrar.h" | 16 #include "content/public/browser/notification_registrar.h" |
17 #include "googleurl/src/gurl.h" | 17 #include "googleurl/src/gurl.h" |
18 | 18 |
19 class BackingStore; | 19 class BackingStore; |
20 class GURL; | 20 class GURL; |
21 class PrefServiceSyncable; | 21 class PrefRegistrySyncable; |
22 class SkBitmap; | 22 class SkBitmap; |
23 | 23 |
24 namespace base { | 24 namespace base { |
25 class DictionaryValue; | 25 class DictionaryValue; |
26 } | 26 } |
27 | 27 |
28 namespace content { | 28 namespace content { |
29 class WebContents; | 29 class WebContents; |
30 } | 30 } |
31 | 31 |
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
170 virtual void Observe(int type, | 170 virtual void Observe(int type, |
171 const content::NotificationSource& source, | 171 const content::NotificationSource& source, |
172 const content::NotificationDetails& details) OVERRIDE; | 172 const content::NotificationDetails& details) OVERRIDE; |
173 void GotLanguage(const std::string& language); | 173 void GotLanguage(const std::string& language); |
174 content::NotificationRegistrar registrar_; | 174 content::NotificationRegistrar registrar_; |
175 DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE) | 175 DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE) |
176 }; | 176 }; |
177 class TabsCaptureVisibleTabFunction : public AsyncExtensionFunction, | 177 class TabsCaptureVisibleTabFunction : public AsyncExtensionFunction, |
178 public content::NotificationObserver { | 178 public content::NotificationObserver { |
179 public: | 179 public: |
180 static void RegisterUserPrefs(PrefServiceSyncable* service); | 180 static void RegisterUserPrefs(PrefRegistrySyncable* registry); |
181 | 181 |
182 protected: | 182 protected: |
183 enum ImageFormat { | 183 enum ImageFormat { |
184 FORMAT_JPEG, | 184 FORMAT_JPEG, |
185 FORMAT_PNG | 185 FORMAT_PNG |
186 }; | 186 }; |
187 | 187 |
188 // The default quality setting used when encoding jpegs. | 188 // The default quality setting used when encoding jpegs. |
189 static const int kDefaultQuality; | 189 static const int kDefaultQuality; |
190 | 190 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
277 }; | 277 }; |
278 | 278 |
279 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { | 279 class TabsInsertCSSFunction : public ExecuteCodeInTabFunction { |
280 private: | 280 private: |
281 virtual ~TabsInsertCSSFunction() {} | 281 virtual ~TabsInsertCSSFunction() {} |
282 | 282 |
283 DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) | 283 DECLARE_EXTENSION_FUNCTION("tabs.insertCSS", TABS_INSERTCSS) |
284 }; | 284 }; |
285 | 285 |
286 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ | 286 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ |
OLD | NEW |