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

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

Issue 10919046: Allow panels to be created as detached panels. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: avoid panel_create_mode being unused_var in Ash Created 8 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 | « chrome/browser/ui/panels/panel_manager.cc ('k') | chrome/browser/ui/panels/panel_view.cc » ('j') | 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) 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 #import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h" 5 #import "chrome/browser/ui/panels/panel_titlebar_view_cocoa.h"
6 6
7 #include <Carbon/Carbon.h> // kVK_Escape 7 #include <Carbon/Carbon.h> // kVK_Escape
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 308 matching lines...) Expand 10 before | Expand all | Expand 10 after
319 image:rb.GetNativeImageNamed(IDR_PANEL_MINIMIZE) 319 image:rb.GetNativeImageNamed(IDR_PANEL_MINIMIZE)
320 hoverImage:rb.GetNativeImageNamed(IDR_PANEL_MINIMIZE_H) 320 hoverImage:rb.GetNativeImageNamed(IDR_PANEL_MINIMIZE_H)
321 pressedImage:rb.GetNativeImageNamed(IDR_PANEL_MINIMIZE_C) 321 pressedImage:rb.GetNativeImageNamed(IDR_PANEL_MINIMIZE_C)
322 toolTip:l10n_util::GetNSStringWithFixup(IDS_PANEL_MINIMIZE_TOOLTIP)]; 322 toolTip:l10n_util::GetNSStringWithFixup(IDS_PANEL_MINIMIZE_TOOLTIP)];
323 323
324 [self initializeImageButton:restoreButton_ 324 [self initializeImageButton:restoreButton_
325 image: rb.GetNativeImageNamed(IDR_PANEL_RESTORE) 325 image: rb.GetNativeImageNamed(IDR_PANEL_RESTORE)
326 hoverImage:rb.GetNativeImageNamed(IDR_PANEL_RESTORE_H) 326 hoverImage:rb.GetNativeImageNamed(IDR_PANEL_RESTORE_H)
327 pressedImage:rb.GetNativeImageNamed(IDR_PANEL_RESTORE_C) 327 pressedImage:rb.GetNativeImageNamed(IDR_PANEL_RESTORE_C)
328 toolTip:l10n_util::GetNSStringWithFixup(IDS_PANEL_RESTORE_TOOLTIP)]; 328 toolTip:l10n_util::GetNSStringWithFixup(IDS_PANEL_RESTORE_TOOLTIP)];
329 [restoreButton_ setHidden:YES]; // Only visible when panel is minimized. 329
330 [controller_ updateTitleBarMinimizeRestoreButtonVisibility];
330 331
331 [self updateCustomButtonsLayout]; 332 [self updateCustomButtonsLayout];
332 333
333 // Set autoresizing behavior: glued to edges on left, top and right. 334 // Set autoresizing behavior: glued to edges on left, top and right.
334 [self setAutoresizingMask:(NSViewMinYMargin | NSViewWidthSizable)]; 335 [self setAutoresizingMask:(NSViewMinYMargin | NSViewWidthSizable)];
335 336
336 [[NSNotificationCenter defaultCenter] 337 [[NSNotificationCenter defaultCenter]
337 addObserver:self 338 addObserver:self
338 selector:@selector(didChangeTheme:) 339 selector:@selector(didChangeTheme:)
339 name:kBrowserThemeDidChangeNotification 340 name:kBrowserThemeDidChangeNotification
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 - (NSButton*)minimizeButton { 683 - (NSButton*)minimizeButton {
683 return minimizeButton_; 684 return minimizeButton_;
684 } 685 }
685 686
686 - (NSButton*)restoreButton { 687 - (NSButton*)restoreButton {
687 return restoreButton_; 688 return restoreButton_;
688 } 689 }
689 690
690 @end 691 @end
691 692
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.cc ('k') | chrome/browser/ui/panels/panel_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698