| OLD | NEW |
| 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 Loading... |
| 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 } |
| OLD | NEW |