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

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

Issue 545973002: Cleaning up capture_web_contents_function. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 6 years, 3 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
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.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_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
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 virtual bool RunAsync() OVERRIDE; 189 virtual bool RunAsync() OVERRIDE;
190 190
191 virtual void Observe(int type, 191 virtual void Observe(int type,
192 const content::NotificationSource& source, 192 const content::NotificationSource& source,
193 const content::NotificationDetails& details) OVERRIDE; 193 const content::NotificationDetails& details) OVERRIDE;
194 void GotLanguage(const std::string& language); 194 void GotLanguage(const std::string& language);
195 content::NotificationRegistrar registrar_; 195 content::NotificationRegistrar registrar_;
196 DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE) 196 DECLARE_EXTENSION_FUNCTION("tabs.detectLanguage", TABS_DETECTLANGUAGE)
197 }; 197 };
198 class TabsCaptureVisibleTabFunction 198 class TabsCaptureVisibleTabFunction
199 : public extensions::CaptureWebContentsFunction< 199 : public extensions::CaptureWebContentsFunction {
200 ChromeAsyncExtensionFunction> {
201 public: 200 public:
201 TabsCaptureVisibleTabFunction();
202 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry); 202 static void RegisterProfilePrefs(user_prefs::PrefRegistrySyncable* registry);
203 203
204 protected: 204 protected:
205 virtual ~TabsCaptureVisibleTabFunction() {} 205 virtual ~TabsCaptureVisibleTabFunction() {}
206 206
207 private: 207 private:
208 ChromeExtensionFunctionDetails chrome_details_;
209
208 // extensions::CaptureWebContentsFunction: 210 // extensions::CaptureWebContentsFunction:
209 virtual bool IsScreenshotEnabled() OVERRIDE; 211 virtual bool IsScreenshotEnabled() OVERRIDE;
210 virtual content::WebContents* GetWebContentsForID(int id) OVERRIDE; 212 virtual content::WebContents* GetWebContentsForID(int id) OVERRIDE;
211 virtual void OnCaptureFailure(FailureReason reason) OVERRIDE; 213 virtual void OnCaptureFailure(FailureReason reason) OVERRIDE;
212 214
213 DECLARE_EXTENSION_FUNCTION("tabs.captureVisibleTab", TABS_CAPTUREVISIBLETAB) 215 DECLARE_EXTENSION_FUNCTION("tabs.captureVisibleTab", TABS_CAPTUREVISIBLETAB)
214 }; 216 };
215 217
216 // Implement API call tabs.executeScript and tabs.insertCSS. 218 // Implement API call tabs.executeScript and tabs.insertCSS.
217 class ExecuteCodeInTabFunction : public ExecuteCodeFunction { 219 class ExecuteCodeInTabFunction : public ExecuteCodeFunction {
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 virtual ~TabsGetZoomSettingsFunction() {} 310 virtual ~TabsGetZoomSettingsFunction() {}
309 311
310 virtual bool RunAsync() OVERRIDE; 312 virtual bool RunAsync() OVERRIDE;
311 313
312 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS) 314 DECLARE_EXTENSION_FUNCTION("tabs.getZoomSettings", TABS_GETZOOMSETTINGS)
313 }; 315 };
314 316
315 } // namespace extensions 317 } // namespace extensions
316 318
317 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_ 319 #endif // CHROME_BROWSER_EXTENSIONS_API_TABS_TABS_API_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/tabs/tabs_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698