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

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

Issue 1724963002: Color the ink drop ripple and hover effects based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sky review 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
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_button.h" 5 #include "chrome/browser/ui/views/toolbar/toolbar_button.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/location.h" 8 #include "base/location.h"
9 #include "base/single_thread_task_runner.h" 9 #include "base/single_thread_task_runner.h"
10 #include "base/thread_task_runner_handle.h" 10 #include "base/thread_task_runner_handle.h"
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 } 167 }
168 168
169 void ToolbarButton::AddInkDropLayer(ui::Layer* ink_drop_layer) { 169 void ToolbarButton::AddInkDropLayer(ui::Layer* ink_drop_layer) {
170 image()->SetPaintToLayer(true); 170 image()->SetPaintToLayer(true);
171 image()->SetFillsBoundsOpaquely(false); 171 image()->SetFillsBoundsOpaquely(false);
172 views::LabelButton::AddInkDropLayer(ink_drop_layer); 172 views::LabelButton::AddInkDropLayer(ink_drop_layer);
173 } 173 }
174 174
175 void ToolbarButton::RemoveInkDropLayer(ui::Layer* ink_drop_layer) { 175 void ToolbarButton::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
176 views::LabelButton::RemoveInkDropLayer(ink_drop_layer); 176 views::LabelButton::RemoveInkDropLayer(ink_drop_layer);
177 image()->SetFillsBoundsOpaquely(true);
178 image()->SetPaintToLayer(false); 177 image()->SetPaintToLayer(false);
179 } 178 }
180 179
181 void ToolbarButton::ShowContextMenuForView(View* source, 180 void ToolbarButton::ShowContextMenuForView(View* source,
182 const gfx::Point& point, 181 const gfx::Point& point,
183 ui::MenuSourceType source_type) { 182 ui::MenuSourceType source_type) {
184 if (!enabled()) 183 if (!enabled())
185 return; 184 return;
186 185
187 show_menu_factory_.InvalidateWeakPtrs(); 186 show_menu_factory_.InvalidateWeakPtrs();
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 SetMouseHandler(nullptr); 266 SetMouseHandler(nullptr);
268 267
269 // Set the state back to normal after the drop down menu is closed. 268 // Set the state back to normal after the drop down menu is closed.
270 if (state() != STATE_DISABLED) 269 if (state() != STATE_DISABLED)
271 SetState(STATE_NORMAL); 270 SetState(STATE_NORMAL);
272 } 271 }
273 272
274 const char* ToolbarButton::GetClassName() const { 273 const char* ToolbarButton::GetClassName() const {
275 return "ToolbarButton"; 274 return "ToolbarButton";
276 } 275 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/toolbar/toolbar_action_view.cc ('k') | chrome/browser/ui/views/toolbar/toolbar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698