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
;
20 class ScopedCaptureClient
;
25 class WindowTreeHostMojo
;
27 class NativeWidgetViewManager
: public views::NativeWidgetAura
,
28 public WindowTreeHostMojoDelegate
,
31 NativeWidgetViewManager(views::internal::NativeWidgetDelegate
* delegate
,
33 virtual ~NativeWidgetViewManager();
36 // Overridden from internal::NativeWidgetAura:
37 virtual void InitNativeWidget(
38 const views::Widget::InitParams
& in_params
) OVERRIDE
;
40 // WindowTreeHostMojoDelegate:
41 virtual void CompositorContentsChanged(const SkBitmap
& bitmap
) OVERRIDE
;
44 virtual void OnViewDestroyed(View
* view
) OVERRIDE
;
45 virtual void OnViewBoundsChanged(View
* view
,
46 const gfx::Rect
& old_bounds
,
47 const gfx::Rect
& new_bounds
) OVERRIDE
;
48 virtual void OnViewInputEvent(View
* view
, const EventPtr
& event
) OVERRIDE
;
50 scoped_ptr
<WindowTreeHostMojo
> window_tree_host_
;
52 scoped_ptr
<wm::FocusController
> focus_client_
;
54 scoped_ptr
<ui::internal::InputMethodDelegate
> ime_filter_
;
58 scoped_ptr
<wm::ScopedCaptureClient
> capture_client_
;
60 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViewManager
);
65 #endif // MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_