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

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

Issue 1805393002: Added MediaRouterUIBrowserTest::toolbar_action_view_ to a Widget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Updated incorrect doc. Created 4 years, 9 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/media_router/media_router_ui_browsertest.cc ('k') | 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/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
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 return GetThemeProvider()->GetColor(
123 ? GetThemeProvider()->GetColor( 123 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
124 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON)
125 : CustomButton::GetInkDropBaseColor();
126 } 124 }
127 125
128 bool ToolbarActionView::ShouldShowInkDropHover() const { 126 bool ToolbarActionView::ShouldShowInkDropHover() const {
129 return !delegate_->ShownInsideMenu() && 127 return !delegate_->ShownInsideMenu() &&
130 views::MenuButton::ShouldShowInkDropHover(); 128 views::MenuButton::ShouldShowInkDropHover();
131 } 129 }
132 130
133 content::WebContents* ToolbarActionView::GetCurrentWebContents() const { 131 content::WebContents* ToolbarActionView::GetCurrentWebContents() const {
134 return delegate_->GetCurrentWebContents(); 132 return delegate_->GetCurrentWebContents();
135 } 133 }
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 if (menu_controller->in_nested_run()) { 329 if (menu_controller->in_nested_run()) {
332 // There is another menu showing. Close the outermost menu (since we are 330 // 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). 331 // shown in the same menu, we don't want to close the whole thing).
334 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST); 332 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST);
335 return true; 333 return true;
336 } 334 }
337 } 335 }
338 336
339 return false; 337 return false;
340 } 338 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/media_router/media_router_ui_browsertest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698