| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |