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

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

Issue 1411833006: Refactoring to make adding ink drop animations easier (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Refactor ink drop animations (comments in ui/views/) Created 5 years 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 329 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // Need to explicitly clear mouse handler so that events get sent 340 // Need to explicitly clear mouse handler so that events get sent
341 // properly after the menu finishes running. If we don't do this, then 341 // properly after the menu finishes running. If we don't do this, then
342 // the first click to other parts of the UI is eaten. 342 // the first click to other parts of the UI is eaten.
343 SetMouseHandler(nullptr); 343 SetMouseHandler(nullptr);
344 344
345 // Set the state back to normal after the drop down menu is closed. 345 // Set the state back to normal after the drop down menu is closed.
346 if (state_ != STATE_DISABLED) 346 if (state_ != STATE_DISABLED)
347 SetState(STATE_NORMAL); 347 SetState(STATE_NORMAL);
348 } 348 }
349 349
350 const char* ToolbarButton::GetClassName() const {
351 return "ToolbarButton";
352 }
353
350 gfx::Point ToolbarButton::CalculateInkDropCenter() const { 354 gfx::Point ToolbarButton::CalculateInkDropCenter() const {
351 return GetLocalBounds().CenterPoint(); 355 return GetLocalBounds().CenterPoint();
352 } 356 }
353
354 const char* ToolbarButton::GetClassName() const {
355 return "ToolbarButton";
356 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698