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

Issue 7890056: FullscreenExitBubble temp UI for Mac. (Closed)

Created:
9 years, 3 months ago by jeremya
Modified:
9 years, 3 months ago
Reviewers:
Nico
CC:
chromium-reviews, gregsimon
Visibility:
Public.

Description

Implement a bubble that appears at the top of the screen when a tab enters fullscreen mode via webkitRequestFullScreen(), telling the user how to exit fullscreen. This is implemented as an NSView rather than an NSWindow because the floating chrome that appears in presentation mode should overlap the bubble. Content-initiated fullscreen mode makes use of 'presentation mode' on the Mac: the mode in which the UI is hidden, accessible by moving the cursor to the top of the screen. On Snow Leopard, this mode is synonymous with fullscreen mode. On Lion, however, fullscreen mode does not imply presentation mode: in non-presentation fullscreen mode, the chrome is permanently shown. It is possible to switch between presentation mode and fullscreen mode using the presentation mode UI control. When a tab initiates fullscreen mode on Lion, we enter presentation mode if not in presentation mode already. When the user exits fullscreen mode using Chrome UI (i.e. keyboard shortcuts, menu items, buttons, switching tabs, etc.) we return the user to the mode they were in before the tab entered fullscreen. BUG=14471 TEST=Enter fullscreen mode using webkitRequestFullScreen. You should see a bubble pop down from the top of the screen. Need to test the Lion logic somehow, with no Lion trybots. BUG=96883

Patch Set 1 #

Total comments: 1

Patch Set 2 : fix size calc a bit #

Patch Set 3 : ready for review #

Total comments: 66

Patch Set 4 : review comments #

Patch Set 5 : add test #

Total comments: 10

Patch Set 6 : changes for lion #

Patch Set 7 : oops, syntax error #

Patch Set 8 : fix build on linux #

Total comments: 2

Patch Set 9 : browser tests #

Total comments: 2

Patch Set 10 : remove lion test; comments. #

Patch Set 11 : doh #

Patch Set 12 : fix build on mac #

Patch Set 13 : fix url? #

Unified diffs Side-by-side diffs Delta from patch set Stats (+1682 lines, -12 lines) Patch
A chrome/app/nibs/FullscreenExitBubble.xib View 1 2 1 chunk +1122 lines, -0 lines 0 comments Download
M chrome/browser/ui/browser.h View 1 2 3 4 5 6 7 8 9 3 chunks +8 lines, -2 lines 0 comments Download
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 2 chunks +20 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser_browsertest.cc View 1 2 3 4 5 6 7 8 9 2 chunks +33 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 3 4 5 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 4 chunks +17 lines, -6 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.h View 1 2 3 4 5 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.mm View 1 2 3 4 5 3 chunks +28 lines, -1 line 0 comments Download
A chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +46 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.mm View 1 2 3 4 5 1 chunk +208 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +73 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/fullscreen_exit_bubble_view.h View 1 2 3 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/fullscreen_exit_bubble_view.mm View 1 2 3 1 chunk +92 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/chrome_dll.gypi View 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
jeremya
http://codereview.chromium.org/7890056/diff/1/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.mm File chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.mm (right): http://codereview.chromium.org/7890056/diff/1/chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.mm#newcode402 chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller.mm:402: NSLog(@"%f", [[self view] frame].size.width); here
9 years, 3 months ago (2011-09-14 22:56:48 UTC) #1
Nico
I felt nitpicky, sorry. Great start! Can you add a test for the bubble controller? ...
9 years, 3 months ago (2011-09-15 04:37:32 UTC) #2
jeremya
Test incoming tomorrow morning. Meanwhile, here are the other changes you requested. http://codereview.chromium.org/7890056/diff/4001/chrome/browser/ui/browser.h File chrome/browser/ui/browser.h ...
9 years, 3 months ago (2011-09-15 06:33:28 UTC) #3
jeremya
I've added a test.
9 years, 3 months ago (2011-09-15 18:35:41 UTC) #4
Nico
Style-wise this is all good. I'm pretty sure this is buggy in some way on ...
9 years, 3 months ago (2011-09-15 20:09:14 UTC) #5
jeremya
Changed things around a bit to get things to work on Lion. http://codereview.chromium.org/7890056/diff/8001/chrome/browser/ui/browser.h File chrome/browser/ui/browser.h ...
9 years, 3 months ago (2011-09-16 03:39:58 UTC) #6
Nico
http://codereview.chromium.org/7890056/diff/14001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7890056/diff/14001/chrome/browser/ui/browser.cc#newcode3849 chrome/browser/ui/browser.cc:3849: #if defined(OS_MACOSX) So the mode on OS X where ...
9 years, 3 months ago (2011-09-16 17:20:43 UTC) #7
jeremya
I've added browser tests for Lion fullscreen/presentation mode behaviour. http://codereview.chromium.org/7890056/diff/14001/chrome/browser/ui/browser.cc File chrome/browser/ui/browser.cc (right): http://codereview.chromium.org/7890056/diff/14001/chrome/browser/ui/browser.cc#newcode3849 chrome/browser/ui/browser.cc:3849: ...
9 years, 3 months ago (2011-09-16 18:16:52 UTC) #8
Nico
http://codereview.chromium.org/7890056/diff/11018/chrome/browser/ui/browser_browsertest.cc File chrome/browser/ui/browser_browsertest.cc (right): http://codereview.chromium.org/7890056/diff/11018/chrome/browser/ui/browser_browsertest.cc#newcode863 chrome/browser/ui/browser_browsertest.cc:863: return; This is mostly useless, since we don't have ...
9 years, 3 months ago (2011-09-16 18:18:46 UTC) #9
Nico
9 years, 3 months ago (2011-09-16 18:24:05 UTC) #10
LGTM with a better CL description.
* More details on what, why
* Justification why view, not subwindow (overlay needs to be able to overlap it)
* Description of the various behaviors on 10.6, 10.7

http://codereview.chromium.org/7890056/diff/11018/chrome/browser/ui/cocoa/ful...
File chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm
(right):

http://codereview.chromium.org/7890056/diff/11018/chrome/browser/ui/cocoa/ful...
chrome/browser/ui/cocoa/fullscreen_exit_bubble_controller_unittest.mm:70:
EXPECT_TRUE([cmd_shift_f_text isEqualToString:cmd_F_text]);
EXPECT_NSEQ

Powered by Google App Engine
This is Rietveld 408576698