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

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

Issue 384105: Mac: Animate the bookmark bar showing/hiding. (Closed)
Patch Set: Comments added per rohitrao's review. Created 11 years, 1 month 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
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 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 "base/gfx/rect.h" 5 #include "base/gfx/rect.h"
6 #include "base/logging.h" 6 #include "base/logging.h"
7 #include "base/sys_string_conversions.h" 7 #include "base/sys_string_conversions.h"
8 #include "chrome/app/chrome_dll_resource.h" 8 #include "chrome/app/chrome_dll_resource.h"
9 #include "chrome/browser/bookmarks/bookmark_utils.h" 9 #include "chrome/browser/bookmarks/bookmark_utils.h"
10 #include "chrome/browser/cocoa/browser_window_cocoa.h" 10 #include "chrome/browser/cocoa/browser_window_cocoa.h"
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after
416 return -1; 416 return -1;
417 } 417 }
418 418
419 void BrowserWindowCocoa::Observe(NotificationType type, 419 void BrowserWindowCocoa::Observe(NotificationType type,
420 const NotificationSource& source, 420 const NotificationSource& source,
421 const NotificationDetails& details) { 421 const NotificationDetails& details) {
422 switch (type.value) { 422 switch (type.value) {
423 // Only the key window gets a direct toggle from the menu. 423 // Only the key window gets a direct toggle from the menu.
424 // Other windows hear about it from the notification. 424 // Other windows hear about it from the notification.
425 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED: 425 case NotificationType::BOOKMARK_BAR_VISIBILITY_PREF_CHANGED:
426 [controller_ updateBookmarkBarVisibility]; 426 [controller_ updateBookmarkBarVisibilityWithAnimation:YES];
427 break; 427 break;
428 default: 428 default:
429 NOTREACHED(); // we don't ask for anything else! 429 NOTREACHED(); // we don't ask for anything else!
430 break; 430 break;
431 } 431 }
432 } 432 }
433 433
434 void BrowserWindowCocoa::DestroyBrowser() { 434 void BrowserWindowCocoa::DestroyBrowser() {
435 [controller_ destroyBrowser]; 435 [controller_ destroyBrowser];
436 436
437 // at this point the controller is dead (autoreleased), so 437 // at this point the controller is dead (autoreleased), so
438 // make sure we don't try to reference it any more. 438 // make sure we don't try to reference it any more.
439 } 439 }
OLDNEW
« no previous file with comments | « chrome/browser/cocoa/bookmark_bar_toolbar_view_unittest.mm ('k') | chrome/browser/cocoa/browser_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698