Revert of Revert of Revert of Introduce SessionManager that will contain code to...
[chromium-blink-merge.git] / mojo / views / native_widget_view_manager.h
blob4f7114514ba4eed07407763edd63a73df8950cdb
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
3 // found in the LICENSE file.
5 #ifndef MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_
6 #define MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_
8 #include "mojo/aura/window_tree_host_mojo_delegate.h"
9 #include "mojo/services/public/cpp/view_manager/view_observer.h"
10 #include "ui/views/widget/native_widget_aura.h"
12 namespace ui {
13 namespace internal {
14 class InputMethodDelegate;
18 namespace wm {
19 class FocusController;
22 namespace mojo {
24 class WindowTreeHostMojo;
26 class NativeWidgetViewManager : public views::NativeWidgetAura,
27 public WindowTreeHostMojoDelegate,
28 public view_manager::ViewObserver {
29 public:
30 NativeWidgetViewManager(views::internal::NativeWidgetDelegate* delegate,
31 view_manager::View* view);
32 virtual ~NativeWidgetViewManager();
34 private:
35 // Overridden from internal::NativeWidgetPrivate:
36 virtual void InitNativeWidget(
37 const views::Widget::InitParams& in_params) OVERRIDE;
39 // WindowTreeHostMojoDelegate:
40 virtual void CompositorContentsChanged(const SkBitmap& bitmap) OVERRIDE;
42 // view_manager::ViewObserver
43 virtual void OnViewInputEvent(view_manager::View* view,
44 const EventPtr& event) OVERRIDE;
46 scoped_ptr<WindowTreeHostMojo> window_tree_host_;
48 scoped_ptr<wm::FocusController> focus_client_;
50 scoped_ptr<ui::internal::InputMethodDelegate> ime_filter_;
52 view_manager::View* view_;
54 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViewManager);
57 } // namespace mojo
59 #endif // MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_