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

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

Issue 209020: Allow popup windows to have a title displayed in the titlebar.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 3 months 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698