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

Side by Side Diff: chrome/browser/ui/views/toolbar/wrench_toolbar_button.cc

Issue 83513004: Show focus rect on Chrome menu button (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 1 month 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 #include "chrome/browser/ui/views/toolbar/wrench_toolbar_button.h" 5 #include "chrome/browser/ui/views/toolbar/wrench_toolbar_button.h"
6 6
7 #include "grit/theme_resources.h" 7 #include "grit/theme_resources.h"
8 #include "ui/base/resource/resource_bundle.h" 8 #include "ui/base/resource/resource_bundle.h"
9 #include "ui/base/theme_provider.h" 9 #include "ui/base/theme_provider.h"
10 10
(...skipping 16 matching lines...) Expand all
27 27
28 void WrenchToolbarButton::OnPaint(gfx::Canvas* canvas) { 28 void WrenchToolbarButton::OnPaint(gfx::Canvas* canvas) {
29 // Badge linux aura builds so they're quickly identifiable. 29 // Badge linux aura builds so they're quickly identifiable.
30 #if defined(OS_LINUX) && !defined(OS_CHROMEOS) 30 #if defined(OS_LINUX) && !defined(OS_CHROMEOS)
31 wrench_icon_painter_->set_badge( 31 wrench_icon_painter_->set_badge(
32 *GetThemeProvider()->GetImageSkiaNamed(IDR_TOOLS_BADGE_AURA)); 32 *GetThemeProvider()->GetImageSkiaNamed(IDR_TOOLS_BADGE_AURA));
33 #endif 33 #endif
34 34
35 wrench_icon_painter_->Paint( 35 wrench_icon_painter_->Paint(
36 canvas, GetThemeProvider(), gfx::Rect(size()), GetCurrentBezelType()); 36 canvas, GetThemeProvider(), gfx::Rect(size()), GetCurrentBezelType());
37 OnPaintFocusBorder(canvas);
37 } 38 }
38 39
39 void WrenchToolbarButton::ScheduleWrenchIconPaint() { 40 void WrenchToolbarButton::ScheduleWrenchIconPaint() {
40 SchedulePaint(); 41 SchedulePaint();
41 } 42 }
42 43
43 WrenchIconPainter::BezelType WrenchToolbarButton::GetCurrentBezelType() const { 44 WrenchIconPainter::BezelType WrenchToolbarButton::GetCurrentBezelType() const {
44 switch (state()) { 45 switch (state()) {
45 case STATE_HOVERED: 46 case STATE_HOVERED:
46 return WrenchIconPainter::BEZEL_HOVER; 47 return WrenchIconPainter::BEZEL_HOVER;
47 case STATE_PRESSED: 48 case STATE_PRESSED:
48 return WrenchIconPainter::BEZEL_PRESSED; 49 return WrenchIconPainter::BEZEL_PRESSED;
49 default: 50 default:
50 return WrenchIconPainter::BEZEL_NONE; 51 return WrenchIconPainter::BEZEL_NONE;
51 } 52 }
52 } 53 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698