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