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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 } | 91 } |
92 | 92 |
93 void BrowserWindowCocoa::SelectedTabExtensionShelfSizeChanged() { | 93 void BrowserWindowCocoa::SelectedTabExtensionShelfSizeChanged() { |
94 NOTIMPLEMENTED(); | 94 NOTIMPLEMENTED(); |
95 } | 95 } |
96 | 96 |
97 void BrowserWindowCocoa::UpdateTitleBar() { | 97 void BrowserWindowCocoa::UpdateTitleBar() { |
98 NSString* newTitle = | 98 NSString* newTitle = |
99 base::SysUTF16ToNSString(browser_->GetWindowTitleForCurrentTab()); | 99 base::SysUTF16ToNSString(browser_->GetWindowTitleForCurrentTab()); |
100 | 100 |
| 101 // Only set the title if we're a popup window. If we call setTitle on a |
| 102 // regular browser window, it will show up in the titlle bar and cover the |
| 103 // tab strip. |
| 104 if (browser_->type() == Browser::TYPE_POPUP) |
| 105 [window_ setTitle:newTitle]; |
| 106 |
101 // Window menu | 107 // Window menu |
102 [NSApp changeWindowsItem:window_ title:newTitle filename:NO]; | 108 [NSApp changeWindowsItem:window_ title:newTitle filename:NO]; |
103 | 109 |
104 // Dock | 110 // Dock |
105 [window_ setMiniwindowTitle:newTitle]; | 111 [window_ setMiniwindowTitle:newTitle]; |
106 } | 112 } |
107 | 113 |
108 void BrowserWindowCocoa::UpdateDevTools() { | 114 void BrowserWindowCocoa::UpdateDevTools() { |
109 NOTIMPLEMENTED(); | 115 NOTIMPLEMENTED(); |
110 } | 116 } |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
317 break; | 323 break; |
318 } | 324 } |
319 } | 325 } |
320 | 326 |
321 void BrowserWindowCocoa::DestroyBrowser() { | 327 void BrowserWindowCocoa::DestroyBrowser() { |
322 [controller_ destroyBrowser]; | 328 [controller_ destroyBrowser]; |
323 | 329 |
324 // at this point the controller is dead (autoreleased), so | 330 // at this point the controller is dead (autoreleased), so |
325 // make sure we don't try to reference it any more. | 331 // make sure we don't try to reference it any more. |
326 } | 332 } |
OLD | NEW |