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

Side by Side Diff: chrome/browser/ui/views/bar_control_button.h

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 (nits 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
« no previous file with comments | « no previous file | chrome/browser/ui/views/bar_control_button.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #ifndef CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_
6 #define CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_ 6 #define CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/macros.h" 9 #include "base/macros.h"
10 #include "ui/views/animation/ink_drop_host.h" 10 #include "ui/views/animation/ink_drop_host.h"
(...skipping 25 matching lines...) Expand all
36 void Layout() override; 36 void Layout() override;
37 bool OnMousePressed(const ui::MouseEvent& event) override; 37 bool OnMousePressed(const ui::MouseEvent& event) override;
38 void OnGestureEvent(ui::GestureEvent* event) override; 38 void OnGestureEvent(ui::GestureEvent* event) override;
39 void OnMouseReleased(const ui::MouseEvent& event) override; 39 void OnMouseReleased(const ui::MouseEvent& event) override;
40 void NotifyClick(const ui::Event& event) override; 40 void NotifyClick(const ui::Event& event) override;
41 41
42 private: 42 private:
43 // views::InkDropHost: 43 // views::InkDropHost:
44 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; 44 void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
45 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; 45 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
46 gfx::Point CalculateInkDropCenter() const override;
46 47
47 gfx::VectorIconId id_; 48 gfx::VectorIconId id_;
48 base::Callback<SkColor(void)> get_text_color_callback_; 49 base::Callback<SkColor(void)> get_text_color_callback_;
49 50
50 // Animation controller for the ink drop ripple effect. 51 // Animation controller for the ink drop ripple effect.
51 scoped_ptr<views::InkDropAnimationController> ink_drop_animation_controller_; 52 scoped_ptr<views::InkDropAnimationController> ink_drop_animation_controller_;
52 53
53 DISALLOW_COPY_AND_ASSIGN(BarControlButton); 54 DISALLOW_COPY_AND_ASSIGN(BarControlButton);
54 }; 55 };
55 56
56 #endif // CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_ 57 #endif // CHROME_BROWSER_UI_VIEWS_BAR_CONTROL_BUTTON_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/views/bar_control_button.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698