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.h" | 5 #import "chrome/browser/ui/cocoa/browser_window_controller.h" |
6 | 6 |
7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
8 #import "base/memory/scoped_nsobject.h" | 8 #import "base/memory/scoped_nsobject.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "chrome/app/chrome_command_ids.h" | 10 #include "chrome/app/chrome_command_ids.h" |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
651 | 651 |
652 virtual void TearDown() { | 652 virtual void TearDown() { |
653 [controller_ close]; | 653 [controller_ close]; |
654 CocoaProfileTest::TearDown(); | 654 CocoaProfileTest::TearDown(); |
655 } | 655 } |
656 | 656 |
657 public: | 657 public: |
658 BrowserWindowController* controller_; | 658 BrowserWindowController* controller_; |
659 }; | 659 }; |
660 | 660 |
661 @interface BrowserWindowController (PrivateAPI) | |
662 - (BOOL)supportsFullscreen; | |
663 @end | |
664 | |
665 // Check if the window is front most or if one of its child windows (such | 661 // Check if the window is front most or if one of its child windows (such |
666 // as a status bubble) is front most. | 662 // as a status bubble) is front most. |
667 static bool IsFrontWindow(NSWindow *window) { | 663 static bool IsFrontWindow(NSWindow *window) { |
668 NSWindow* frontmostWindow = [[NSApp orderedWindows] objectAtIndex:0]; | 664 NSWindow* frontmostWindow = [[NSApp orderedWindows] objectAtIndex:0]; |
669 return [frontmostWindow isEqual:window] || | 665 return [frontmostWindow isEqual:window] || |
670 [[frontmostWindow parentWindow] isEqual:window]; | 666 [[frontmostWindow parentWindow] isEqual:window]; |
671 } | 667 } |
672 | 668 |
673 void WaitForFullScreenTransition() { | 669 void WaitForFullScreenTransition() { |
674 content::WindowedNotificationObserver observer( | 670 content::WindowedNotificationObserver observer( |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
730 testFullscreenWindow_.reset( | 726 testFullscreenWindow_.reset( |
731 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400) | 727 [[NSWindow alloc] initWithContentRect:NSMakeRect(0,0,400,400) |
732 styleMask:NSBorderlessWindowMask | 728 styleMask:NSBorderlessWindowMask |
733 backing:NSBackingStoreBuffered | 729 backing:NSBackingStoreBuffered |
734 defer:NO]); | 730 defer:NO]); |
735 return testFullscreenWindow_.get(); | 731 return testFullscreenWindow_.get(); |
736 } | 732 } |
737 @end | 733 @end |
738 | 734 |
739 /* TODO(???): test other methods of BrowserWindowController */ | 735 /* TODO(???): test other methods of BrowserWindowController */ |
OLD | NEW |