| 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_WIDGET_NATIVE_WIDGET_AURA_H_ | 5 #ifndef UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 6 #define UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| 7 | 7 |
| 8 #include "base/memory/scoped_vector.h" | 8 #include "base/memory/scoped_vector.h" |
| 9 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
| 10 #include "ui/aura/client/activation_change_observer.h" | 10 #include "ui/aura/client/activation_change_observer.h" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 } | 22 } |
| 23 namespace gfx { | 23 namespace gfx { |
| 24 class Font; | 24 class Font; |
| 25 } | 25 } |
| 26 | 26 |
| 27 namespace views { | 27 namespace views { |
| 28 | 28 |
| 29 class DropHelper; | 29 class DropHelper; |
| 30 class NativeWidgetAuraWindowObserver; | 30 class NativeWidgetAuraWindowObserver; |
| 31 class TooltipManagerAura; | 31 class TooltipManagerAura; |
| 32 class WindowReorderer; |
| 32 | 33 |
| 33 class VIEWS_EXPORT NativeWidgetAura | 34 class VIEWS_EXPORT NativeWidgetAura |
| 34 : public internal::NativeWidgetPrivate, | 35 : public internal::NativeWidgetPrivate, |
| 35 public internal::InputMethodDelegate, | 36 public internal::InputMethodDelegate, |
| 36 public aura::WindowDelegate, | 37 public aura::WindowDelegate, |
| 37 public aura::client::ActivationDelegate, | 38 public aura::client::ActivationDelegate, |
| 38 public aura::client::ActivationChangeObserver, | 39 public aura::client::ActivationChangeObserver, |
| 39 public aura::client::FocusChangeObserver, | 40 public aura::client::FocusChangeObserver, |
| 40 public aura::client::DragDropDelegate { | 41 public aura::client::DragDropDelegate { |
| 41 public: | 42 public: |
| 42 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); | 43 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); |
| 43 | 44 |
| 44 // TODO(beng): Find a better place for this, and the similar method on | 45 // TODO(beng): Find a better place for this, and the similar method on |
| 45 // NativeWidgetWin. | 46 // NativeWidgetWin. |
| 46 static gfx::Font GetWindowTitleFont(); | 47 static gfx::Font GetWindowTitleFont(); |
| 47 | 48 |
| 48 // Overridden from internal::NativeWidgetPrivate: | 49 // Overridden from internal::NativeWidgetPrivate: |
| 49 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; | 50 virtual void InitNativeWidget(const Widget::InitParams& params) OVERRIDE; |
| 50 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; | 51 virtual NonClientFrameView* CreateNonClientFrameView() OVERRIDE; |
| 51 virtual bool ShouldUseNativeFrame() const OVERRIDE; | 52 virtual bool ShouldUseNativeFrame() const OVERRIDE; |
| 52 virtual void FrameTypeChanged() OVERRIDE; | 53 virtual void FrameTypeChanged() OVERRIDE; |
| 53 virtual Widget* GetWidget() OVERRIDE; | 54 virtual Widget* GetWidget() OVERRIDE; |
| 54 virtual const Widget* GetWidget() const OVERRIDE; | 55 virtual const Widget* GetWidget() const OVERRIDE; |
| 55 virtual gfx::NativeView GetNativeView() const OVERRIDE; | 56 virtual gfx::NativeView GetNativeView() const OVERRIDE; |
| 56 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; | 57 virtual gfx::NativeWindow GetNativeWindow() const OVERRIDE; |
| 57 virtual Widget* GetTopLevelWidget() OVERRIDE; | 58 virtual Widget* GetTopLevelWidget() OVERRIDE; |
| 58 virtual const ui::Compositor* GetCompositor() const OVERRIDE; | 59 virtual const ui::Compositor* GetCompositor() const OVERRIDE; |
| 59 virtual ui::Compositor* GetCompositor() OVERRIDE; | 60 virtual ui::Compositor* GetCompositor() OVERRIDE; |
| 60 virtual ui::Layer* GetLayer() OVERRIDE; | 61 virtual ui::Layer* GetLayer() OVERRIDE; |
| 62 virtual void ReorderNativeViews() OVERRIDE; |
| 61 virtual void ViewRemoved(View* view) OVERRIDE; | 63 virtual void ViewRemoved(View* view) OVERRIDE; |
| 62 virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE; | 64 virtual void SetNativeWindowProperty(const char* name, void* value) OVERRIDE; |
| 63 virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE; | 65 virtual void* GetNativeWindowProperty(const char* name) const OVERRIDE; |
| 64 virtual TooltipManager* GetTooltipManager() const OVERRIDE; | 66 virtual TooltipManager* GetTooltipManager() const OVERRIDE; |
| 65 virtual void SetCapture() OVERRIDE; | 67 virtual void SetCapture() OVERRIDE; |
| 66 virtual void ReleaseCapture() OVERRIDE; | 68 virtual void ReleaseCapture() OVERRIDE; |
| 67 virtual bool HasCapture() const OVERRIDE; | 69 virtual bool HasCapture() const OVERRIDE; |
| 68 virtual InputMethod* CreateInputMethod() OVERRIDE; | 70 virtual InputMethod* CreateInputMethod() OVERRIDE; |
| 69 virtual internal::InputMethodDelegate* GetInputMethodDelegate() OVERRIDE; | 71 virtual internal::InputMethodDelegate* GetInputMethodDelegate() OVERRIDE; |
| 70 virtual void CenterWindow(const gfx::Size& size) OVERRIDE; | 72 virtual void CenterWindow(const gfx::Size& size) OVERRIDE; |
| (...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 198 // Are we in the destructor? | 200 // Are we in the destructor? |
| 199 bool destroying_; | 201 bool destroying_; |
| 200 | 202 |
| 201 gfx::NativeCursor cursor_; | 203 gfx::NativeCursor cursor_; |
| 202 | 204 |
| 203 // The saved window state for exiting full screen state. | 205 // The saved window state for exiting full screen state. |
| 204 ui::WindowShowState saved_window_state_; | 206 ui::WindowShowState saved_window_state_; |
| 205 | 207 |
| 206 scoped_ptr<TooltipManagerAura> tooltip_manager_; | 208 scoped_ptr<TooltipManagerAura> tooltip_manager_; |
| 207 | 209 |
| 210 // Reorders child windows of |window_| associated with a view based on the |
| 211 // order of the associated views in the widget's view hierarchy. |
| 212 scoped_ptr<WindowReorderer> window_reorderer_; |
| 213 |
| 208 scoped_ptr<NativeWidgetAuraWindowObserver> active_window_observer_; | 214 scoped_ptr<NativeWidgetAuraWindowObserver> active_window_observer_; |
| 209 | 215 |
| 210 scoped_ptr<DropHelper> drop_helper_; | 216 scoped_ptr<DropHelper> drop_helper_; |
| 211 int last_drop_operation_; | 217 int last_drop_operation_; |
| 212 | 218 |
| 213 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); | 219 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); |
| 214 }; | 220 }; |
| 215 | 221 |
| 216 } // namespace views | 222 } // namespace views |
| 217 | 223 |
| 218 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 224 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| OLD | NEW |