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

Unified Diff: chrome/browser/extensions/api/tab_capture/tab_capture_api.h

Issue 1221483002: New tabCapture.captureOffscreenTab API, initially for Presentation API 1UA mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Mostly revert to Patch Set 6, plus minor tweaks. [and REBASE] Created 5 years, 2 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/tab_capture/tab_capture_api.h
diff --git a/chrome/browser/extensions/api/tab_capture/tab_capture_api.h b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
index baba0ee8e725c0798a1bad7b9630e313b32ef40e..7e60470aa3eca8a9fc7c57dacb4c7025df48cff7 100644
--- a/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
+++ b/chrome/browser/extensions/api/tab_capture/tab_capture_api.h
@@ -21,11 +21,11 @@ class TabCaptureCaptureFunction : public ChromeSyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("tabCapture.capture", TABCAPTURE_CAPTURE)
- protected:
- ~TabCaptureCaptureFunction() override {}
+ private:
+ ~TabCaptureCaptureFunction() final {}
// ExtensionFunction:
- bool RunSync() override;
+ bool RunSync() final;
};
class TabCaptureGetCapturedTabsFunction : public ChromeSyncExtensionFunction {
@@ -33,11 +33,28 @@ class TabCaptureGetCapturedTabsFunction : public ChromeSyncExtensionFunction {
DECLARE_EXTENSION_FUNCTION("tabCapture.getCapturedTabs",
TABCAPTURE_GETCAPTUREDTABS)
- protected:
- ~TabCaptureGetCapturedTabsFunction() override {}
+ private:
+ ~TabCaptureGetCapturedTabsFunction() final {}
// ExtensionFunction:
- bool RunSync() override;
+ bool RunSync() final;
+};
+
+class TabCaptureCaptureOffscreenTabFunction : public SyncExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("tabCapture.captureOffscreenTab",
+ TABCAPTURE_CAPTUREOFFSCREENTAB)
+
+ // Examines the min/max width/height constraints in the |options| to determine
+ // a suitable initial off-screen tab size.
+ static gfx::Size DetermineInitialSize(
+ const extensions::api::tab_capture::CaptureOptions& options);
+
+ private:
+ ~TabCaptureCaptureOffscreenTabFunction() final {}
+
+ // ExtensionFunction:
+ bool RunSync() final;
};
} // namespace extensions

Powered by Google App Engine
This is Rietveld 408576698