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"
14 class InputMethodDelegate
;
19 class FocusController
;
24 class WindowTreeHostMojo
;
26 class NativeWidgetViewManager
: public views::NativeWidgetAura
,
27 public WindowTreeHostMojoDelegate
,
28 public view_manager::ViewObserver
{
30 NativeWidgetViewManager(views::internal::NativeWidgetDelegate
* delegate
,
31 view_manager::View
* view
);
32 virtual ~NativeWidgetViewManager();
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
);
59 #endif // MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_