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

Unified Diff: chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h

Issue 10071035: RefCounted types should not have public destructors, chrome/browser/extensions (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Compile fix Created 8 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
Index: chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h
diff --git a/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h b/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h
index 32dec51ac781038f6f103ac9068317c4c755194b..612b7b4d7980e44ff775d277079dbdce84107034 100644
--- a/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h
+++ b/chrome/browser/extensions/api/offscreen_tabs/offscreen_tabs_api.h
@@ -36,44 +36,68 @@ class WebContents;
// Creates an offscreen tab.
class CreateOffscreenTabFunction : public SyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.create")
+
CreateOffscreenTabFunction();
- private:
+
+ protected:
virtual ~CreateOffscreenTabFunction();
+
+ // ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.create")
+
+ private:
DISALLOW_COPY_AND_ASSIGN(CreateOffscreenTabFunction);
};
// Gets info about an offscreen tab.
class GetOffscreenTabFunction : public SyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.get")
+
GetOffscreenTabFunction();
- private:
+
+ protected:
virtual ~GetOffscreenTabFunction();
+
+ // ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.get")
+
+ private:
DISALLOW_COPY_AND_ASSIGN(GetOffscreenTabFunction);
};
// Gets all offscreen tabs created by the tab that invoked this function.
class GetAllOffscreenTabFunction : public SyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.getAll")
+
GetAllOffscreenTabFunction();
- private:
+
+ protected:
virtual ~GetAllOffscreenTabFunction();
+
+ // ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.getAll")
+
+ private:
DISALLOW_COPY_AND_ASSIGN(GetAllOffscreenTabFunction);
};
// Removes an offscreen tab.
class RemoveOffscreenTabFunction : public SyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.remove")
+
RemoveOffscreenTabFunction();
- private:
+
+ protected:
virtual ~RemoveOffscreenTabFunction();
+
+ // ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.remove")
+
+ private:
DISALLOW_COPY_AND_ASSIGN(RemoveOffscreenTabFunction);
};
@@ -81,12 +105,18 @@ class RemoveOffscreenTabFunction : public SyncExtensionFunction {
// TODO(jstritar): This would be useful on the chrome.tabs API.
class SendKeyboardEventOffscreenTabFunction : public SyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME(
+ "experimental.offscreenTabs.sendKeyboardEvent")
+
SendKeyboardEventOffscreenTabFunction();
- private:
+
+ protected:
virtual ~SendKeyboardEventOffscreenTabFunction();
+
+ // ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME(
- "experimental.offscreenTabs.sendKeyboardEvent")
+
+ private:
DISALLOW_COPY_AND_ASSIGN(SendKeyboardEventOffscreenTabFunction);
};
@@ -96,36 +126,56 @@ class SendKeyboardEventOffscreenTabFunction : public SyncExtensionFunction {
// TODO(jstritar): This would be useful on the chrome.tabs API.
class SendMouseEventOffscreenTabFunction : public SyncExtensionFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.sendMouseEvent")
+
SendMouseEventOffscreenTabFunction();
- private:
+
+ protected:
virtual ~SendMouseEventOffscreenTabFunction();
+
+ // ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.sendMouseEvent")
+
+ private:
DISALLOW_COPY_AND_ASSIGN(SendMouseEventOffscreenTabFunction);
};
// Gets a snapshot of the offscreen tab and returns it as a data URL.
class ToDataUrlOffscreenTabFunction : public CaptureVisibleTabFunction {
public:
+ // TODO(jstritar): Rename to toDataUrl.
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.toDataUrl")
+
ToDataUrlOffscreenTabFunction();
- private:
+
+ protected:
virtual ~ToDataUrlOffscreenTabFunction();
+
+ // CaptureVisibleTabFunction:
virtual bool GetTabToCapture(content::WebContents** web_contents,
TabContentsWrapper** wrapper) OVERRIDE;
- // TODO(jstritar): Rename to toDataUrl.
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.toDataUrl")
+
+ private:
DISALLOW_COPY_AND_ASSIGN(ToDataUrlOffscreenTabFunction);
};
// Updates an offscreen tab.
class UpdateOffscreenTabFunction : public UpdateTabFunction {
public:
+ DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.update")
+
UpdateOffscreenTabFunction();
- private:
+
+ protected:
virtual ~UpdateOffscreenTabFunction();
+
+ // ExtensionFunction:
virtual bool RunImpl() OVERRIDE;
+
+ // UpdateTabFunction:
virtual void PopulateResult() OVERRIDE;
- DECLARE_EXTENSION_FUNCTION_NAME("experimental.offscreenTabs.update")
+
+ private:
DISALLOW_COPY_AND_ASSIGN(UpdateOffscreenTabFunction);
};
« no previous file with comments | « chrome/browser/extensions/api/identity/identity_api.h ('k') | chrome/browser/extensions/api/permissions/permissions_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698