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

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

Issue 2914043002: Changed extension buttons to use a flood-fill ripple when in the chrome menu. (Closed)
Patch Set: Created 3 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
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view.h ('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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
99 SkColor ToolbarActionView::GetInkDropBaseColor() const { 99 SkColor ToolbarActionView::GetInkDropBaseColor() const {
100 if (delegate_->ShownInsideMenu()) { 100 if (delegate_->ShownInsideMenu()) {
101 return GetNativeTheme()->GetSystemColor( 101 return GetNativeTheme()->GetSystemColor(
102 ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor); 102 ui::NativeTheme::kColorId_FocusedMenuItemBackgroundColor);
103 } 103 }
104 104
105 return GetThemeProvider()->GetColor( 105 return GetThemeProvider()->GetColor(
106 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON); 106 ThemeProperties::COLOR_TOOLBAR_BUTTON_ICON);
107 } 107 }
108 108
109 bool ToolbarActionView::ShouldUseFloodFillInkDrop() const {
110 return delegate_->ShownInsideMenu();
111 }
112
109 std::unique_ptr<views::InkDrop> ToolbarActionView::CreateInkDrop() { 113 std::unique_ptr<views::InkDrop> ToolbarActionView::CreateInkDrop() {
110 std::unique_ptr<views::InkDropImpl> ink_drop = 114 std::unique_ptr<views::InkDropImpl> ink_drop =
111 CustomButton::CreateDefaultInkDropImpl(); 115 CustomButton::CreateDefaultInkDropImpl();
112 ink_drop->SetShowHighlightOnHover(!delegate_->ShownInsideMenu()); 116 ink_drop->SetShowHighlightOnHover(!delegate_->ShownInsideMenu());
113 ink_drop->SetShowHighlightOnFocus(true); 117 ink_drop->SetShowHighlightOnFocus(true);
114 return std::move(ink_drop); 118 return std::move(ink_drop);
115 } 119 }
116 120
117 content::WebContents* ToolbarActionView::GetCurrentWebContents() const { 121 content::WebContents* ToolbarActionView::GetCurrentWebContents() const {
118 return delegate_->GetCurrentWebContents(); 122 return delegate_->GetCurrentWebContents();
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 if (menu_controller->in_nested_run()) { 315 if (menu_controller->in_nested_run()) {
312 // There is another menu showing. Close the outermost menu (since we are 316 // 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). 317 // shown in the same menu, we don't want to close the whole thing).
314 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST); 318 menu_controller->Cancel(views::MenuController::EXIT_OUTERMOST);
315 return true; 319 return true;
316 } 320 }
317 } 321 }
318 322
319 return false; 323 return false;
320 } 324 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698