Chromium Code Reviews| 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 112 (base::TimeTicks::Now() - popup_closed_time_).InMilliseconds() > | 112 (base::TimeTicks::Now() - popup_closed_time_).InMilliseconds() > |
| 113 views::kMinimumMsBetweenButtonClicks; | 113 views::kMinimumMsBetweenButtonClicks; |
| 114 } | 114 } |
| 115 | 115 |
| 116 SkColor ToolbarActionView::GetInkDropBaseColor() const { | 116 SkColor ToolbarActionView::GetInkDropBaseColor() const { |
| 117 if (delegate_->ShownInsideMenu()) { | 117 if (delegate_->ShownInsideMenu()) { |
| 118 return GetNativeTheme()->GetSystemColor( | 118 return GetNativeTheme()->GetSystemColor( |
| 119 ui::NativeTheme::kColorId_HoverMenuItemBackgroundColor); | 119 ui::NativeTheme::kColorId_HoverMenuItemBackgroundColor); |
| 120 } | 120 } |
| 121 | 121 |
| 122 return GetThemeProvider() | 122 DCHECK(GetThemeProvider()); |
|
Evan Stade
2016/03/17 21:41:35
ditto
bruthig
2016/03/18 15:39:22
Removed.
| |
| 123 ? GetThemeProvider()->GetColor( | 123 |
| 124 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON) | 124 return GetThemeProvider()->GetColor( |
| 125 : CustomButton::GetInkDropBaseColor(); | 125 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); |
| 126 } | 126 } |
| 127 | 127 |
| 128 bool ToolbarActionView::ShouldShowInkDropHover() const { | 128 bool ToolbarActionView::ShouldShowInkDropHover() const { |
| 129 return !delegate_->ShownInsideMenu() && | 129 return !delegate_->ShownInsideMenu() && |
| 130 views::MenuButton::ShouldShowInkDropHover(); | 130 views::MenuButton::ShouldShowInkDropHover(); |
| 131 } | 131 } |
| 132 | 132 |
| 133 content::WebContents* ToolbarActionView::GetCurrentWebContents() const { | 133 content::WebContents* ToolbarActionView::GetCurrentWebContents() const { |
| 134 return delegate_->GetCurrentWebContents(); | 134 return delegate_->GetCurrentWebContents(); |
| 135 } | 135 } |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 331 if (menu_controller->in_nested_run()) { | 331 if (menu_controller->in_nested_run()) { |
| 332 // There is another menu showing. Close the outermost menu (since we are | 332 // There is another menu showing. Close the outermost menu (since we are |
| 333 // shown in the same menu, we don't want to close the whole thing). | 333 // shown in the same menu, we don't want to close the whole thing). |
| 334 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST); | 334 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST); |
| 335 return true; | 335 return true; |
| 336 } | 336 } |
| 337 } | 337 } |
| 338 | 338 |
| 339 return false; | 339 return false; |
| 340 } | 340 } |
| OLD | NEW |