| 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/focus_change_observer.h" | 10 #include "ui/aura/client/focus_change_observer.h" |
| 11 #include "ui/aura/window_delegate.h" | 11 #include "ui/aura/window_delegate.h" |
| 12 #include "ui/aura/window_observer.h" | 12 #include "ui/aura/window_observer.h" |
| 13 #include "ui/base/cursor/cursor.h" | 13 #include "ui/base/cursor/cursor.h" |
| 14 #include "ui/events/event_constants.h" | 14 #include "ui/events/event_constants.h" |
| 15 #include "ui/views/ime/input_method_delegate.h" | |
| 16 #include "ui/views/views_export.h" | 15 #include "ui/views/views_export.h" |
| 17 #include "ui/views/widget/native_widget_private.h" | 16 #include "ui/views/widget/native_widget_private.h" |
| 18 #include "ui/wm/public/activation_change_observer.h" | 17 #include "ui/wm/public/activation_change_observer.h" |
| 19 #include "ui/wm/public/activation_delegate.h" | 18 #include "ui/wm/public/activation_delegate.h" |
| 20 #include "ui/wm/public/drag_drop_delegate.h" | 19 #include "ui/wm/public/drag_drop_delegate.h" |
| 21 | 20 |
| 22 namespace aura { | 21 namespace aura { |
| 23 class Window; | 22 class Window; |
| 24 } | 23 } |
| 25 namespace gfx { | 24 namespace gfx { |
| 26 class FontList; | 25 class FontList; |
| 27 } | 26 } |
| 28 | 27 |
| 29 namespace views { | 28 namespace views { |
| 30 | 29 |
| 31 class DropHelper; | 30 class DropHelper; |
| 32 class TooltipManagerAura; | 31 class TooltipManagerAura; |
| 33 class WindowReorderer; | 32 class WindowReorderer; |
| 34 | 33 |
| 35 class VIEWS_EXPORT NativeWidgetAura | 34 class VIEWS_EXPORT NativeWidgetAura |
| 36 : public internal::NativeWidgetPrivate, | 35 : public internal::NativeWidgetPrivate, |
| 37 public internal::InputMethodDelegate, | |
| 38 public aura::WindowDelegate, | 36 public aura::WindowDelegate, |
| 39 public aura::WindowObserver, | 37 public aura::WindowObserver, |
| 40 public aura::client::ActivationDelegate, | 38 public aura::client::ActivationDelegate, |
| 41 public aura::client::ActivationChangeObserver, | 39 public aura::client::ActivationChangeObserver, |
| 42 public aura::client::FocusChangeObserver, | 40 public aura::client::FocusChangeObserver, |
| 43 public aura::client::DragDropDelegate { | 41 public aura::client::DragDropDelegate { |
| 44 public: | 42 public: |
| 45 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); | 43 explicit NativeWidgetAura(internal::NativeWidgetDelegate* delegate); |
| 46 | 44 |
| 47 // Called internally by NativeWidgetAura and DesktopNativeWidgetAura to | 45 // Called internally by NativeWidgetAura and DesktopNativeWidgetAura to |
| (...skipping 16 matching lines...) Expand all Loading... |
| 64 const ui::Compositor* GetCompositor() const override; | 62 const ui::Compositor* GetCompositor() const override; |
| 65 const ui::Layer* GetLayer() const override; | 63 const ui::Layer* GetLayer() const override; |
| 66 void ReorderNativeViews() override; | 64 void ReorderNativeViews() override; |
| 67 void ViewRemoved(View* view) override; | 65 void ViewRemoved(View* view) override; |
| 68 void SetNativeWindowProperty(const char* name, void* value) override; | 66 void SetNativeWindowProperty(const char* name, void* value) override; |
| 69 void* GetNativeWindowProperty(const char* name) const override; | 67 void* GetNativeWindowProperty(const char* name) const override; |
| 70 TooltipManager* GetTooltipManager() const override; | 68 TooltipManager* GetTooltipManager() const override; |
| 71 void SetCapture() override; | 69 void SetCapture() override; |
| 72 void ReleaseCapture() override; | 70 void ReleaseCapture() override; |
| 73 bool HasCapture() const override; | 71 bool HasCapture() const override; |
| 74 InputMethod* CreateInputMethod() override; | 72 ui::InputMethod* GetInputMethod() override; |
| 75 internal::InputMethodDelegate* GetInputMethodDelegate() override; | |
| 76 ui::InputMethod* GetHostInputMethod() override; | |
| 77 void CenterWindow(const gfx::Size& size) override; | 73 void CenterWindow(const gfx::Size& size) override; |
| 78 void GetWindowPlacement(gfx::Rect* bounds, | 74 void GetWindowPlacement(gfx::Rect* bounds, |
| 79 ui::WindowShowState* maximized) const override; | 75 ui::WindowShowState* maximized) const override; |
| 80 bool SetWindowTitle(const base::string16& title) override; | 76 bool SetWindowTitle(const base::string16& title) override; |
| 81 void SetWindowIcons(const gfx::ImageSkia& window_icon, | 77 void SetWindowIcons(const gfx::ImageSkia& window_icon, |
| 82 const gfx::ImageSkia& app_icon) override; | 78 const gfx::ImageSkia& app_icon) override; |
| 83 void InitModalType(ui::ModalType modal_type) override; | 79 void InitModalType(ui::ModalType modal_type) override; |
| 84 gfx::Rect GetWindowBoundsInScreen() const override; | 80 gfx::Rect GetWindowBoundsInScreen() const override; |
| 85 gfx::Rect GetClientAreaBoundsInScreen() const override; | 81 gfx::Rect GetClientAreaBoundsInScreen() const override; |
| 86 gfx::Rect GetRestoredBounds() const override; | 82 gfx::Rect GetRestoredBounds() const override; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 void SetVisibilityChangedAnimationsEnabled(bool value) override; | 127 void SetVisibilityChangedAnimationsEnabled(bool value) override; |
| 132 void SetVisibilityAnimationDuration(const base::TimeDelta& duration) override; | 128 void SetVisibilityAnimationDuration(const base::TimeDelta& duration) override; |
| 133 void SetVisibilityAnimationTransition( | 129 void SetVisibilityAnimationTransition( |
| 134 Widget::VisibilityTransition transition) override; | 130 Widget::VisibilityTransition transition) override; |
| 135 ui::NativeTheme* GetNativeTheme() const override; | 131 ui::NativeTheme* GetNativeTheme() const override; |
| 136 void OnRootViewLayout() override; | 132 void OnRootViewLayout() override; |
| 137 bool IsTranslucentWindowOpacitySupported() const override; | 133 bool IsTranslucentWindowOpacitySupported() const override; |
| 138 void OnSizeConstraintsChanged() override; | 134 void OnSizeConstraintsChanged() override; |
| 139 void RepostNativeEvent(gfx::NativeEvent native_event) override; | 135 void RepostNativeEvent(gfx::NativeEvent native_event) override; |
| 140 | 136 |
| 141 // Overridden from views::InputMethodDelegate: | |
| 142 void DispatchKeyEventPostIME(const ui::KeyEvent& key) override; | |
| 143 | |
| 144 // Overridden from aura::WindowDelegate: | 137 // Overridden from aura::WindowDelegate: |
| 145 gfx::Size GetMinimumSize() const override; | 138 gfx::Size GetMinimumSize() const override; |
| 146 gfx::Size GetMaximumSize() const override; | 139 gfx::Size GetMaximumSize() const override; |
| 147 void OnBoundsChanged(const gfx::Rect& old_bounds, | 140 void OnBoundsChanged(const gfx::Rect& old_bounds, |
| 148 const gfx::Rect& new_bounds) override; | 141 const gfx::Rect& new_bounds) override; |
| 149 ui::TextInputClient* GetFocusedTextInputClient() override; | 142 ui::TextInputClient* GetFocusedTextInputClient() override; |
| 150 gfx::NativeCursor GetCursor(const gfx::Point& point) override; | 143 gfx::NativeCursor GetCursor(const gfx::Point& point) override; |
| 151 int GetNonClientComponent(const gfx::Point& point) const override; | 144 int GetNonClientComponent(const gfx::Point& point) const override; |
| 152 bool ShouldDescendIntoChildForEventHandling( | 145 bool ShouldDescendIntoChildForEventHandling( |
| 153 aura::Window* child, | 146 aura::Window* child, |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 // The following factory is used for calls to close the NativeWidgetAura | 225 // The following factory is used for calls to close the NativeWidgetAura |
| 233 // instance. | 226 // instance. |
| 234 base::WeakPtrFactory<NativeWidgetAura> close_widget_factory_; | 227 base::WeakPtrFactory<NativeWidgetAura> close_widget_factory_; |
| 235 | 228 |
| 236 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); | 229 DISALLOW_COPY_AND_ASSIGN(NativeWidgetAura); |
| 237 }; | 230 }; |
| 238 | 231 |
| 239 } // namespace views | 232 } // namespace views |
| 240 | 233 |
| 241 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ | 234 #endif // UI_VIEWS_WIDGET_NATIVE_WIDGET_AURA_H_ |
| OLD | NEW |