diff options
author | jeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-15 07:28:28 +0000 |
---|---|---|
committer | jeremya@chromium.org <jeremya@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-10-15 07:28:28 +0000 |
commit | 55c87fae3dafd9a0501077e9fc8ae0dc2b638be1 (patch) | |
tree | 725f0e4d69c6960f3f0d518dac68b30946209fe3 /chrome/browser/ui/cocoa/browser_window_cocoa.mm | |
parent | 85804b5f10ea2d1087c6d0ec0caebe3a41e12313 (diff) | |
download | chromium_src-55c87fae3dafd9a0501077e9fc8ae0dc2b638be1.zip chromium_src-55c87fae3dafd9a0501077e9fc8ae0dc2b638be1.tar.gz chromium_src-55c87fae3dafd9a0501077e9fc8ae0dc2b638be1.tar.bz2 |
Implement fullscreen info bubble on Win and Mac.
When a site enters fullscreen a bubble should appear, both to give the user the option to exit fullscreen and to inform them that the site has entered fullscreen. This patch implements that behaviour on Windows and Mac.
XIB changes: (FullScreenExitBubble.xib)
* Added explanatory text field.
* Added "allow" and "deny" buttons.
* Changed from View into Window.
BUG=73923
TEST=
Review URL: http://codereview.chromium.org/7740044
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@105649 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/cocoa/browser_window_cocoa.mm')
-rw-r--r-- | chrome/browser/ui/cocoa/browser_window_cocoa.mm | 22 |
1 files changed, 17 insertions, 5 deletions
diff --git a/chrome/browser/ui/cocoa/browser_window_cocoa.mm b/chrome/browser/ui/cocoa/browser_window_cocoa.mm index f2072b8..79fd2e7 100644 --- a/chrome/browser/ui/cocoa/browser_window_cocoa.mm +++ b/chrome/browser/ui/cocoa/browser_window_cocoa.mm @@ -134,7 +134,7 @@ void BrowserWindowCocoa::ShowInactive() { void BrowserWindowCocoa::SetBounds(const gfx::Rect& bounds) { gfx::Rect real_bounds = [controller_ enforceMinWindowSize:bounds]; - SetFullscreen(false); + ExitFullscreen(); NSRect cocoa_bounds = NSMakeRect(real_bounds.x(), 0, real_bounds.width(), real_bounds.height()); @@ -255,8 +255,16 @@ bool BrowserWindowCocoa::IsMinimized() const { return [window() isMiniaturized]; } -void BrowserWindowCocoa::SetFullscreen(bool fullscreen) { - [controller_ setFullscreen:fullscreen]; +void BrowserWindowCocoa::EnterFullscreen(const GURL& url, bool ask_permission) { + [controller_ setFullscreen:YES + url:url + askPermission:ask_permission]; +} + +void BrowserWindowCocoa::ExitFullscreen() { + [controller_ setFullscreen:NO + url:GURL() + askPermission:NO]; } bool BrowserWindowCocoa::IsFullscreen() const { @@ -502,8 +510,12 @@ void BrowserWindowCocoa::OpenTabpose() { [controller_ openTabpose]; } -void BrowserWindowCocoa::SetPresentationMode(bool presentation_mode) { - [controller_ setPresentationMode:presentation_mode]; +void BrowserWindowCocoa::SetPresentationMode(bool presentation_mode, + const GURL& url, + bool ask_permission) { + [controller_ setPresentationMode:presentation_mode + url:url + askPermission:ask_permission]; } bool BrowserWindowCocoa::InPresentationMode() { |