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

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

Issue 2382443007: Clean up NativeTheme (particularly CommonTheme). (Closed)
Patch Set: share color constant 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
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | ui/native_theme/common_theme.cc » ('j') | 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/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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 91
92 bool ToolbarActionView::IsTriggerableEvent(const ui::Event& event) { 92 bool ToolbarActionView::IsTriggerableEvent(const ui::Event& event) {
93 return views::MenuButton::IsTriggerableEvent(event) && 93 return views::MenuButton::IsTriggerableEvent(event) &&
94 (base::TimeTicks::Now() - popup_closed_time_).InMilliseconds() > 94 (base::TimeTicks::Now() - popup_closed_time_).InMilliseconds() >
95 views::kMinimumMsBetweenButtonClicks; 95 views::kMinimumMsBetweenButtonClicks;
96 } 96 }
97 97
98 SkColor ToolbarActionView::GetInkDropBaseColor() const { 98 SkColor ToolbarActionView::GetInkDropBaseColor() const {
99 if (delegate_->ShownInsideMenu()) { 99 if (delegate_->ShownInsideMenu()) {
100 return GetNativeTheme()->GetSystemColor( 100 return GetNativeTheme()->GetSystemColor(
101 ui::NativeTheme::kColorId_HoverMenuItemBackgroundColor); 101 ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor);
102 } 102 }
103 103
104 return GetThemeProvider()->GetColor( 104 return GetThemeProvider()->GetColor(
105 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); 105 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
106 } 106 }
107 107
108 bool ToolbarActionView::ShouldShowInkDropHighlight() const { 108 bool ToolbarActionView::ShouldShowInkDropHighlight() const {
109 return !delegate_->ShownInsideMenu() && 109 return !delegate_->ShownInsideMenu() &&
110 views::MenuButton::ShouldShowInkDropHighlight(); 110 views::MenuButton::ShouldShowInkDropHighlight();
111 } 111 }
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 if (menu_controller->in_nested_run()) { 308 if (menu_controller->in_nested_run()) {
309 // There is another menu showing. Close the outermost menu (since we are 309 // There is another menu showing. Close the outermost menu (since we are
310 // shown in the same menu, we don't want to close the whole thing). 310 // shown in the same menu, we don't want to close the whole thing).
311 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST); 311 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST);
312 return true; 312 return true;
313 } 313 }
314 } 314 }
315 315
316 return false; 316 return false;
317 } 317 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/app_menu.cc ('k') | ui/native_theme/common_theme.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698