OLD | NEW |
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 VIEWS_WIDGET_WIDGET_H_ | 5 #ifndef VIEWS_WIDGET_WIDGET_H_ |
6 #define VIEWS_WIDGET_WIDGET_H_ | 6 #define VIEWS_WIDGET_WIDGET_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "ui/gfx/native_widget_types.h" | 11 #include "ui/gfx/native_widget_types.h" |
12 | 12 |
13 namespace gfx { | 13 namespace gfx { |
14 class Path; | 14 class Path; |
15 class Point; | 15 class Point; |
16 class Rect; | 16 class Rect; |
17 } | 17 } |
18 | 18 |
19 namespace ui { | 19 namespace ui { |
20 class Accelerator; | 20 class Accelerator; |
| 21 class OSExchangeData; |
21 class ThemeProvider; | 22 class ThemeProvider; |
22 } | 23 } |
23 using ui::ThemeProvider; | 24 using ui::ThemeProvider; |
24 | 25 |
25 namespace views { | 26 namespace views { |
26 | 27 |
27 class FocusManager; | 28 class FocusManager; |
28 class RootView; | 29 class RootView; |
29 class TooltipManager; | 30 class TooltipManager; |
30 class View; | 31 class View; |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 // Note that all widgets in a widget hierarchy share the same focus manager. | 222 // Note that all widgets in a widget hierarchy share the same focus manager. |
222 virtual FocusManager* GetFocusManager() = 0; | 223 virtual FocusManager* GetFocusManager() = 0; |
223 | 224 |
224 // Forwarded from the RootView so that the widget can do any cleanup. | 225 // Forwarded from the RootView so that the widget can do any cleanup. |
225 virtual void ViewHierarchyChanged(bool is_add, View *parent, | 226 virtual void ViewHierarchyChanged(bool is_add, View *parent, |
226 View *child) = 0; | 227 View *child) = 0; |
227 | 228 |
228 // Returns true if the native view |native_view| is contained in the | 229 // Returns true if the native view |native_view| is contained in the |
229 // views::View hierarchy rooted at this widget. | 230 // views::View hierarchy rooted at this widget. |
230 virtual bool ContainsNativeView(gfx::NativeView native_view) = 0; | 231 virtual bool ContainsNativeView(gfx::NativeView native_view) = 0; |
| 232 |
| 233 // Starts a drag operation for the specified view. This blocks until done. |
| 234 // If the view has not been deleted during the drag, OnDragDone is invoked |
| 235 // on the view. |
| 236 // NOTE: |view| may be NULL. |
| 237 virtual void StartDragForViewFromMouseEvent(View* view, |
| 238 const ui::OSExchangeData& data, |
| 239 int operation) = 0; |
| 240 |
| 241 // If a view is dragging, this returns it. Otherwise returns NULL. |
| 242 virtual View* GetDraggedView() = 0; |
231 }; | 243 }; |
232 | 244 |
233 } // namespace views | 245 } // namespace views |
234 | 246 |
235 #endif // VIEWS_WIDGET_WIDGET_H_ | 247 #endif // VIEWS_WIDGET_WIDGET_H_ |
OLD | NEW |