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 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/ui/cocoa/browser_window_cocoa.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/mac/mac_util.h" | 10 #include "base/mac/mac_util.h" |
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 } | 593 } |
594 | 594 |
595 void BrowserWindowCocoa::Copy() { | 595 void BrowserWindowCocoa::Copy() { |
596 [NSApp sendAction:@selector(copy:) to:nil from:nil]; | 596 [NSApp sendAction:@selector(copy:) to:nil from:nil]; |
597 } | 597 } |
598 | 598 |
599 void BrowserWindowCocoa::Paste() { | 599 void BrowserWindowCocoa::Paste() { |
600 [NSApp sendAction:@selector(paste:) to:nil from:nil]; | 600 [NSApp sendAction:@selector(paste:) to:nil from:nil]; |
601 } | 601 } |
602 | 602 |
603 void BrowserWindowCocoa::OpenTabpose() { | |
604 [controller_ openTabpose]; | |
605 } | |
606 | |
607 void BrowserWindowCocoa::EnterFullscreenWithChrome() { | 603 void BrowserWindowCocoa::EnterFullscreenWithChrome() { |
608 // This method cannot be called if simplified fullscreen is enabled. | 604 // This method cannot be called if simplified fullscreen is enabled. |
609 const CommandLine* command_line = CommandLine::ForCurrentProcess(); | 605 const CommandLine* command_line = CommandLine::ForCurrentProcess(); |
610 DCHECK(!command_line->HasSwitch(switches::kEnableSimplifiedFullscreen)); | 606 DCHECK(!command_line->HasSwitch(switches::kEnableSimplifiedFullscreen)); |
611 | 607 |
612 CHECK(chrome::mac::SupportsSystemFullscreen()); | 608 CHECK(chrome::mac::SupportsSystemFullscreen()); |
613 if ([controller_ inPresentationMode]) | 609 if ([controller_ inPresentationMode]) |
614 [controller_ exitPresentationMode]; | 610 [controller_ exitPresentationMode]; |
615 else | 611 else |
616 [controller_ enterFullscreen]; | 612 [controller_ enterFullscreen]; |
(...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
752 // further, both by another H, i.e. WebContentsView's height becomes | 748 // further, both by another H, i.e. WebContentsView's height becomes |
753 // A.height() + H and RenderWidgetHostView's height becomes A.height() + 2H. | 749 // A.height() + H and RenderWidgetHostView's height becomes A.height() + 2H. |
754 // Strangely, the RenderWidgetHostView for the previous navigation entry also | 750 // Strangely, the RenderWidgetHostView for the previous navigation entry also |
755 // gets enlarged by H. | 751 // gets enlarged by H. |
756 // I believe these "automatic" resizing are caused by setAutoresizingMask of | 752 // I believe these "automatic" resizing are caused by setAutoresizingMask of |
757 // of the cocoa view in WebContentsViewMac, which defeats the purpose of | 753 // of the cocoa view in WebContentsViewMac, which defeats the purpose of |
758 // WebContentsDelegate::GetSizeForNewRenderView i.e. to prevent resizing of | 754 // WebContentsDelegate::GetSizeForNewRenderView i.e. to prevent resizing of |
759 // RenderWidgetHostView in (2) and (3). | 755 // RenderWidgetHostView in (2) and (3). |
760 return 0; | 756 return 0; |
761 } | 757 } |
OLD | NEW |