| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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) |
| OLD | NEW |