OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ | 5 #ifndef UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ |
6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ | 6 #define UI_VIEWS_BUBBLE_TRAY_BUBBLE_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/views/bubble/bubble_delegate.h" | 11 #include "ui/views/bubble/bubble_delegate.h" |
11 #include "ui/views/mouse_watcher.h" | 12 #include "ui/views/mouse_watcher.h" |
12 #include "ui/views/views_export.h" | 13 #include "ui/views/views_export.h" |
13 | 14 |
14 namespace ui { | 15 namespace ui { |
15 class LocatedEvent; | 16 class LocatedEvent; |
16 } | 17 } |
17 | 18 |
18 namespace views { | 19 namespace views { |
19 class View; | 20 class View; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 void ViewHierarchyChanged( | 189 void ViewHierarchyChanged( |
189 const ViewHierarchyChangedDetails& details) override; | 190 const ViewHierarchyChangedDetails& details) override; |
190 | 191 |
191 private: | 192 private: |
192 InitParams params_; | 193 InitParams params_; |
193 Delegate* delegate_; | 194 Delegate* delegate_; |
194 int preferred_width_; | 195 int preferred_width_; |
195 // |bubble_border_| and |owned_bubble_border_| point to the same thing, but | 196 // |bubble_border_| and |owned_bubble_border_| point to the same thing, but |
196 // the latter ensures we don't leak it before passing off ownership. | 197 // the latter ensures we don't leak it before passing off ownership. |
197 internal::TrayBubbleBorder* bubble_border_; | 198 internal::TrayBubbleBorder* bubble_border_; |
198 scoped_ptr<views::BubbleBorder> owned_bubble_border_; | 199 std::unique_ptr<views::BubbleBorder> owned_bubble_border_; |
199 scoped_ptr<internal::TrayBubbleContentMask> bubble_content_mask_; | 200 std::unique_ptr<internal::TrayBubbleContentMask> bubble_content_mask_; |
200 bool is_gesture_dragging_; | 201 bool is_gesture_dragging_; |
201 | 202 |
202 // True once the mouse cursor was actively moved by the user over the bubble. | 203 // True once the mouse cursor was actively moved by the user over the bubble. |
203 // Only then the OnMouseExitedView() event will get passed on to listeners. | 204 // Only then the OnMouseExitedView() event will get passed on to listeners. |
204 bool mouse_actively_entered_; | 205 bool mouse_actively_entered_; |
205 | 206 |
206 // Used to find any mouse movements. | 207 // Used to find any mouse movements. |
207 scoped_ptr<MouseWatcher> mouse_watcher_; | 208 std::unique_ptr<MouseWatcher> mouse_watcher_; |
208 | 209 |
209 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); | 210 DISALLOW_COPY_AND_ASSIGN(TrayBubbleView); |
210 }; | 211 }; |
211 | 212 |
212 } // namespace views | 213 } // namespace views |
213 | 214 |
214 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ | 215 #endif // UI_VIEWS_BUBBLE_TRAY_BUBBLE_VIEW_H_ |
OLD | NEW |