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

Issue 1650483002: Refactor: Untangle Mac's ExclusiveAccessContext from BrowserWindow (Closed)

Created:
4 years, 10 months ago by tapted
Modified:
4 years, 10 months ago
Reviewers:
scheib, spqchan, sky
CC:
chromium-reviews, tfarina, chrome-apps-syd-reviews_chromium.org, Matt Giuca
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor: Untangle Mac's ExclusiveAccessContext from BrowserWindow This is a pure refactor CL. One problem: BrowserWindowCocoa (and views' BrowserView) multiply-inherit from BrowserWindow and ExclusiveAccessContext. BW and EAC declare some of the same methods, so it gets weird. Let's fix that. Then, toolkit-views has the "simplified fullscreen UI" implemented. It works fine on Mac, but BrowserWindowCocoa has lots of dependencies and we don't want to add more. Instead, start by decoupling Mac's ExclusiveAccessContext implementation from BrowserWindowCocoa into its own class, ExclusiveAccessController. This wraps and manages the ephemeral fullscreen bubble window which, for Cocoa, is a ExclusiveAccessBubbleWindowController. A follow-up CL will allow ExclusiveAccessController to pick between a Cocoa bubble and a toolkit-views bubble at runtime. BUG=352425 Committed: https://crrev.com/8d830c628767a7d2327a006f1d033b1d03cd070c Cr-Commit-Position: refs/heads/master@{#373125}

Patch Set 1 : views and Cocoa working via #define disentangle, ecapsulate #

Patch Set 2 : Defer the views-bubble stuff. Refactor first. #

Patch Set 3 : self nits, More robust interface, fix other random stuff #

Total comments: 8

Patch Set 4 : Respond to comments #

Patch Set 5 : restore !! for windows #

Patch Set 6 : setBounds wants to access the fullscren controller #

Total comments: 6

Patch Set 7 : scheib comments #

Total comments: 2

Patch Set 8 : rename accessor #

Unified diffs Side-by-side diffs Delta from patch set Stats (+290 lines, -244 lines) Patch
M chrome/browser/ui/browser_window.h View 1 chunk +0 lines, -9 lines 0 comments Download
M chrome/browser/ui/cocoa/applescript/window_applescript.mm View 1 chunk +3 lines, -1 line 0 comments Download
A chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.h View 1 2 3 4 5 6 1 chunk +83 lines, -0 lines 0 comments Download
A chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.mm View 1 2 3 4 5 6 1 chunk +121 lines, -0 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 4 chunks +0 lines, -21 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 7 7 chunks +5 lines, -73 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_command_handler.mm View 1 1 chunk +3 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.h View 1 2 3 4 5 6 7 8 chunks +10 lines, -19 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller.mm View 1 2 3 4 5 6 7 7 chunks +16 lines, -19 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.h View 1 chunk +0 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.mm View 1 2 4 chunks +12 lines, -24 lines 0 comments Download
M chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.h View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm View 1 2 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller_unittest.mm View 1 2 3 4 5 6 7 2 chunks +6 lines, -5 lines 0 comments Download
M chrome/browser/ui/exclusive_access/exclusive_access_context.h View 1 2 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/exclusive_access/exclusive_access_context.cc View 1 2 3 chunks +7 lines, -8 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller_interactive_browsertest.cc View 1 5 chunks +11 lines, -6 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc View 4 2 chunks +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 chunk +0 lines, -22 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/test/base/test_browser_window.h View 1 chunk +0 lines, -5 lines 0 comments Download
M chrome/test/base/test_browser_window.cc View 1 chunk +0 lines, -17 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 30 (16 generated)
tapted
Hi Sarah, could you please review before I send off to OWNERS. (The follow-up that ...
4 years, 10 months ago (2016-02-01 07:25:08 UTC) #12
spqchan
It's great to see that this is getting refactored! The code has been getting needlessly ...
4 years, 10 months ago (2016-02-01 19:55:05 UTC) #13
tapted
https://codereview.chromium.org/1650483002/diff/220001/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.h File chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.h (right): https://codereview.chromium.org/1650483002/diff/220001/chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.h#newcode48 chrome/browser/ui/cocoa/browser/exclusive_access_controller_views.h:48: bool IsFullscreen() const override; On 2016/02/01 19:55:04, spqchan wrote: ...
4 years, 10 months ago (2016-02-02 11:57:06 UTC) #14
tapted
https://codereview.chromium.org/1650483002/diff/220001/chrome/browser/ui/cocoa/browser_window_cocoa.mm File chrome/browser/ui/cocoa/browser_window_cocoa.mm (right): https://codereview.chromium.org/1650483002/diff/220001/chrome/browser/ui/cocoa/browser_window_cocoa.mm#newcode209 chrome/browser/ui/cocoa/browser_window_cocoa.mm:209: [controller_ exitAnyFullscreen]; On 2016/02/02 11:57:06, tapted wrote: > On ...
4 years, 10 months ago (2016-02-02 21:58:43 UTC) #15
spqchan
LGTM https://codereview.chromium.org/1650483002/diff/220001/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc File chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc (right): https://codereview.chromium.org/1650483002/diff/220001/chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc#newcode749 chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc:749: EXPECT_EQ(context->IsFullscreenWithToolbar(), !!fullscreen_with_toolbar) On 2016/02/02 11:57:06, tapted wrote: > ...
4 years, 10 months ago (2016-02-02 22:10:05 UTC) #16
tapted
+scheib,sky for OWNERS scheib for chrome/browser/ui/exclusive_access/* sky for c/b/ui/views, c/b/test, and browser_window.h [just deleting stuff ...
4 years, 10 months ago (2016-02-02 22:16:59 UTC) #18
scheib
LGTM with comment fix and I think avoiding the need for a static_cast (see comments). ...
4 years, 10 months ago (2016-02-02 23:14:41 UTC) #19
tapted
On 2016/02/02 23:14:41, scheib wrote: > LGTM with comment fix and I think avoiding the ...
4 years, 10 months ago (2016-02-02 23:55:23 UTC) #20
scheib
Thanks https://codereview.chromium.org/1650483002/diff/300001/chrome/browser/ui/cocoa/browser_window_controller.h File chrome/browser/ui/cocoa/browser_window_controller.h (right): https://codereview.chromium.org/1650483002/diff/300001/chrome/browser/ui/cocoa/browser_window_controller.h#newcode590 chrome/browser/ui/cocoa/browser_window_controller.h:590: - (ExclusiveAccessController*)exclusiveAccessContext; Accessor name should probably follow type ...
4 years, 10 months ago (2016-02-03 00:12:16 UTC) #21
tapted
https://codereview.chromium.org/1650483002/diff/300001/chrome/browser/ui/cocoa/browser_window_controller.h File chrome/browser/ui/cocoa/browser_window_controller.h (right): https://codereview.chromium.org/1650483002/diff/300001/chrome/browser/ui/cocoa/browser_window_controller.h#newcode590 chrome/browser/ui/cocoa/browser_window_controller.h:590: - (ExclusiveAccessController*)exclusiveAccessContext; On 2016/02/03 00:12:16, scheib wrote: > Accessor ...
4 years, 10 months ago (2016-02-03 00:19:45 UTC) #22
sky
LGTM
4 years, 10 months ago (2016-02-03 00:42:35 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1650483002/320001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1650483002/320001
4 years, 10 months ago (2016-02-03 01:39:00 UTC) #26
commit-bot: I haz the power
Committed patchset #8 (id:320001)
4 years, 10 months ago (2016-02-03 02:24:44 UTC) #28
commit-bot: I haz the power
4 years, 10 months ago (2016-02-03 02:25:27 UTC) #30
Message was sent while issue was closed.
Patchset 8 (id:??) landed as
https://crrev.com/8d830c628767a7d2327a006f1d033b1d03cd070c
Cr-Commit-Position: refs/heads/master@{#373125}

Powered by Google App Engine
This is Rietveld 408576698