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

Side by Side Diff: chrome/browser/ui/panels/panel_browser_window_cocoa.mm

Issue 10260028: Update Panel mininimize/restore button on strip and expansion state change. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: feedback changes Created 8 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "chrome/browser/ui/panels/panel_browser_window_cocoa.h" 5 #include "chrome/browser/ui/panels/panel_browser_window_cocoa.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/tabs/tab_strip_model.h" 9 #include "chrome/browser/tabs/tab_strip_model.h"
10 #include "chrome/browser/ui/browser.h" 10 #include "chrome/browser/ui/browser.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 } 277 }
278 278
279 void PanelBrowserWindowCocoa::DestroyPanelBrowser() { 279 void PanelBrowserWindowCocoa::DestroyPanelBrowser() {
280 [controller_ close]; 280 [controller_ close];
281 } 281 }
282 282
283 void PanelBrowserWindowCocoa::EnsurePanelFullyVisible() { 283 void PanelBrowserWindowCocoa::EnsurePanelFullyVisible() {
284 [controller_ ensureFullyVisible]; 284 [controller_ ensureFullyVisible];
285 } 285 }
286 286
287 void PanelBrowserWindowCocoa::SetPanelAppIconVisibility(bool visible) {
288 // TODO(dimich): to be implemented.
289 }
290
291 void PanelBrowserWindowCocoa::SetPanelAlwaysOnTop(bool on_top) { 287 void PanelBrowserWindowCocoa::SetPanelAlwaysOnTop(bool on_top) {
292 [controller_ updateWindowLevel]; 288 [controller_ updateWindowLevel];
293 } 289 }
294 290
295 void PanelBrowserWindowCocoa::EnableResizeByMouse(bool enable) { 291 void PanelBrowserWindowCocoa::EnableResizeByMouse(bool enable) {
296 [controller_ enableResizeByMouse:enable]; 292 [controller_ enableResizeByMouse:enable];
297 } 293 }
298 294
295 void PanelBrowserWindowCocoa::UpdatePanelMinimizeRestoreButtonVisibility() {
296 [controller_ updateTitleBarMinimizeRestoreButtonVisibility];
297 }
298
299 void PanelBrowserWindowCocoa::DidCloseNativeWindow() { 299 void PanelBrowserWindowCocoa::DidCloseNativeWindow() {
300 DCHECK(!isClosed()); 300 DCHECK(!isClosed());
301 panel_->OnNativePanelClosed(); 301 panel_->OnNativePanelClosed();
302 controller_ = NULL; 302 controller_ = NULL;
303 } 303 }
304 304
305 gfx::Size PanelBrowserWindowCocoa::WindowSizeFromContentSize( 305 gfx::Size PanelBrowserWindowCocoa::WindowSizeFromContentSize(
306 const gfx::Size& content_size) const { 306 const gfx::Size& content_size) const {
307 NSWindow* window = [controller_ window]; 307 NSWindow* window = [controller_ window];
308 NSRect content = NSMakeRect(0, 0, 308 NSRect content = NSMakeRect(0, 0,
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
439 return ![[titlebar() closeButton] isHidden]; 439 return ![[titlebar() closeButton] isHidden];
440 case MINIMIZE_BUTTON: 440 case MINIMIZE_BUTTON:
441 return ![[titlebar() minimizeButton] isHidden]; 441 return ![[titlebar() minimizeButton] isHidden];
442 case RESTORE_BUTTON: 442 case RESTORE_BUTTON:
443 return ![[titlebar() restoreButton] isHidden]; 443 return ![[titlebar() restoreButton] isHidden];
444 default: 444 default:
445 NOTREACHED(); 445 NOTREACHED();
446 } 446 }
447 return false; 447 return false;
448 } 448 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_browser_window_cocoa.h ('k') | chrome/browser/ui/panels/panel_browser_window_gtk.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698