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

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

Issue 10173035: Add key modifier on minimize/restore button click to minimize/restore all Panels for Mac. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: removed IsActive checks from new test Created 8 years, 8 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 #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
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
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
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/panel_strip.h ('k') | chrome/browser/ui/panels/panel_window_controller_cocoa.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698