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 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 void BrowserWindowCocoa::SelectedTabExtensionShelfSizeChanged() { | 97 void BrowserWindowCocoa::SelectedTabExtensionShelfSizeChanged() { |
98 NOTIMPLEMENTED(); | 98 NOTIMPLEMENTED(); |
99 } | 99 } |
100 | 100 |
101 void BrowserWindowCocoa::UpdateTitleBar() { | 101 void BrowserWindowCocoa::UpdateTitleBar() { |
102 NSString* newTitle = | 102 NSString* newTitle = |
103 base::SysUTF16ToNSString(browser_->GetWindowTitleForCurrentTab()); | 103 base::SysUTF16ToNSString(browser_->GetWindowTitleForCurrentTab()); |
104 | 104 |
105 // Only set the title if we're a popup window. If we call setTitle on a | 105 [window_ setTitle:newTitle]; |
106 // regular browser window, it will show up in the titlle bar and cover the | |
107 // tab strip. | |
108 if (browser_->type() == Browser::TYPE_POPUP) | |
109 [window_ setTitle:newTitle]; | |
110 | |
111 // Window menu | |
112 [NSApp changeWindowsItem:window_ title:newTitle filename:NO]; | |
113 | |
114 // Dock | |
115 [window_ setMiniwindowTitle:newTitle]; | |
116 } | 106 } |
117 | 107 |
118 void BrowserWindowCocoa::ShelfVisibilityChanged() { | 108 void BrowserWindowCocoa::ShelfVisibilityChanged() { |
119 // Mac doesn't yet support showing the bookmark bar at a different size on | 109 // Mac doesn't yet support showing the bookmark bar at a different size on |
120 // the new tab page. When it does, this method should attempt to relayout the | 110 // the new tab page. When it does, this method should attempt to relayout the |
121 // bookmark bar/extension shelf as their preferred height may have changed. | 111 // bookmark bar/extension shelf as their preferred height may have changed. |
122 NOTIMPLEMENTED(); | 112 NOTIMPLEMENTED(); |
123 } | 113 } |
124 | 114 |
125 void BrowserWindowCocoa::UpdateDevTools() { | 115 void BrowserWindowCocoa::UpdateDevTools() { |
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
340 break; | 330 break; |
341 } | 331 } |
342 } | 332 } |
343 | 333 |
344 void BrowserWindowCocoa::DestroyBrowser() { | 334 void BrowserWindowCocoa::DestroyBrowser() { |
345 [controller_ destroyBrowser]; | 335 [controller_ destroyBrowser]; |
346 | 336 |
347 // at this point the controller is dead (autoreleased), so | 337 // at this point the controller is dead (autoreleased), so |
348 // make sure we don't try to reference it any more. | 338 // make sure we don't try to reference it any more. |
349 } | 339 } |
OLD | NEW |