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 #import "base/mac/sdk_forward_declarations.h" | 10 #import "base/mac/sdk_forward_declarations.h" |
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
745 else if (command_id == IDC_COPY) | 745 else if (command_id == IDC_COPY) |
746 [NSApp sendAction:@selector(copy:) to:nil from:nil]; | 746 [NSApp sendAction:@selector(copy:) to:nil from:nil]; |
747 else | 747 else |
748 [NSApp sendAction:@selector(paste:) to:nil from:nil]; | 748 [NSApp sendAction:@selector(paste:) to:nil from:nil]; |
749 } | 749 } |
750 | 750 |
751 WindowOpenDisposition BrowserWindowCocoa::GetDispositionForPopupBounds( | 751 WindowOpenDisposition BrowserWindowCocoa::GetDispositionForPopupBounds( |
752 const gfx::Rect& bounds) { | 752 const gfx::Rect& bounds) { |
753 // When using Cocoa's System Fullscreen mode, convert popups into tabs. | 753 // When using Cocoa's System Fullscreen mode, convert popups into tabs. |
754 if ([controller_ isInAppKitFullscreen]) | 754 if ([controller_ isInAppKitFullscreen]) |
755 return NEW_FOREGROUND_TAB; | 755 return WindowOpenDisposition::NEW_FOREGROUND_TAB; |
756 return NEW_POPUP; | 756 return WindowOpenDisposition::NEW_POPUP; |
757 } | 757 } |
758 | 758 |
759 FindBar* BrowserWindowCocoa::CreateFindBar() { | 759 FindBar* BrowserWindowCocoa::CreateFindBar() { |
760 // We could push the AddFindBar() call into the FindBarBridge | 760 // We could push the AddFindBar() call into the FindBarBridge |
761 // constructor or the FindBarCocoaController init, but that makes | 761 // constructor or the FindBarCocoaController init, but that makes |
762 // unit testing difficult, since we would also require a | 762 // unit testing difficult, since we would also require a |
763 // BrowserWindow object. | 763 // BrowserWindow object. |
764 FindBarBridge* bridge = new FindBarBridge(browser_); | 764 FindBarBridge* bridge = new FindBarBridge(browser_); |
765 AddFindBar(bridge->find_bar_cocoa_controller()); | 765 AddFindBar(bridge->find_bar_cocoa_controller()); |
766 return bridge; | 766 return bridge; |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
837 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { | 837 ExclusiveAccessContext* BrowserWindowCocoa::GetExclusiveAccessContext() { |
838 return [controller_ exclusiveAccessController]; | 838 return [controller_ exclusiveAccessController]; |
839 } | 839 } |
840 | 840 |
841 void BrowserWindowCocoa::ShowImeWarningBubble( | 841 void BrowserWindowCocoa::ShowImeWarningBubble( |
842 const extensions::Extension* extension, | 842 const extensions::Extension* extension, |
843 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& | 843 const base::Callback<void(ImeWarningBubblePermissionStatus status)>& |
844 callback) { | 844 callback) { |
845 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; | 845 NOTREACHED() << "The IME warning bubble is unsupported on this platform."; |
846 } | 846 } |
OLD | NEW |