| 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/browser/bookmarks/bookmark_utils.h" | 8 #include "chrome/browser/bookmarks/bookmark_utils.h" |
| 9 #include "chrome/browser/cocoa/browser_window_cocoa.h" | 9 #include "chrome/browser/cocoa/browser_window_cocoa.h" |
| 10 #import "chrome/browser/cocoa/browser_window_controller.h" | 10 #import "chrome/browser/cocoa/browser_window_controller.h" |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 void BrowserWindowCocoa::SelectedTabToolbarSizeChanged(bool is_animating) { | 84 void BrowserWindowCocoa::SelectedTabToolbarSizeChanged(bool is_animating) { |
| 85 // According to beng, this is an ugly method that comes from the days when the | 85 // According to beng, this is an ugly method that comes from the days when the |
| 86 // download shelf was a ChromeView attached to the TabContents, and as its | 86 // download shelf was a ChromeView attached to the TabContents, and as its |
| 87 // size changed via animation it notified through TCD/etc to the browser view | 87 // size changed via animation it notified through TCD/etc to the browser view |
| 88 // to relayout for each tick of the animation. We don't need anything of the | 88 // to relayout for each tick of the animation. We don't need anything of the |
| 89 // sort on Mac. | 89 // sort on Mac. |
| 90 } | 90 } |
| 91 | 91 |
| 92 void BrowserWindowCocoa::UpdateTitleBar() { | 92 void BrowserWindowCocoa::UpdateTitleBar() { |
| 93 NSString* newTitle = | 93 NSString* newTitle = |
| 94 base::SysUTF16ToNSString(browser_->GetCurrentPageTitle()); | 94 base::SysUTF16ToNSString(browser_->GetWindowTitleForCurrentTab()); |
| 95 | 95 |
| 96 // Window menu | 96 // Window menu |
| 97 [NSApp changeWindowsItem:window_ title:newTitle filename:NO]; | 97 [NSApp changeWindowsItem:window_ title:newTitle filename:NO]; |
| 98 | 98 |
| 99 // Dock | 99 // Dock |
| 100 [window_ setMiniwindowTitle:newTitle]; | 100 [window_ setMiniwindowTitle:newTitle]; |
| 101 } | 101 } |
| 102 | 102 |
| 103 void BrowserWindowCocoa::UpdateDevTools() { | 103 void BrowserWindowCocoa::UpdateDevTools() { |
| 104 NOTIMPLEMENTED(); | 104 NOTIMPLEMENTED(); |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 break; | 282 break; |
| 283 } | 283 } |
| 284 } | 284 } |
| 285 | 285 |
| 286 void BrowserWindowCocoa::DestroyBrowser() { | 286 void BrowserWindowCocoa::DestroyBrowser() { |
| 287 [controller_ destroyBrowser]; | 287 [controller_ destroyBrowser]; |
| 288 | 288 |
| 289 // at this point the controller is dead (autoreleased), so | 289 // at this point the controller is dead (autoreleased), so |
| 290 // make sure we don't try to reference it any more. | 290 // make sure we don't try to reference it any more. |
| 291 } | 291 } |
| OLD | NEW |