diff options
author | mikhail.pozdnyakov <mikhail.pozdnyakov@intel.com> | 2015-04-23 06:31:07 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-23 13:31:19 +0000 |
commit | d15048d49fee7167c57825bba4d899a7effcad3a (patch) | |
tree | 1c6402b916d903720fb96b90019168a3eb96c921 /extensions/browser/app_window | |
parent | 62215af64daf642c492fc2002cffc287b2c3bb09 (diff) | |
download | chromium_src-d15048d49fee7167c57825bba4d899a7effcad3a.zip chromium_src-d15048d49fee7167c57825bba4d899a7effcad3a.tar.gz chromium_src-d15048d49fee7167c57825bba4d899a7effcad3a.tar.bz2 |
Set display mode for extensions::AppWindow
This CL provides content::WebContentsDelegate::GetDisplayMode() implementation for extensions::AppWindow.
The 'extensions/api_test/fullscreen/' test is modified to verify media query "display-mode" features correctness.
BUG=471703
Review URL: https://codereview.chromium.org/1070423003
Cr-Commit-Position: refs/heads/master@{#326502}
Diffstat (limited to 'extensions/browser/app_window')
-rw-r--r-- | extensions/browser/app_window/app_window.cc | 6 | ||||
-rw-r--r-- | extensions/browser/app_window/app_window.h | 2 |
2 files changed, 8 insertions, 0 deletions
diff --git a/extensions/browser/app_window/app_window.cc b/extensions/browser/app_window/app_window.cc index 5ca80d4..64fa3c3 100644 --- a/extensions/browser/app_window/app_window.cc +++ b/extensions/browser/app_window/app_window.cc @@ -955,6 +955,12 @@ bool AppWindow::IsFullscreenForTabOrPending(const content::WebContents* source) return IsHtmlApiFullscreen(); } +blink::WebDisplayMode AppWindow::GetDisplayMode( + const content::WebContents* source) const { + return IsFullscreen() ? blink::WebDisplayModeFullscreen + : blink::WebDisplayModeStandalone; +} + void AppWindow::OnExtensionUnloaded(BrowserContext* browser_context, const Extension* extension, UnloadedExtensionInfo::Reason reason) { diff --git a/extensions/browser/app_window/app_window.h b/extensions/browser/app_window/app_window.h index df6b248..10baa0e 100644 --- a/extensions/browser/app_window/app_window.h +++ b/extensions/browser/app_window/app_window.h @@ -382,6 +382,8 @@ class AppWindow : public content::WebContentsDelegate, void ExitFullscreenModeForTab(content::WebContents* source) override; bool IsFullscreenForTabOrPending( const content::WebContents* source) const override; + blink::WebDisplayMode GetDisplayMode( + const content::WebContents* source) const override; void RequestMediaAccessPermission( content::WebContents* web_contents, const content::MediaStreamRequest& request, |