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

Side by Side Diff: chrome/browser/ui/views/location_bar/bubble_icon_view.h

Issue 2720183002: [Views] Update ink drop for omnibox icons (Closed)
Patch Set: Removed CanProcessEventsWithinSubtree Created 3 years, 7 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 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ 6 #define CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_
7 7
8 #include <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "ui/gfx/image/image_skia.h" 11 #include "ui/gfx/image/image_skia.h"
12 #include "ui/views/animation/ink_drop_host_view.h" 12 #include "ui/views/animation/ink_drop_host_view.h"
13 #include "ui/views/controls/image_view.h" 13 #include "ui/views/controls/image_view.h"
14 #include "ui/views/widget/widget_observer.h" 14 #include "ui/views/widget/widget_observer.h"
15 15
16 class CommandUpdater; 16 class CommandUpdater;
17 17
18 namespace gfx { 18 namespace gfx {
19 struct VectorIcon; 19 struct VectorIcon;
20 } 20 }
21 21
22 namespace views { 22 namespace views {
23 class BubbleDialogDelegateView; 23 class BubbleDialogDelegateView;
24 } 24 }
25 25
26 // Represents an icon on the omnibox that shows a bubble when clicked. 26 // Represents an icon on the omnibox that shows a bubble when clicked.
27 // TODO(spqchan): Convert this to subclass CustomButton.
27 class BubbleIconView : public views::InkDropHostView, 28 class BubbleIconView : public views::InkDropHostView,
28 public views::WidgetObserver { 29 public views::WidgetObserver {
29 public: 30 public:
30 void Init(); 31 void Init();
31 32
32 protected: 33 protected:
33 enum ExecuteSource { 34 enum ExecuteSource {
34 EXECUTE_SOURCE_MOUSE, 35 EXECUTE_SOURCE_MOUSE,
35 EXECUTE_SOURCE_KEYBOARD, 36 EXECUTE_SOURCE_KEYBOARD,
36 EXECUTE_SOURCE_GESTURE, 37 EXECUTE_SOURCE_GESTURE,
(...skipping 30 matching lines...) Expand all
67 bool OnMousePressed(const ui::MouseEvent& event) override; 68 bool OnMousePressed(const ui::MouseEvent& event) override;
68 void OnMouseReleased(const ui::MouseEvent& event) override; 69 void OnMouseReleased(const ui::MouseEvent& event) override;
69 bool OnKeyPressed(const ui::KeyEvent& event) override; 70 bool OnKeyPressed(const ui::KeyEvent& event) override;
70 bool OnKeyReleased(const ui::KeyEvent& event) override; 71 bool OnKeyReleased(const ui::KeyEvent& event) override;
71 void ViewHierarchyChanged( 72 void ViewHierarchyChanged(
72 const ViewHierarchyChangedDetails& details) override; 73 const ViewHierarchyChangedDetails& details) override;
73 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; 74 void OnNativeThemeChanged(const ui::NativeTheme* theme) override;
74 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; 75 void AddInkDropLayer(ui::Layer* ink_drop_layer) override;
75 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; 76 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override;
76 std::unique_ptr<views::InkDrop> CreateInkDrop() override; 77 std::unique_ptr<views::InkDrop> CreateInkDrop() override;
78 std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override;
77 SkColor GetInkDropBaseColor() const override; 79 SkColor GetInkDropBaseColor() const override;
78 80
79 // ui::EventHandler: 81 // ui::EventHandler:
80 void OnGestureEvent(ui::GestureEvent* event) override; 82 void OnGestureEvent(ui::GestureEvent* event) override;
81 83
82 // views::WidgetObserver: 84 // views::WidgetObserver:
83 void OnWidgetDestroying(views::Widget* widget) override; 85 void OnWidgetDestroying(views::Widget* widget) override;
84 void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override; 86 void OnWidgetVisibilityChanged(views::Widget* widget, bool visible) override;
85 87
86 protected: 88 protected:
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 124
123 // This is used to check if the bookmark bubble was showing during the mouse 125 // This is used to check if the bookmark bubble was showing during the mouse
124 // pressed event. If this is true then the mouse released event is ignored to 126 // pressed event. If this is true then the mouse released event is ignored to
125 // prevent the bubble from reshowing. 127 // prevent the bubble from reshowing.
126 bool suppress_mouse_released_action_; 128 bool suppress_mouse_released_action_;
127 129
128 DISALLOW_COPY_AND_ASSIGN(BubbleIconView); 130 DISALLOW_COPY_AND_ASSIGN(BubbleIconView);
129 }; 131 };
130 132
131 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ 133 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/frame/browser_view.cc ('k') | chrome/browser/ui/views/location_bar/bubble_icon_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698