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

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

Issue 2952004: [Mac] Finish implementation of App Tabs. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 10 years, 5 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 532 matching lines...) Expand 10 before | Expand all | Expand 10 after
543 } 543 }
544 544
545 void BrowserWindowCocoa::Paste() { 545 void BrowserWindowCocoa::Paste() {
546 [NSApp sendAction:@selector(paste:) to:nil from:nil]; 546 [NSApp sendAction:@selector(paste:) to:nil from:nil];
547 } 547 }
548 548
549 void BrowserWindowCocoa::ToggleTabStripMode() { 549 void BrowserWindowCocoa::ToggleTabStripMode() {
550 [controller_ toggleTabStripDisplayMode]; 550 [controller_ toggleTabStripDisplayMode];
551 } 551 }
552 552
553 void BrowserWindowCocoa::SetToolbarCollapsedMode(bool collapsed) {
554 [controller_ setToolbarCollapsedMode:collapsed];
555 }
556
557 void BrowserWindowCocoa::Observe(NotificationType type, 553 void BrowserWindowCocoa::Observe(NotificationType type,
558 const NotificationSource& source, 554 const NotificationSource& source,
559 const NotificationDetails& details) { 555 const NotificationDetails& details) {
560 switch (type.value) { 556 switch (type.value) {
561 // Only the key window gets a direct toggle from the menu. 557 // Only the key window gets a direct toggle from the menu.
562 // Other windows hear about it from the notification. 558 // Other windows hear about it from the notification.
563 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: 559 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
564 [controller_ updateBookmarkBarVisibilityWithAnimation:YES]; 560 [controller_ updateBookmarkBarVisibilityWithAnimation:YES];
565 break; 561 break;
566 default: 562 default:
567 NOTREACHED(); // we don't ask for anything else! 563 NOTREACHED(); // we don't ask for anything else!
568 break; 564 break;
569 } 565 }
570 } 566 }
571 567
572 void BrowserWindowCocoa::DestroyBrowser() { 568 void BrowserWindowCocoa::DestroyBrowser() {
573 [controller_ destroyBrowser]; 569 [controller_ destroyBrowser];
574 570
575 // at this point the controller is dead (autoreleased), so 571 // at this point the controller is dead (autoreleased), so
576 // make sure we don't try to reference it any more. 572 // make sure we don't try to reference it any more.
577 } 573 }
578 574
579 NSWindow* BrowserWindowCocoa::window() const { 575 NSWindow* BrowserWindowCocoa::window() const {
580 return [controller_ window]; 576 return [controller_ window];
581 } 577 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698