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/rect.h" | 9 #include "ui/gfx/geometry/rect.h" |
10 | 10 |
11 class WrenchIconPainterDelegateMac : public WrenchIconPainter::Delegate { | 11 class WrenchIconPainterDelegateMac : public WrenchIconPainter::Delegate { |
12 public: | 12 public: |
13 explicit WrenchIconPainterDelegateMac(NSCell* cell) : cell_(cell) {} | 13 explicit WrenchIconPainterDelegateMac(NSCell* cell) : cell_(cell) {} |
14 ~WrenchIconPainterDelegateMac() override {} | 14 ~WrenchIconPainterDelegateMac() override {} |
15 | 15 |
16 void ScheduleWrenchIconPaint() override { | 16 void ScheduleWrenchIconPaint() override { |
17 [[cell_ controlView] setNeedsDisplay:YES]; | 17 [[cell_ controlView] setNeedsDisplay:YES]; |
18 } | 18 } |
19 | 19 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 73 |
74 - (WrenchIconPainter::BezelType)currentBezelType { | 74 - (WrenchIconPainter::BezelType)currentBezelType { |
75 if ([self isHighlighted]) | 75 if ([self isHighlighted]) |
76 return WrenchIconPainter::BEZEL_PRESSED; | 76 return WrenchIconPainter::BEZEL_PRESSED; |
77 if ([self isMouseInside]) | 77 if ([self isMouseInside]) |
78 return WrenchIconPainter::BEZEL_HOVER; | 78 return WrenchIconPainter::BEZEL_HOVER; |
79 return WrenchIconPainter::BEZEL_NONE; | 79 return WrenchIconPainter::BEZEL_NONE; |
80 } | 80 } |
81 | 81 |
82 @end | 82 @end |
OLD | NEW |