diff options
author | boliu@google.com <boliu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 16:56:09 +0000 |
---|---|---|
committer | boliu@google.com <boliu@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-11 16:56:09 +0000 |
commit | 52f139e2c4189849974901c38aa47b739a40d98a (patch) | |
tree | b284938315d82099af8f4ceb1983d93892469a5b | |
parent | 9bd441e721dcb221a7ffd6b87dab749dc60897f6 (diff) | |
download | chromium_src-52f139e2c4189849974901c38aa47b739a40d98a.zip chromium_src-52f139e2c4189849974901c38aa47b739a40d98a.tar.gz chromium_src-52f139e2c4189849974901c38aa47b739a40d98a.tar.bz2 |
Add enable-video-fullscreen switch.
Corresponding Webkit patch to make this work is here:
https://bugs.webkit.org/show_bug.cgi?id=40317
BUG=16735
TEST=webkitSupportsFullscreen() js call should return true with switch.
(Requires webkit patch)
Review URL: http://codereview.chromium.org/2775001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@49539 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/renderer_host/browser_render_process_host.cc | 1 | ||||
-rw-r--r-- | chrome/common/chrome_switches.cc | 4 | ||||
-rw-r--r-- | chrome/common/chrome_switches.h | 1 | ||||
-rwxr-xr-x | chrome/renderer/render_view.cc | 13 | ||||
-rw-r--r-- | chrome/renderer/render_view.h | 3 |
5 files changed, 22 insertions, 0 deletions
diff --git a/chrome/browser/renderer_host/browser_render_process_host.cc b/chrome/browser/renderer_host/browser_render_process_host.cc index e4795f2..d6fb813 100644 --- a/chrome/browser/renderer_host/browser_render_process_host.cc +++ b/chrome/browser/renderer_host/browser_render_process_host.cc @@ -556,6 +556,7 @@ void BrowserRenderProcessHost::PropagateBrowserCommandLineToRenderer( switches::kShowPaintRects, switches::kEnableOpenMax, switches::kVideoThreads, + switches::kEnableVideoFullscreen, switches::kEnableVideoLayering, switches::kEnableVideoLogging, switches::kEnableTouch, diff --git a/chrome/common/chrome_switches.cc b/chrome/common/chrome_switches.cc index a4a2ca4..2317fe8 100644 --- a/chrome/common/chrome_switches.cc +++ b/chrome/common/chrome_switches.cc @@ -376,6 +376,10 @@ const char kEnableTouch[] = "enable-touch"; // browser window. const char kEnableVerticalTabs[] = "enable-vertical-tabs"; +// Enables support for fullscreen video. Current implementation is +// incomplete and this flag is used for development and testing. +const char kEnableVideoFullscreen[] = "enable-video-fullscreen"; + // Enables video layering where video is rendered as a separate layer outside // of the backing store. const char kEnableVideoLayering[] = "enable-video-layering"; diff --git a/chrome/common/chrome_switches.h b/chrome/common/chrome_switches.h index c0e3d3e..c047e9d7 100644 --- a/chrome/common/chrome_switches.h +++ b/chrome/common/chrome_switches.h @@ -124,6 +124,7 @@ extern const char kEnableSyncThemes[]; extern const char kEnableSyncTypedUrls[]; extern const char kEnableTouch[]; extern const char kEnableVerticalTabs[]; +extern const char kEnableVideoFullscreen[]; extern const char kEnableVideoLayering[]; extern const char kEnableVideoLogging[]; extern const char kEnableWatchdog[]; diff --git a/chrome/renderer/render_view.cc b/chrome/renderer/render_view.cc index 208dc79..fd3665f3 100755 --- a/chrome/renderer/render_view.cc +++ b/chrome/renderer/render_view.cc @@ -1929,6 +1929,19 @@ void RenderView::showContextMenu( Send(new ViewHostMsg_ContextMenu(routing_id_, params)); } +bool RenderView::supportsFullscreen() { + return CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableVideoFullscreen); +} + +void RenderView::enterFullscreenForNode(const WebKit::WebNode& node) { + NOTIMPLEMENTED(); +} + +void RenderView::exitFullscreenForNode(const WebKit::WebNode& node) { + NOTIMPLEMENTED(); +} + void RenderView::setStatusText(const WebString& text) { } diff --git a/chrome/renderer/render_view.h b/chrome/renderer/render_view.h index b93d98b..093d0e5 100644 --- a/chrome/renderer/render_view.h +++ b/chrome/renderer/render_view.h @@ -352,6 +352,9 @@ class RenderView : public RenderWidget, const WebKit::WebString& message); virtual void showContextMenu(WebKit::WebFrame* frame, const WebKit::WebContextMenuData& data); + virtual bool supportsFullscreen(); + virtual void enterFullscreenForNode(const WebKit::WebNode&); + virtual void exitFullscreenForNode(const WebKit::WebNode&); virtual void setStatusText(const WebKit::WebString& text); virtual void setMouseOverURL(const WebKit::WebURL& url); virtual void setKeyboardFocusURL(const WebKit::WebURL& url); |