| 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/sys_string_conversions.h" | 10 #include "base/sys_string_conversions.h" |
| (...skipping 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 } | 533 } |
| 534 | 534 |
| 535 void BrowserWindowCocoa::Copy() { | 535 void BrowserWindowCocoa::Copy() { |
| 536 [NSApp sendAction:@selector(copy:) to:nil from:nil]; | 536 [NSApp sendAction:@selector(copy:) to:nil from:nil]; |
| 537 } | 537 } |
| 538 | 538 |
| 539 void BrowserWindowCocoa::Paste() { | 539 void BrowserWindowCocoa::Paste() { |
| 540 [NSApp sendAction:@selector(paste:) to:nil from:nil]; | 540 [NSApp sendAction:@selector(paste:) to:nil from:nil]; |
| 541 } | 541 } |
| 542 | 542 |
| 543 void BrowserWindowCocoa::ToggleTabStripMode() { | |
| 544 NOTIMPLEMENTED(); | |
| 545 } | |
| 546 | |
| 547 void BrowserWindowCocoa::Observe(NotificationType type, | 543 void BrowserWindowCocoa::Observe(NotificationType type, |
| 548 const NotificationSource& source, | 544 const NotificationSource& source, |
| 549 const NotificationDetails& details) { | 545 const NotificationDetails& details) { |
| 550 switch (type.value) { | 546 switch (type.value) { |
| 551 // Only the key window gets a direct toggle from the menu. | 547 // Only the key window gets a direct toggle from the menu. |
| 552 // Other windows hear about it from the notification. | 548 // Other windows hear about it from the notification. |
| 553 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: | 549 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: |
| 554 [controller_ updateBookmarkBarVisibilityWithAnimation:YES]; | 550 [controller_ updateBookmarkBarVisibilityWithAnimation:YES]; |
| 555 break; | 551 break; |
| 556 default: | 552 default: |
| 557 NOTREACHED(); // we don't ask for anything else! | 553 NOTREACHED(); // we don't ask for anything else! |
| 558 break; | 554 break; |
| 559 } | 555 } |
| 560 } | 556 } |
| 561 | 557 |
| 562 void BrowserWindowCocoa::DestroyBrowser() { | 558 void BrowserWindowCocoa::DestroyBrowser() { |
| 563 [controller_ destroyBrowser]; | 559 [controller_ destroyBrowser]; |
| 564 | 560 |
| 565 // at this point the controller is dead (autoreleased), so | 561 // at this point the controller is dead (autoreleased), so |
| 566 // make sure we don't try to reference it any more. | 562 // make sure we don't try to reference it any more. |
| 567 } | 563 } |
| 568 | 564 |
| 569 NSWindow* BrowserWindowCocoa::window() const { | 565 NSWindow* BrowserWindowCocoa::window() const { |
| 570 return [controller_ window]; | 566 return [controller_ window]; |
| 571 } | 567 } |
| OLD | NEW |