| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 [[NSNotificationCenter defaultCenter] removeObserver:self]; | 122 [[NSNotificationCenter defaultCenter] removeObserver:self]; |
| 123 [self stopGlintAnimation]; | 123 [self stopGlintAnimation]; |
| 124 [super dealloc]; | 124 [super dealloc]; |
| 125 } | 125 } |
| 126 | 126 |
| 127 - (void)onCloseButtonClick:(id)sender { | 127 - (void)onCloseButtonClick:(id)sender { |
| 128 [controller_ closePanel]; | 128 [controller_ closePanel]; |
| 129 } | 129 } |
| 130 | 130 |
| 131 - (void)onMinimizeButtonClick:(id)sender { | 131 - (void)onMinimizeButtonClick:(id)sender { |
| 132 [controller_ minimizePanel:[[NSApp currentEvent] modifierFlags]]; | 132 [controller_ minimizeButtonClicked:[[NSApp currentEvent] modifierFlags]]; |
| 133 } | 133 } |
| 134 | 134 |
| 135 - (void)onRestoreButtonClick:(id)sender { | 135 - (void)onRestoreButtonClick:(id)sender { |
| 136 [controller_ restorePanel:[[NSApp currentEvent] modifierFlags]]; | 136 [controller_ restoreButtonClicked:[[NSApp currentEvent] modifierFlags]]; |
| 137 } | 137 } |
| 138 | 138 |
| 139 - (void)drawRect:(NSRect)rect { | 139 - (void)drawRect:(NSRect)rect { |
| 140 ThemeService* theme = | 140 ThemeService* theme = |
| 141 static_cast<ThemeService*>([[self window] themeProvider]); | 141 static_cast<ThemeService*>([[self window] themeProvider]); |
| 142 | 142 |
| 143 [title_ setAlphaValue:1.0]; | 143 [title_ setAlphaValue:1.0]; |
| 144 [icon_ setAlphaValue:1.0]; | 144 [icon_ setAlphaValue:1.0]; |
| 145 | 145 |
| 146 NSColor* strokeColor = nil; | 146 NSColor* strokeColor = nil; |
| (...skipping 558 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 705 - (NSButton*)minimizeButton { | 705 - (NSButton*)minimizeButton { |
| 706 return minimizeButton_; | 706 return minimizeButton_; |
| 707 } | 707 } |
| 708 | 708 |
| 709 - (NSButton*)restoreButton { | 709 - (NSButton*)restoreButton { |
| 710 return restoreButton_; | 710 return restoreButton_; |
| 711 } | 711 } |
| 712 | 712 |
| 713 @end | 713 @end |
| 714 | 714 |
| OLD | NEW |