| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_IMPL_H_ | 5 #ifndef VIEWS_WIDGET_WIDGET_IMPL_H_ |
| 6 #define VIEWS_WIDGET_WIDGET_IMPL_H_ | 6 #define VIEWS_WIDGET_WIDGET_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/logging.h" | 8 #include "base/logging.h" |
| 9 #include "base/scoped_ptr.h" | 9 #include "base/scoped_ptr.h" |
| 10 #include "base/task.h" | 10 #include "base/task.h" |
| (...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 142 const gfx::Point& point); | 142 const gfx::Point& point); |
| 143 virtual bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); | 143 virtual bool GetAccelerator(int cmd_id, ui::Accelerator* accelerator); |
| 144 virtual Window* GetWindow(); | 144 virtual Window* GetWindow(); |
| 145 virtual const Window* GetWindow() const; | 145 virtual const Window* GetWindow() const; |
| 146 virtual void SetNativeWindowProperty(const char* name, void* value); | 146 virtual void SetNativeWindowProperty(const char* name, void* value); |
| 147 virtual void* GetNativeWindowProperty(const char* name); | 147 virtual void* GetNativeWindowProperty(const char* name); |
| 148 virtual ThemeProvider* GetDefaultThemeProvider() const; | 148 virtual ThemeProvider* GetDefaultThemeProvider() const; |
| 149 virtual void ViewHierarchyChanged(bool is_add, View *parent, | 149 virtual void ViewHierarchyChanged(bool is_add, View *parent, |
| 150 View *child); | 150 View *child); |
| 151 virtual bool ContainsNativeView(gfx::NativeView native_view); | 151 virtual bool ContainsNativeView(gfx::NativeView native_view); |
| 152 virtual void StartDragForViewFromMouseEvent(View* view, |
| 153 const OSExchangeData& data, |
| 154 int operation); |
| 155 virtual View* GetDraggedView(); |
| 152 | 156 |
| 153 // Causes the Widget to be destroyed immediately. | 157 // Causes the Widget to be destroyed immediately. |
| 154 void CloseNow(); | 158 void CloseNow(); |
| 155 | 159 |
| 156 // A NativeWidget implementation. This can be changed dynamically to a | 160 // A NativeWidget implementation. This can be changed dynamically to a |
| 157 // different implementation during the lifetime of the Widget. | 161 // different implementation during the lifetime of the Widget. |
| 158 scoped_ptr<NativeWidget> native_widget_; | 162 scoped_ptr<NativeWidget> native_widget_; |
| 159 | 163 |
| 160 // A RootView that owns the View hierarchy within this Widget. | 164 // A RootView that owns the View hierarchy within this Widget. |
| 161 scoped_ptr<RootView> root_view_; | 165 scoped_ptr<RootView> root_view_; |
| (...skipping 11 matching lines...) Expand all Loading... |
| 173 | 177 |
| 174 // Handles closing the Widget after a return to the message loop to allow the | 178 // Handles closing the Widget after a return to the message loop to allow the |
| 175 // stack to unwind. | 179 // stack to unwind. |
| 176 ScopedRunnableMethodFactory<WidgetImpl> close_widget_factory_; | 180 ScopedRunnableMethodFactory<WidgetImpl> close_widget_factory_; |
| 177 | 181 |
| 178 // True if the Widget should be automatically deleted when it is destroyed. | 182 // True if the Widget should be automatically deleted when it is destroyed. |
| 179 bool delete_on_destroy_; | 183 bool delete_on_destroy_; |
| 180 | 184 |
| 181 scoped_ptr<FocusManager> focus_manager_; | 185 scoped_ptr<FocusManager> focus_manager_; |
| 182 | 186 |
| 187 // Valid for the lifetime of StartDragForViewFromMouseEvent, indicates the |
| 188 // view the drag started from. NULL at all other times. |
| 189 View* dragged_view_; |
| 190 |
| 183 DISALLOW_COPY_AND_ASSIGN(WidgetImpl); | 191 DISALLOW_COPY_AND_ASSIGN(WidgetImpl); |
| 184 }; | 192 }; |
| 185 | 193 |
| 186 } // namespace views | 194 } // namespace views |
| 187 | 195 |
| 188 #endif // VIEWS_WIDGET_WIDGET_IMPL_H_ | 196 #endif // VIEWS_WIDGET_WIDGET_IMPL_H_ |
| 189 | 197 |
| OLD | NEW |