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 MANDOLINE_UI_AURA_NATIVE_WIDGET_VIEW_MANAGER_H_
6 #define MANDOLINE_UI_AURA_NATIVE_WIDGET_VIEW_MANAGER_H_
8 #include "components/mus/public/cpp/view_observer.h"
9 #include "ui/views/widget/native_widget_aura.h"
13 class DefaultCaptureClient
;
19 class InputMethodDelegate
;
24 class FocusController
;
33 class WindowTreeHostMojo
;
35 class NativeWidgetViewManager
: public views::NativeWidgetAura
,
36 public mus::ViewObserver
{
38 NativeWidgetViewManager(views::internal::NativeWidgetDelegate
* delegate
,
41 ~NativeWidgetViewManager() override
;
44 // Overridden from internal::NativeWidgetAura:
45 void InitNativeWidget(const views::Widget::InitParams
& in_params
) override
;
46 void OnWindowVisibilityChanged(aura::Window
* window
, bool visible
) override
;
49 void OnViewDestroyed(mus::View
* view
) override
;
50 void OnViewBoundsChanged(mus::View
* view
,
51 const mojo::Rect
& old_bounds
,
52 const mojo::Rect
& new_bounds
) override
;
53 void OnViewFocusChanged(mus::View
* gained_focus
,
54 mus::View
* lost_focus
) override
;
55 void OnViewInputEvent(mus::View
* view
, const mojo::EventPtr
& event
) override
;
57 scoped_ptr
<WindowTreeHostMojo
> window_tree_host_
;
59 scoped_ptr
<wm::FocusController
> focus_client_
;
63 scoped_ptr
<aura::client::DefaultCaptureClient
> capture_client_
;
65 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViewManager
);
68 } // namespace mandoline
70 #endif // MANDOLINE_UI_AURA_NATIVE_WIDGET_VIEW_MANAGER_H_