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

Issue 493143004: mac: Major fullscreen refactor. (Closed)

Created:
6 years, 4 months ago by erikchen
Modified:
6 years, 3 months ago
CC:
chromium-reviews
Project:
chromium
Visibility:
Public.

Description

mac: Major fullscreen refactor. The previous code was incorrectly documentated, and difficult to follow. I went through and renamed/redocumented all the methods to reflect their actual behavior. In the process, I determined that the behavior of the code had diverged from what the developers thought the code did. Full a full explanation, see http://crbug.com/406656 Functionally, this fixed several bugs: - Attempting to fullscreen HTML5 content with --enable-simplified-fullscreen caused UI problems. - Omnibox/toolbar did not slide in "system fullscreen" From a refactor standpoint: - Deleted FullscreenModeController. - May want to consider replacing logic in PresentationModeController to use Carbon sliding menu bar callbacks. - External (outside of BWC) invocations of fullscreen mode are much simpler. - Significant code reduction in BWC. There was an intense amount of duplicate logic, checking for "presentation_mode" (which had different meanings in different contexts), checking for the simplified fullscreen flag (tightly coupled, fragile logic) which was removed. - Code in BWC_Private got moved around a bit, but there is minimal new logic. I was not able to make this refactor any smaller, since the previous logic was very tightly coupled. BUG=406656, 405561

Patch Set 1 : #

Patch Set 2 : Rebase against top of tree (e8d91bdd8edba0a5b10656758bbbb4860f228bdd) #

Patch Set 3 : Fix 2 minor bugs, remove 2 unit tests that no longer test anything. #

Total comments: 20

Patch Set 4 : Respond to rsesek comments. #

Total comments: 16

Patch Set 5 : Rebase against top of tree. #

Patch Set 6 : Address comments from rsesek. #

Patch Set 7 : Fix unit tests. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+417 lines, -626 lines) Patch
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 4 chunks +5 lines, -21 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa_unittest.mm View 1 2 1 chunk +0 lines, -65 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 3 4 5 6 chunks +103 lines, -26 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 9 chunks +62 lines, -125 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.h View 1 2 3 4 3 chunks +18 lines, -12 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.mm View 1 2 3 4 5 23 chunks +216 lines, -128 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_unittest.mm View 1 2 3 4 5 6 3 chunks +8 lines, -8 lines 0 comments Download
D chrome/browser/ui/cocoa/fullscreen_mode_controller.h View 1 chunk +0 lines, -64 lines 0 comments Download
D chrome/browser/ui/cocoa/fullscreen_mode_controller.mm View 1 chunk +0 lines, -173 lines 0 comments Download
M chrome/browser/ui/cocoa/location_bar/autocomplete_text_field_editor.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/presentation_mode_controller.h View 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/tabs/tab_strip_controller.mm View 1 2 3 4 1 chunk +1 line, -1 line 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 1 chunk +0 lines, -2 lines 0 comments Download

Messages

Total messages: 18 (2 generated)
erikchen
rohitrao, rsesek: Since neither of you work on chrome mac, I don't know which person ...
6 years, 4 months ago (2014-08-23 01:13:31 UTC) #1
Robert Sesek
I wanted to patch this in to just get a sense of the behavior before ...
6 years, 3 months ago (2014-08-25 15:28:54 UTC) #2
erikchen
rsesek: I've rebased the change against top of tree. (a CL landed this morning which ...
6 years, 3 months ago (2014-08-25 18:05:54 UTC) #3
erikchen
rsesek: ping
6 years, 3 months ago (2014-08-26 17:19:06 UTC) #4
Robert Sesek
I definitely want Rohit to take a look at this, but these are some initial ...
6 years, 3 months ago (2014-08-27 22:04:30 UTC) #5
erikchen
Patchset #4 (id:140001) has been deleted
6 years, 3 months ago (2014-08-28 00:29:35 UTC) #6
erikchen
On 2014/08/27 22:04:30, rsesek wrote: > I definitely want Rohit to take a look at ...
6 years, 3 months ago (2014-08-28 00:50:11 UTC) #7
erikchen
rohitrao: Please review. rsesek: PTAL https://codereview.chromium.org/493143004/diff/120001/chrome/browser/ui/cocoa/browser_window_controller.h File chrome/browser/ui/cocoa/browser_window_controller.h (right): https://codereview.chromium.org/493143004/diff/120001/chrome/browser/ui/cocoa/browser_window_controller.h#newcode63 chrome/browser/ui/cocoa/browser_window_controller.h:63: OMNIBOX_PRESENT, // Tab strip ...
6 years, 3 months ago (2014-08-28 00:50:28 UTC) #8
erikchen
https://codereview.chromium.org/493143004/diff/160001/chrome/browser/ui/cocoa/browser_window_controller.mm File chrome/browser/ui/cocoa/browser_window_controller.mm (right): https://codereview.chromium.org/493143004/diff/160001/chrome/browser/ui/cocoa/browser_window_controller.mm#newcode2083 chrome/browser/ui/cocoa/browser_window_controller.mm:2083: //[presentationModeController_ inPresentationMode]); comment to self: oops, remove this.
6 years, 3 months ago (2014-08-28 17:33:58 UTC) #9
rohitrao (ping after 24h)
This looks ok to me. I agree that the naming is confusing. The comment helps, ...
6 years, 3 months ago (2014-08-29 19:34:13 UTC) #10
erikchen
rsesek: Please review. :D
6 years, 3 months ago (2014-08-29 19:54:46 UTC) #11
Robert Sesek
I don't really want to review this again, so LGTM :-D. https://codereview.chromium.org/493143004/diff/160001/chrome/browser/ui/cocoa/browser_window_controller.h File chrome/browser/ui/cocoa/browser_window_controller.h (right): ...
6 years, 3 months ago (2014-08-29 20:22:42 UTC) #12
Robert Sesek
On 2014/08/29 19:34:13, rohitrao wrote: > This looks ok to me. I agree that the ...
6 years, 3 months ago (2014-08-29 20:23:35 UTC) #13
erikchen
https://codereview.chromium.org/493143004/diff/160001/chrome/browser/ui/cocoa/browser_window_controller.h File chrome/browser/ui/cocoa/browser_window_controller.h (right): https://codereview.chromium.org/493143004/diff/160001/chrome/browser/ui/cocoa/browser_window_controller.h#newcode480 chrome/browser/ui/cocoa/browser_window_controller.h:480: // - OMNIBOX_PRESENT. Can be with either fullscreen API. ...
6 years, 3 months ago (2014-08-29 20:50:38 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/erikchen@chromium.org/493143004/220001
6 years, 3 months ago (2014-09-02 20:36:28 UTC) #16
erikchen
6 years, 3 months ago (2014-09-04 17:12:37 UTC) #18
Message was sent while issue was closed.
This CL was merged into
https://codereview.chromium.org/533383002/

Powered by Google App Engine
This is Rietveld 408576698