| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_ | 5 #ifndef MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_ |
| 6 #define MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_ | 6 #define MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_ |
| 7 | 7 |
| 8 #include "mojo/aura/window_tree_host_mojo_delegate.h" | 8 #include "mojo/aura/window_tree_host_mojo_delegate.h" |
| 9 #include "mojo/services/public/cpp/view_manager/node_observer.h" | 9 #include "mojo/services/public/cpp/view_manager/view_observer.h" |
| 10 #include "ui/views/widget/native_widget_aura.h" | 10 #include "ui/views/widget/native_widget_aura.h" |
| 11 | 11 |
| 12 namespace ui { | 12 namespace ui { |
| 13 namespace internal { | 13 namespace internal { |
| 14 class InputMethodDelegate; | 14 class InputMethodDelegate; |
| 15 } | 15 } |
| 16 } | 16 } |
| 17 | 17 |
| 18 namespace wm { | 18 namespace wm { |
| 19 class FocusController; | 19 class FocusController; |
| 20 class ScopedCaptureClient; | 20 class ScopedCaptureClient; |
| 21 } | 21 } |
| 22 | 22 |
| 23 namespace mojo { | 23 namespace mojo { |
| 24 | 24 |
| 25 class WindowTreeHostMojo; | 25 class WindowTreeHostMojo; |
| 26 | 26 |
| 27 class NativeWidgetViewManager : public views::NativeWidgetAura, | 27 class NativeWidgetViewManager : public views::NativeWidgetAura, |
| 28 public WindowTreeHostMojoDelegate, | 28 public WindowTreeHostMojoDelegate, |
| 29 public NodeObserver { | 29 public ViewObserver { |
| 30 public: | 30 public: |
| 31 NativeWidgetViewManager(views::internal::NativeWidgetDelegate* delegate, | 31 NativeWidgetViewManager(views::internal::NativeWidgetDelegate* delegate, |
| 32 Node* node); | 32 View* view); |
| 33 virtual ~NativeWidgetViewManager(); | 33 virtual ~NativeWidgetViewManager(); |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 // Overridden from internal::NativeWidgetAura: | 36 // Overridden from internal::NativeWidgetAura: |
| 37 virtual void InitNativeWidget( | 37 virtual void InitNativeWidget( |
| 38 const views::Widget::InitParams& in_params) OVERRIDE; | 38 const views::Widget::InitParams& in_params) OVERRIDE; |
| 39 | 39 |
| 40 // WindowTreeHostMojoDelegate: | 40 // WindowTreeHostMojoDelegate: |
| 41 virtual void CompositorContentsChanged(const SkBitmap& bitmap) OVERRIDE; | 41 virtual void CompositorContentsChanged(const SkBitmap& bitmap) OVERRIDE; |
| 42 | 42 |
| 43 // NodeObserver: | 43 // ViewObserver: |
| 44 virtual void OnNodeDestroyed(Node* node) OVERRIDE; | 44 virtual void OnViewDestroyed(View* view) OVERRIDE; |
| 45 virtual void OnNodeBoundsChanged(Node* node, | 45 virtual void OnViewBoundsChanged(View* view, |
| 46 const gfx::Rect& old_bounds, | 46 const gfx::Rect& old_bounds, |
| 47 const gfx::Rect& new_bounds) OVERRIDE; | 47 const gfx::Rect& new_bounds) OVERRIDE; |
| 48 virtual void OnNodeInputEvent(Node* node, const EventPtr& event) OVERRIDE; | 48 virtual void OnViewInputEvent(View* view, const EventPtr& event) OVERRIDE; |
| 49 | 49 |
| 50 scoped_ptr<WindowTreeHostMojo> window_tree_host_; | 50 scoped_ptr<WindowTreeHostMojo> window_tree_host_; |
| 51 | 51 |
| 52 scoped_ptr<wm::FocusController> focus_client_; | 52 scoped_ptr<wm::FocusController> focus_client_; |
| 53 | 53 |
| 54 scoped_ptr<ui::internal::InputMethodDelegate> ime_filter_; | 54 scoped_ptr<ui::internal::InputMethodDelegate> ime_filter_; |
| 55 | 55 |
| 56 Node* node_; | 56 View* view_; |
| 57 | 57 |
| 58 scoped_ptr<wm::ScopedCaptureClient> capture_client_; | 58 scoped_ptr<wm::ScopedCaptureClient> capture_client_; |
| 59 | 59 |
| 60 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViewManager); | 60 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViewManager); |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace mojo | 63 } // namespace mojo |
| 64 | 64 |
| 65 #endif // MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_ | 65 #endif // MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_ |
| OLD | NEW |