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

Issue 877413004: Refactor away the Browser* dependency in exclusive_access (Closed)

Created:
5 years, 10 months ago by Sriram
Modified:
5 years, 9 months ago
Reviewers:
scheib, benwells, miu, sky
CC:
chromium-reviews, tfarina, scheib+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Refactor away the Browser* dependency in exclusive_access This change is needed to support the use of the exclusive access bubble from extensions. There are two scenarios under which the bubble will be used to: - Display the bubble when keyboard lock is in effect. - Display the fullscreen/mouse lock UI from Hosted app (not hooked up in this CL). Exclusive access controllers such as fullscreen and mouse lock are updated to no longer access Browser* object directly, but instead use new ExclusiveAccessContext and ExclusiveAccessBubbleViewsContext interfaces. These are implemented by BrowserView and will in the future be implemented by NativeAppWindow. Committed: https://crrev.com/39b6b787e7c4cbcecf1c9be40e9f47b76cd3c14b Cr-Commit-Position: refs/heads/master@{#318965}

Patch Set 1 #

Patch Set 2 : Fix build breaks #

Patch Set 3 : Remove Browser* dependency from ExclusiveAccess* in Cocoa. #

Total comments: 8

Patch Set 4 : Sync to TOT #

Patch Set 5 : Update based on CR comments #

Total comments: 18

Patch Set 6 : Updated based on Vincent's comments. #

Total comments: 2

Patch Set 7 : Rename toggle fullscreen function #

Total comments: 24

Patch Set 8 : Updated based on CR comments #

Patch Set 9 : Fix test build break #

Patch Set 10 : Fix unit test failure #

Patch Set 11 : Fix unit test failure and implement ExclusiveAccessContext for cocoa #

Patch Set 12 : Fix broken mac change #

Unified diffs Side-by-side diffs Delta from patch set Stats (+536 lines, -189 lines) Patch
M chrome/browser/ui/browser.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -1 line 0 comments Download
M chrome/browser/ui/browser_command_controller_unittest.cc View 1 2 3 4 5 6 7 8 9 10 4 chunks +33 lines, -3 lines 0 comments Download
M chrome/browser/ui/browser_window.h View 1 2 3 4 3 chunks +5 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +14 lines, -5 lines 0 comments Download
M chrome/browser/ui/cocoa/browser_window_cocoa.mm View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +24 lines, -1 line 0 comments Download
M chrome/browser/ui/cocoa/browser_window_controller_private.mm View 1 2 3 1 chunk +5 lines, -4 lines 0 comments Download
M chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.h View 1 2 3 3 chunks +10 lines, -8 lines 0 comments Download
M chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller.mm View 1 2 3 6 chunks +16 lines, -13 lines 0 comments Download
M chrome/browser/ui/cocoa/exclusive_access_bubble_window_controller_unittest.mm View 1 2 3 2 chunks +17 lines, -13 lines 0 comments Download
M chrome/browser/ui/exclusive_access/exclusive_access_bubble.h View 1 2 3 4 5 6 7 4 chunks +5 lines, -5 lines 0 comments Download
M chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc View 1 2 3 4 5 6 7 3 chunks +9 lines, -11 lines 0 comments Download
A chrome/browser/ui/exclusive_access/exclusive_access_context.h View 1 2 3 4 5 6 7 1 chunk +80 lines, -0 lines 0 comments Download
A chrome/browser/ui/exclusive_access/exclusive_access_context.cc View 1 2 3 4 5 1 chunk +33 lines, -0 lines 0 comments Download
M chrome/browser/ui/exclusive_access/exclusive_access_controller_base.h View 4 chunks +2 lines, -11 lines 0 comments Download
M chrome/browser/ui/exclusive_access/exclusive_access_controller_base.cc View 1 chunk +2 lines, -7 lines 0 comments Download
M chrome/browser/ui/exclusive_access/exclusive_access_manager.h View 1 2 3 4 5 6 7 4 chunks +7 lines, -3 lines 0 comments Download
M chrome/browser/ui/exclusive_access/exclusive_access_manager.cc View 1 2 3 4 5 6 3 chunks +13 lines, -5 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller.cc View 1 2 3 4 5 6 7 16 chunks +59 lines, -51 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller_state_test.cc View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
M chrome/browser/ui/exclusive_access/fullscreen_controller_state_unittest.cc View 1 2 3 4 5 6 7 8 9 10 6 chunks +40 lines, -3 lines 0 comments Download
M chrome/browser/ui/exclusive_access/mouse_lock_controller.h View 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/ui/exclusive_access/mouse_lock_controller.cc View 1 2 3 4 5 6 7 4 chunks +12 lines, -6 lines 0 comments Download
M chrome/browser/ui/views/exclusive_access_bubble_views.h View 1 2 3 4 5 6 7 3 chunks +3 lines, -3 lines 0 comments Download
M chrome/browser/ui/views/exclusive_access_bubble_views.cc View 1 2 3 4 5 6 7 14 chunks +27 lines, -23 lines 0 comments Download
A chrome/browser/ui/views/exclusive_access_bubble_views_context.h View 1 2 3 4 5 6 7 1 chunk +35 lines, -0 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.h View 1 2 3 4 5 6 7 6 chunks +22 lines, -5 lines 0 comments Download
M chrome/browser/ui/views/frame/browser_view.cc View 1 2 3 4 5 6 7 4 chunks +45 lines, -2 lines 0 comments Download
M chrome/chrome_browser_ui.gypi View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +3 lines, -0 lines 0 comments Download
M chrome/test/base/test_browser_window.h View 1 2 3 4 2 chunks +2 lines, -1 line 0 comments Download
M chrome/test/base/test_browser_window.cc View 1 2 3 4 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (4 generated)
Sriram
5 years, 10 months ago (2015-01-31 00:25:05 UTC) #2
chromium-reviews
Ping. On Jan 30, 2015 4:25 PM, <sriramsr@chromium.org> wrote: > Reviewers: miu, scheib OOO until ...
5 years, 10 months ago (2015-02-03 01:37:09 UTC) #3
miu
I like the idea of accessing Browser or AppWindow via ExclusiveAccessManager, but I don't see ...
5 years, 10 months ago (2015-02-03 05:09:39 UTC) #4
scheib
Some level of indirection is warranted. This patch's ExclusiveAccessContext seems fine, but an interface that ...
5 years, 10 months ago (2015-02-10 00:16:43 UTC) #5
scheib
I think you should put this patch on hold until you have a larger patch ...
5 years, 10 months ago (2015-02-10 23:12:03 UTC) #6
Sriram
But I cannot use it in AppWindow unless I move the code to component which ...
5 years, 10 months ago (2015-02-10 23:44:39 UTC) #7
Sriram
https://codereview.chromium.org/877413004/diff/40001/chrome/browser/ui/exclusive_access/exclusive_access_context.h File chrome/browser/ui/exclusive_access/exclusive_access_context.h (right): https://codereview.chromium.org/877413004/diff/40001/chrome/browser/ui/exclusive_access/exclusive_access_context.h#newcode19 chrome/browser/ui/exclusive_access/exclusive_access_context.h:19: class ExclusiveAccessContext { Yuri had same suggestion. It would ...
5 years, 10 months ago (2015-02-10 23:44:46 UTC) #8
scheib
On 2015/02/10 23:44:39, Sriram wrote: > But I cannot use it in AppWindow unless I ...
5 years, 10 months ago (2015-02-11 00:05:55 UTC) #9
miu
On 2015/02/11 00:05:55, scheib wrote: > On 2015/02/10 23:44:39, Sriram wrote: > Create a larger ...
5 years, 10 months ago (2015-02-11 00:36:59 UTC) #10
Sriram
Turns out that I needed the exit bubble/controller from chrome/browser/ui/views/apps and do there was no ...
5 years, 10 months ago (2015-02-25 00:41:23 UTC) #12
Sriram
This is the CL that is to be reviewed and others are just to show ...
5 years, 10 months ago (2015-02-25 00:51:08 UTC) #13
Sriram
5 years, 10 months ago (2015-02-25 00:52:16 UTC) #14
Sriram
On 2015/02/25 00:52:16, Sriram wrote: Update since last review: 1. Removed separate objects that where ...
5 years, 10 months ago (2015-02-25 17:55:01 UTC) #15
scheib
In change description: > This change is needed to support the use of the exclusive ...
5 years, 10 months ago (2015-02-25 19:30:13 UTC) #16
Sriram
https://codereview.chromium.org/877413004/diff/80001/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc File chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc (right): https://codereview.chromium.org/877413004/diff/80001/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc#newcode117 chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc:117: void ExclusiveAccessBubble::ToggleFullscreen() { On 2015/02/25 19:30:13, scheib wrote: > ...
5 years, 10 months ago (2015-02-25 21:53:27 UTC) #17
scheib
lgtm with a few changes: Fix ToggleFullscreen() as per comment. Fix the change description line ...
5 years, 10 months ago (2015-02-25 22:31:51 UTC) #18
Sriram
https://codereview.chromium.org/877413004/diff/80001/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc File chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc (right): https://codereview.chromium.org/877413004/diff/80001/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc#newcode117 chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc:117: void ExclusiveAccessBubble::ToggleFullscreen() { On 2015/02/25 22:31:51, scheib wrote: > ...
5 years, 10 months ago (2015-02-25 23:15:59 UTC) #19
Sriram
On 2015/02/25 23:15:59, Sriram wrote: > https://codereview.chromium.org/877413004/diff/80001/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc > File chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc (right): > > https://codereview.chromium.org/877413004/diff/80001/chrome/browser/ui/exclusive_access/exclusive_access_bubble.cc#newcode117 > ...
5 years, 10 months ago (2015-02-25 23:16:38 UTC) #20
sky
https://codereview.chromium.org/877413004/diff/120001/chrome/browser/ui/browser_window.h File chrome/browser/ui/browser_window.h (right): https://codereview.chromium.org/877413004/diff/120001/chrome/browser/ui/browser_window.h#newcode400 chrome/browser/ui/browser_window.h:400: virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0; Does BrowserWindowCocoa implement this? ...
5 years, 10 months ago (2015-02-26 18:29:20 UTC) #21
miu
https://codereview.chromium.org/877413004/diff/120001/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h File chrome/browser/ui/exclusive_access/exclusive_access_bubble.h (right): https://codereview.chromium.org/877413004/diff/120001/chrome/browser/ui/exclusive_access/exclusive_access_bubble.h#newcode89 chrome/browser/ui/exclusive_access/exclusive_access_bubble.h:89: ExclusiveAccessManager* manager_; nit: ExclusiveAccessManager* const manager_; Since this member ...
5 years, 10 months ago (2015-02-26 20:07:58 UTC) #22
Sriram
https://codereview.chromium.org/877413004/diff/120001/chrome/browser/ui/browser_window.h File chrome/browser/ui/browser_window.h (right): https://codereview.chromium.org/877413004/diff/120001/chrome/browser/ui/browser_window.h#newcode400 chrome/browser/ui/browser_window.h:400: virtual ExclusiveAccessContext* GetExclusiveAccessContext() = 0; On 2015/02/26 18:29:20, sky ...
5 years, 9 months ago (2015-02-26 23:58:03 UTC) #23
miu
lgtm
5 years, 9 months ago (2015-02-27 00:38:11 UTC) #24
sky
LGTM
5 years, 9 months ago (2015-02-27 15:57:18 UTC) #25
Sriram
On 2015/02/27 15:57:18, sky wrote: > LGTM I had to update the patch with following ...
5 years, 9 months ago (2015-03-03 19:28:16 UTC) #26
sky
SLGTM
5 years, 9 months ago (2015-03-03 20:16:03 UTC) #27
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/877413004/220001
5 years, 9 months ago (2015-03-03 21:08:35 UTC) #30
commit-bot: I haz the power
Committed patchset #12 (id:220001)
5 years, 9 months ago (2015-03-04 00:03:41 UTC) #31
commit-bot: I haz the power
5 years, 9 months ago (2015-03-04 00:05:22 UTC) #32
Message was sent while issue was closed.
Patchset 12 (id:??) landed as
https://crrev.com/39b6b787e7c4cbcecf1c9be40e9f47b76cd3c14b
Cr-Commit-Position: refs/heads/master@{#318965}

Powered by Google App Engine
This is Rietveld 408576698