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

Side by Side Diff: chrome/browser/ui/cocoa/browser_window_controller_private.mm

Issue 877413004: Refactor away the Browser* dependency in exclusive_access (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove Browser* dependency from ExclusiveAccess* in Cocoa. Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h" 5 #import "chrome/browser/ui/cocoa/browser_window_controller_private.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/mac/bind_objc_block.h" 10 #include "base/mac/bind_objc_block.h"
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 609
610 if (exclusiveAccessBubbleType_ == EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE || 610 if (exclusiveAccessBubbleType_ == EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE ||
611 exclusiveAccessBubbleType_ == 611 exclusiveAccessBubbleType_ ==
612 EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) { 612 EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) {
613 // Show no exit instruction bubble on Mac when in Browser Fullscreen. 613 // Show no exit instruction bubble on Mac when in Browser Fullscreen.
614 [self destroyFullscreenExitBubbleIfNecessary]; 614 [self destroyFullscreenExitBubbleIfNecessary];
615 } else { 615 } else {
616 [exclusiveAccessBubbleWindowController_ closeImmediately]; 616 [exclusiveAccessBubbleWindowController_ closeImmediately];
617 exclusiveAccessBubbleWindowController_.reset( 617 exclusiveAccessBubbleWindowController_.reset(
618 [[ExclusiveAccessBubbleWindowController alloc] 618 [[ExclusiveAccessBubbleWindowController alloc]
619 initWithOwner:self 619 initWithOwner:self
620 browser:browser_.get() 620 exclusive_access_manager:browser_.get()->exclusive_access_manager()
621 url:fullscreenUrl_ 621 profile:browser_.get()->profile()
622 bubbleType:exclusiveAccessBubbleType_]); 622 url:fullscreenUrl_
623 bubbleType:exclusiveAccessBubbleType_]);
623 [exclusiveAccessBubbleWindowController_ showWindow]; 624 [exclusiveAccessBubbleWindowController_ showWindow];
624 } 625 }
625 } 626 }
626 627
627 - (void)destroyFullscreenExitBubbleIfNecessary { 628 - (void)destroyFullscreenExitBubbleIfNecessary {
628 [exclusiveAccessBubbleWindowController_ closeImmediately]; 629 [exclusiveAccessBubbleWindowController_ closeImmediately];
629 exclusiveAccessBubbleWindowController_.reset(); 630 exclusiveAccessBubbleWindowController_.reset();
630 } 631 }
631 632
632 - (void)contentViewDidResize:(NSNotification*)notification { 633 - (void)contentViewDidResize:(NSNotification*)notification {
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1066 } 1067 }
1067 1068
1068 - (BOOL)shouldConstrainFrameRect { 1069 - (BOOL)shouldConstrainFrameRect {
1069 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained]) 1070 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained])
1070 return NO; 1071 return NO;
1071 1072
1072 return [super shouldConstrainFrameRect]; 1073 return [super shouldConstrainFrameRect];
1073 } 1074 }
1074 1075
1075 @end // @implementation BrowserWindowController(Private) 1076 @end // @implementation BrowserWindowController(Private)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698