| 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 "mojo/services/public/cpp/view_manager/view_observer.h" |
| 10 #include "ui/views/widget/native_widget_aura.h" | 11 #include "ui/views/widget/native_widget_aura.h" |
| 11 | 12 |
| 12 namespace ui { | 13 namespace ui { |
| 13 namespace internal { | 14 namespace internal { |
| 14 class InputMethodDelegate; | 15 class InputMethodDelegate; |
| 15 } | 16 } |
| 16 } | 17 } |
| 17 | 18 |
| 18 namespace wm { | 19 namespace wm { |
| 19 class FocusController; | 20 class FocusController; |
| 20 } | 21 } |
| 21 | 22 |
| 22 namespace mojo { | 23 namespace mojo { |
| 23 | 24 |
| 24 class WindowTreeHostMojo; | 25 class WindowTreeHostMojo; |
| 25 | 26 |
| 26 class NativeWidgetViewManager : public views::NativeWidgetAura, | 27 class NativeWidgetViewManager : public views::NativeWidgetAura, |
| 27 public WindowTreeHostMojoDelegate, | 28 public WindowTreeHostMojoDelegate, |
| 28 public view_manager::ViewObserver { | 29 public view_manager::ViewObserver, |
| 30 public view_manager::NodeObserver { |
| 29 public: | 31 public: |
| 30 NativeWidgetViewManager(views::internal::NativeWidgetDelegate* delegate, | 32 NativeWidgetViewManager(views::internal::NativeWidgetDelegate* delegate, |
| 31 view_manager::View* view); | 33 view_manager::Node* node); |
| 32 virtual ~NativeWidgetViewManager(); | 34 virtual ~NativeWidgetViewManager(); |
| 33 | 35 |
| 34 private: | 36 private: |
| 35 // Overridden from internal::NativeWidgetPrivate: | 37 // Overridden from internal::NativeWidgetPrivate: |
| 36 virtual void InitNativeWidget( | 38 virtual void InitNativeWidget( |
| 37 const views::Widget::InitParams& in_params) OVERRIDE; | 39 const views::Widget::InitParams& in_params) OVERRIDE; |
| 38 | 40 |
| 39 // WindowTreeHostMojoDelegate: | 41 // WindowTreeHostMojoDelegate: |
| 40 virtual void CompositorContentsChanged(const SkBitmap& bitmap) OVERRIDE; | 42 virtual void CompositorContentsChanged(const SkBitmap& bitmap) OVERRIDE; |
| 41 | 43 |
| 42 // view_manager::ViewObserver | 44 // view_manager::ViewObserver |
| 43 virtual void OnViewInputEvent(view_manager::View* view, | 45 virtual void OnViewInputEvent(view_manager::View* view, |
| 44 const EventPtr& event) OVERRIDE; | 46 const EventPtr& event) OVERRIDE; |
| 45 | 47 |
| 46 scoped_ptr<WindowTreeHostMojo> window_tree_host_; | 48 scoped_ptr<WindowTreeHostMojo> window_tree_host_; |
| 47 | 49 |
| 48 scoped_ptr<wm::FocusController> focus_client_; | 50 scoped_ptr<wm::FocusController> focus_client_; |
| 49 | 51 |
| 50 scoped_ptr<ui::internal::InputMethodDelegate> ime_filter_; | 52 scoped_ptr<ui::internal::InputMethodDelegate> ime_filter_; |
| 51 | 53 |
| 52 view_manager::View* view_; | 54 view_manager::Node* node_; |
| 53 | 55 |
| 54 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViewManager); | 56 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViewManager); |
| 55 }; | 57 }; |
| 56 | 58 |
| 57 } // namespace mojo | 59 } // namespace mojo |
| 58 | 60 |
| 59 #endif // MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_ | 61 #endif // MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_ |
| OLD | NEW |