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

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

Issue 2034963002: Rename InkDropHover to InkDropHighlight (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: relative patchset Created 4 years, 6 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 SkColor ToolbarActionView::GetInkDropBaseColor() const { 110 SkColor ToolbarActionView::GetInkDropBaseColor() const {
111 if (delegate_->ShownInsideMenu()) { 111 if (delegate_->ShownInsideMenu()) {
112 return GetNativeTheme()->GetSystemColor( 112 return GetNativeTheme()->GetSystemColor(
113 ui::NativeTheme::kColorId_HoverMenuItemBackgroundColor); 113 ui::NativeTheme::kColorId_HoverMenuItemBackgroundColor);
114 } 114 }
115 115
116 return GetThemeProvider()->GetColor( 116 return GetThemeProvider()->GetColor(
117 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); 117 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
118 } 118 }
119 119
120 bool ToolbarActionView::ShouldShowInkDropHover() const { 120 bool ToolbarActionView::ShouldShowInkDropHighlight() const {
121 return !delegate_->ShownInsideMenu() && 121 return !delegate_->ShownInsideMenu() &&
122 views::MenuButton::ShouldShowInkDropHover(); 122 views::MenuButton::ShouldShowInkDropHighlight();
123 } 123 }
124 124
125 content::WebContents* ToolbarActionView::GetCurrentWebContents() const { 125 content::WebContents* ToolbarActionView::GetCurrentWebContents() const {
126 return delegate_->GetCurrentWebContents(); 126 return delegate_->GetCurrentWebContents();
127 } 127 }
128 128
129 void ToolbarActionView::UpdateState() { 129 void ToolbarActionView::UpdateState() {
130 content::WebContents* web_contents = GetCurrentWebContents(); 130 content::WebContents* web_contents = GetCurrentWebContents();
131 if (SessionTabHelper::IdForTab(web_contents) < 0) 131 if (SessionTabHelper::IdForTab(web_contents) < 0)
132 return; 132 return;
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 if (menu_controller->in_nested_run()) { 323 if (menu_controller->in_nested_run()) {
324 // There is another menu showing. Close the outermost menu (since we are 324 // There is another menu showing. Close the outermost menu (since we are
325 // shown in the same menu, we don't want to close the whole thing). 325 // shown in the same menu, we don't want to close the whole thing).
326 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST); 326 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST);
327 return true; 327 return true;
328 } 328 }
329 } 329 }
330 330
331 return false; 331 return false;
332 } 332 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698