OLD | NEW |
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> |
| 9 |
8 #include "base/macros.h" | 10 #include "base/macros.h" |
9 #include "base/memory/scoped_ptr.h" | |
10 #include "ui/gfx/image/image_skia.h" | 11 #include "ui/gfx/image/image_skia.h" |
11 #include "ui/gfx/vector_icons_public.h" | 12 #include "ui/gfx/vector_icons_public.h" |
12 #include "ui/views/animation/ink_drop_host_view.h" | 13 #include "ui/views/animation/ink_drop_host_view.h" |
13 #include "ui/views/controls/image_view.h" | 14 #include "ui/views/controls/image_view.h" |
14 #include "ui/views/widget/widget_observer.h" | 15 #include "ui/views/widget/widget_observer.h" |
15 | 16 |
16 class CommandUpdater; | 17 class CommandUpdater; |
17 | 18 |
18 namespace gfx { | 19 namespace gfx { |
19 enum class VectorIconId; | 20 enum class VectorIconId; |
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 gfx::Size GetPreferredSize() const override; | 61 gfx::Size GetPreferredSize() const override; |
61 void Layout() override; | 62 void Layout() override; |
62 bool OnMousePressed(const ui::MouseEvent& event) override; | 63 bool OnMousePressed(const ui::MouseEvent& event) override; |
63 void OnMouseReleased(const ui::MouseEvent& event) override; | 64 void OnMouseReleased(const ui::MouseEvent& event) override; |
64 bool OnKeyPressed(const ui::KeyEvent& event) override; | 65 bool OnKeyPressed(const ui::KeyEvent& event) override; |
65 void ViewHierarchyChanged( | 66 void ViewHierarchyChanged( |
66 const ViewHierarchyChangedDetails& details) override; | 67 const ViewHierarchyChangedDetails& details) override; |
67 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; | 68 void OnNativeThemeChanged(const ui::NativeTheme* theme) override; |
68 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; | 69 void AddInkDropLayer(ui::Layer* ink_drop_layer) override; |
69 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; | 70 void RemoveInkDropLayer(ui::Layer* ink_drop_layer) override; |
70 scoped_ptr<views::InkDropHover> CreateInkDropHover() const override; | 71 std::unique_ptr<views::InkDropHover> CreateInkDropHover() const override; |
71 SkColor GetInkDropBaseColor() const override; | 72 SkColor GetInkDropBaseColor() const override; |
72 | 73 |
73 // ui::EventHandler: | 74 // ui::EventHandler: |
74 void OnGestureEvent(ui::GestureEvent* event) override; | 75 void OnGestureEvent(ui::GestureEvent* event) override; |
75 | 76 |
76 // views::WidgetObserver: | 77 // views::WidgetObserver: |
77 void OnWidgetDestroying(views::Widget* widget) override; | 78 void OnWidgetDestroying(views::Widget* widget) override; |
78 void OnWidgetVisibilityChanged(views::Widget* widget, | 79 void OnWidgetVisibilityChanged(views::Widget* widget, |
79 bool visible) override; | 80 bool visible) override; |
80 | 81 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 // subclass, but generally indicates that the associated feature is acting on | 121 // subclass, but generally indicates that the associated feature is acting on |
121 // the web page. | 122 // the web page. |
122 bool active_; | 123 bool active_; |
123 | 124 |
124 // 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 |
125 // 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 |
126 // prevent the bubble from reshowing. | 127 // prevent the bubble from reshowing. |
127 bool suppress_mouse_released_action_; | 128 bool suppress_mouse_released_action_; |
128 | 129 |
129 // Animation delegate for the ink drop ripple effect. | 130 // Animation delegate for the ink drop ripple effect. |
130 scoped_ptr<views::InkDropDelegate> ink_drop_delegate_; | 131 std::unique_ptr<views::InkDropDelegate> ink_drop_delegate_; |
131 | 132 |
132 DISALLOW_COPY_AND_ASSIGN(BubbleIconView); | 133 DISALLOW_COPY_AND_ASSIGN(BubbleIconView); |
133 }; | 134 }; |
134 | 135 |
135 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ | 136 #endif // CHROME_BROWSER_UI_VIEWS_LOCATION_BAR_BUBBLE_ICON_VIEW_H_ |
OLD | NEW |