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