OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/cocoa/browser_window_cocoa.h" | 5 #include "chrome/browser/cocoa/browser_window_cocoa.h" |
6 | 6 |
7 #include "app/l10n_util_mac.h" | 7 #include "app/l10n_util_mac.h" |
8 #include "base/keyboard_codes.h" | 8 #include "base/keyboard_codes.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
(...skipping 535 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
546 } | 546 } |
547 | 547 |
548 void BrowserWindowCocoa::Paste() { | 548 void BrowserWindowCocoa::Paste() { |
549 [NSApp sendAction:@selector(paste:) to:nil from:nil]; | 549 [NSApp sendAction:@selector(paste:) to:nil from:nil]; |
550 } | 550 } |
551 | 551 |
552 void BrowserWindowCocoa::ToggleTabStripMode() { | 552 void BrowserWindowCocoa::ToggleTabStripMode() { |
553 [controller_ toggleTabStripDisplayMode]; | 553 [controller_ toggleTabStripDisplayMode]; |
554 } | 554 } |
555 | 555 |
| 556 void BrowserWindowCocoa::OpenTabpose() { |
| 557 [controller_ toggleTabStripDisplayMode]; |
| 558 } |
| 559 |
556 void BrowserWindowCocoa::Observe(NotificationType type, | 560 void BrowserWindowCocoa::Observe(NotificationType type, |
557 const NotificationSource& source, | 561 const NotificationSource& source, |
558 const NotificationDetails& details) { | 562 const NotificationDetails& details) { |
559 switch (type.value) { | 563 switch (type.value) { |
560 // Only the key window gets a direct toggle from the menu. | 564 // Only the key window gets a direct toggle from the menu. |
561 // Other windows hear about it from the notification. | 565 // Other windows hear about it from the notification. |
562 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: | 566 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: |
563 [controller_ updateBookmarkBarVisibilityWithAnimation:YES]; | 567 [controller_ updateBookmarkBarVisibilityWithAnimation:YES]; |
564 break; | 568 break; |
565 default: | 569 default: |
566 NOTREACHED(); // we don't ask for anything else! | 570 NOTREACHED(); // we don't ask for anything else! |
567 break; | 571 break; |
568 } | 572 } |
569 } | 573 } |
570 | 574 |
571 void BrowserWindowCocoa::DestroyBrowser() { | 575 void BrowserWindowCocoa::DestroyBrowser() { |
572 [controller_ destroyBrowser]; | 576 [controller_ destroyBrowser]; |
573 | 577 |
574 // at this point the controller is dead (autoreleased), so | 578 // at this point the controller is dead (autoreleased), so |
575 // make sure we don't try to reference it any more. | 579 // make sure we don't try to reference it any more. |
576 } | 580 } |
577 | 581 |
578 NSWindow* BrowserWindowCocoa::window() const { | 582 NSWindow* BrowserWindowCocoa::window() const { |
579 return [controller_ window]; | 583 return [controller_ window]; |
580 } | 584 } |
OLD | NEW |