Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(477)

Side by Side Diff: chrome/browser/cocoa/browser_window_cocoa.mm

Issue 2475002: Initial cut at scaffolding for mac sidetabs. No visible changes to browser wi... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 10 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 } 523 }
524 524
525 void BrowserWindowCocoa::Copy() { 525 void BrowserWindowCocoa::Copy() {
526 [NSApp sendAction:@selector(copy:) to:nil from:nil]; 526 [NSApp sendAction:@selector(copy:) to:nil from:nil];
527 } 527 }
528 528
529 void BrowserWindowCocoa::Paste() { 529 void BrowserWindowCocoa::Paste() {
530 [NSApp sendAction:@selector(paste:) to:nil from:nil]; 530 [NSApp sendAction:@selector(paste:) to:nil from:nil];
531 } 531 }
532 532
533 void BrowserWindowCocoa::ToggleTabStripMode() {
534 [controller_ tabStripDisplayModeChanged];
535 }
536
533 void BrowserWindowCocoa::Observe(NotificationType type, 537 void BrowserWindowCocoa::Observe(NotificationType type,
534 const NotificationSource& source, 538 const NotificationSource& source,
535 const NotificationDetails& details) { 539 const NotificationDetails& details) {
536 switch (type.value) { 540 switch (type.value) {
537 // Only the key window gets a direct toggle from the menu. 541 // Only the key window gets a direct toggle from the menu.
538 // Other windows hear about it from the notification. 542 // Other windows hear about it from the notification.
539 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: 543 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
540 [controller_ updateBookmarkBarVisibilityWithAnimation:YES]; 544 [controller_ updateBookmarkBarVisibilityWithAnimation:YES];
541 break; 545 break;
542 default: 546 default:
543 NOTREACHED(); // we don't ask for anything else! 547 NOTREACHED(); // we don't ask for anything else!
544 break; 548 break;
545 } 549 }
546 } 550 }
547 551
548 void BrowserWindowCocoa::DestroyBrowser() { 552 void BrowserWindowCocoa::DestroyBrowser() {
549 [controller_ destroyBrowser]; 553 [controller_ destroyBrowser];
550 554
551 // at this point the controller is dead (autoreleased), so 555 // at this point the controller is dead (autoreleased), so
552 // make sure we don't try to reference it any more. 556 // make sure we don't try to reference it any more.
553 } 557 }
554 558
555 NSWindow* BrowserWindowCocoa::window() const { 559 NSWindow* BrowserWindowCocoa::window() const {
556 return [controller_ window]; 560 return [controller_ window];
557 } 561 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698