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

Unified Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 1579813002: PoC: Using the toolkit-views fullscreen access bubble on Mac (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refine Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/cocoa/browser_window_controller_private.mm
diff --git a/chrome/browser/ui/cocoa/browser_window_controller_private.mm b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
index 5676d0a454d5cdb95a8035696a9394e431d2f2cf..31a7d4766b51171d340f3156da72faa1705177c6 100644
--- a/chrome/browser/ui/cocoa/browser_window_controller_private.mm
+++ b/chrome/browser/ui/cocoa/browser_window_controller_private.mm
@@ -23,6 +23,7 @@
#include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
#include "chrome/browser/ui/browser.h"
#include "chrome/browser/ui/browser_window_state.h"
+#import "chrome/browser/ui/cocoa/browser_window_cocoa.h"
#import "chrome/browser/ui/cocoa/browser_window_fullscreen_transition.h"
#import "chrome/browser/ui/cocoa/browser_window_layout.h"
#import "chrome/browser/ui/cocoa/constrained_window/constrained_window_sheet_controller.h"
@@ -636,21 +637,13 @@ willPositionSheet:(NSWindow*)sheet
// Show no exit instruction bubble on Mac when in Browser Fullscreen.
[self destroyFullscreenExitBubbleIfNecessary];
} else {
- [exclusiveAccessBubbleWindowController_ closeImmediately];
- exclusiveAccessBubbleWindowController_.reset(
- [[ExclusiveAccessBubbleWindowController alloc]
- initWithOwner:self
- exclusive_access_manager:browser_.get()->exclusive_access_manager()
- profile:browser_.get()->profile()
- url:fullscreenUrl_
- bubbleType:exclusiveAccessBubbleType_]);
- [exclusiveAccessBubbleWindowController_ showWindow];
+ exclusive_access_bubble_.reset(new ExclusiveAccessBubbleViews(
+ windowShim_.get(), fullscreenUrl_, exclusiveAccessBubbleType_));
}
}
- (void)destroyFullscreenExitBubbleIfNecessary {
- [exclusiveAccessBubbleWindowController_ closeImmediately];
- exclusiveAccessBubbleWindowController_.reset();
+ exclusive_access_bubble_.reset();
}
- (void)contentViewDidResize:(NSNotification*)notification {
@@ -1051,9 +1044,8 @@ willPositionSheet:(NSWindow*)sheet
positionFindBarViewAtMaxY:output.findBarMaxY
maxWidth:NSWidth(output.contentAreaFrame)];
- [exclusiveAccessBubbleWindowController_
- positionInWindowAtTop:output.fullscreenExitButtonMaxY
- width:NSWidth(output.contentAreaFrame)];
+ if (exclusive_access_bubble_)
+ exclusive_access_bubble_->RepositionIfVisible();
}
- (void)updateSubviewZOrder {
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller.mm ('k') | chrome/browser/ui/cocoa/exclusive_access_bubble_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698