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

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

Issue 2382443007: Clean up NativeTheme (particularly CommonTheme). (Closed)
Patch Set: two slight fixes Created 4 years, 2 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 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/toolbar_action_view.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_action_view.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include "base/auto_reset.h" 9 #include "base/auto_reset.h"
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 94
95 bool ToolbarActionView::IsTriggerableEvent(const ui::Event& event) { 95 bool ToolbarActionView::IsTriggerableEvent(const ui::Event& event) {
96 return views::MenuButton::IsTriggerableEvent(event) && 96 return views::MenuButton::IsTriggerableEvent(event) &&
97 (base::TimeTicks::Now() - popup_closed_time_).InMilliseconds() > 97 (base::TimeTicks::Now() - popup_closed_time_).InMilliseconds() >
98 views::kMinimumMsBetweenButtonClicks; 98 views::kMinimumMsBetweenButtonClicks;
99 } 99 }
100 100
101 SkColor ToolbarActionView::GetInkDropBaseColor() const { 101 SkColor ToolbarActionView::GetInkDropBaseColor() const {
102 if (delegate_->ShownInsideMenu()) { 102 if (delegate_->ShownInsideMenu()) {
103 return GetNativeTheme()->GetSystemColor( 103 return GetNativeTheme()->GetSystemColor(
104 ui::NativeTheme::kColorId_HoverMenuItemBackgroundColor); 104 ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor);
Evan Stade 2016/09/30 18:02:36 as far as I can tell, "focused" and "hovered" are
tdanderson 2016/09/30 21:00:56 Acknowledged.
105 } 105 }
106 106
107 return GetThemeProvider()->GetColor( 107 return GetThemeProvider()->GetColor(
108 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); 108 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
109 } 109 }
110 110
111 bool ToolbarActionView::ShouldShowInkDropHighlight() const { 111 bool ToolbarActionView::ShouldShowInkDropHighlight() const {
112 return !delegate_->ShownInsideMenu() && 112 return !delegate_->ShownInsideMenu() &&
113 views::MenuButton::ShouldShowInkDropHighlight(); 113 views::MenuButton::ShouldShowInkDropHighlight();
114 } 114 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (menu_controller->in_nested_run()) { 311 if (menu_controller->in_nested_run()) {
312 // There is another menu showing. Close the outermost menu (since we are 312 // There is another menu showing. Close the outermost menu (since we are
313 // shown in the same menu, we don't want to close the whole thing). 313 // shown in the same menu, we don't want to close the whole thing).
314 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST); 314 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST);
315 return true; 315 return true;
316 } 316 }
317 } 317 }
318 318
319 return false; 319 return false;
320 } 320 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698