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

Side by Side Diff: chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell.mm

Issue 1214243003: [Extensions UI] Clean up extension icon generation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: s/skia/ImageSkia Created 5 years, 5 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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/cocoa/toolbar/wrench_toolbar_button_cell.h" 5 #import "chrome/browser/ui/cocoa/toolbar/wrench_toolbar_button_cell.h"
6 6
7 #import "chrome/browser/ui/cocoa/themed_window.h" 7 #import "chrome/browser/ui/cocoa/themed_window.h"
8 #include "ui/gfx/canvas_skia_paint.h" 8 #include "ui/gfx/canvas_skia_paint.h"
9 #include "ui/gfx/geometry/rect.h" 9 #include "ui/gfx/geometry/rect.h"
10 10
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 overflowedToolbarActionWantsToRun_ = NO; 75 overflowedToolbarActionWantsToRun_ = NO;
76 delegate_.reset(new WrenchIconPainterDelegateMac(self)); 76 delegate_.reset(new WrenchIconPainterDelegateMac(self));
77 wrenchIconPainter_.reset(new WrenchIconPainter(delegate_.get())); 77 wrenchIconPainter_.reset(new WrenchIconPainter(delegate_.get()));
78 } 78 }
79 79
80 - (WrenchIconPainter::BezelType)currentBezelType { 80 - (WrenchIconPainter::BezelType)currentBezelType {
81 if ([self isHighlighted]) 81 if ([self isHighlighted])
82 return WrenchIconPainter::BEZEL_PRESSED; 82 return WrenchIconPainter::BEZEL_PRESSED;
83 if ([self isMouseInside]) 83 if ([self isMouseInside])
84 return WrenchIconPainter::BEZEL_HOVER; 84 return WrenchIconPainter::BEZEL_HOVER;
85 // If an overflowed toolbar action wants to run, we give the wrench menu a
86 // "popped out" appearance.
87 if (overflowedToolbarActionWantsToRun_)
88 return WrenchIconPainter::BEZEL_RAISED;
89 return WrenchIconPainter::BEZEL_NONE; 85 return WrenchIconPainter::BEZEL_NONE;
90 } 86 }
91 87
92 #pragma mark - 88 #pragma mark -
93 #pragma mark Testing Methods 89 #pragma mark Testing Methods
94 90
95 - (BOOL)overflowedToolbarActionWantsToRun { 91 - (BOOL)overflowedToolbarActionWantsToRun {
96 return overflowedToolbarActionWantsToRun_; 92 return overflowedToolbarActionWantsToRun_;
97 } 93 }
98 94
99 @end 95 @end
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698