| 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 599 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 | 610 |
| 611 if (exclusiveAccessBubbleType_ == EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE || | 611 if (exclusiveAccessBubbleType_ == EXCLUSIVE_ACCESS_BUBBLE_TYPE_NONE || |
| 612 exclusiveAccessBubbleType_ == | 612 exclusiveAccessBubbleType_ == |
| 613 EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) { | 613 EXCLUSIVE_ACCESS_BUBBLE_TYPE_BROWSER_FULLSCREEN_EXIT_INSTRUCTION) { |
| 614 // Show no exit instruction bubble on Mac when in Browser Fullscreen. | 614 // Show no exit instruction bubble on Mac when in Browser Fullscreen. |
| 615 [self destroyFullscreenExitBubbleIfNecessary]; | 615 [self destroyFullscreenExitBubbleIfNecessary]; |
| 616 } else { | 616 } else { |
| 617 [exclusiveAccessBubbleWindowController_ closeImmediately]; | 617 [exclusiveAccessBubbleWindowController_ closeImmediately]; |
| 618 exclusiveAccessBubbleWindowController_.reset( | 618 exclusiveAccessBubbleWindowController_.reset( |
| 619 [[ExclusiveAccessBubbleWindowController alloc] | 619 [[ExclusiveAccessBubbleWindowController alloc] |
| 620 initWithOwner:self | 620 initWithOwner:self |
| 621 browser:browser_.get() | 621 exclusive_access_manager:browser_.get()->exclusive_access_manager() |
| 622 url:fullscreenUrl_ | 622 profile:browser_.get()->profile() |
| 623 bubbleType:exclusiveAccessBubbleType_]); | 623 url:fullscreenUrl_ |
| 624 bubbleType:exclusiveAccessBubbleType_]); |
| 624 [exclusiveAccessBubbleWindowController_ showWindow]; | 625 [exclusiveAccessBubbleWindowController_ showWindow]; |
| 625 } | 626 } |
| 626 } | 627 } |
| 627 | 628 |
| 628 - (void)destroyFullscreenExitBubbleIfNecessary { | 629 - (void)destroyFullscreenExitBubbleIfNecessary { |
| 629 [exclusiveAccessBubbleWindowController_ closeImmediately]; | 630 [exclusiveAccessBubbleWindowController_ closeImmediately]; |
| 630 exclusiveAccessBubbleWindowController_.reset(); | 631 exclusiveAccessBubbleWindowController_.reset(); |
| 631 } | 632 } |
| 632 | 633 |
| 633 - (void)contentViewDidResize:(NSNotification*)notification { | 634 - (void)contentViewDidResize:(NSNotification*)notification { |
| (...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1087 } | 1088 } |
| 1088 | 1089 |
| 1089 - (BOOL)shouldConstrainFrameRect { | 1090 - (BOOL)shouldConstrainFrameRect { |
| 1090 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained]) | 1091 if ([enterFullscreenTransition_ shouldWindowBeUnconstrained]) |
| 1091 return NO; | 1092 return NO; |
| 1092 | 1093 |
| 1093 return [super shouldConstrainFrameRect]; | 1094 return [super shouldConstrainFrameRect]; |
| 1094 } | 1095 } |
| 1095 | 1096 |
| 1096 @end // @implementation BrowserWindowController(Private) | 1097 @end // @implementation BrowserWindowController(Private) |
| OLD | NEW |