Add shadow to contextual search panel.
[chromium-blink-merge.git] / mandoline / ui / aura / native_widget_view_manager.h
blob8042b0813706fda7d6ac1046e247f799b1828a60
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/view_manager/public/cpp/view_observer.h"
9 #include "ui/views/widget/native_widget_aura.h"
11 namespace aura {
12 namespace client {
13 class DefaultCaptureClient;
17 namespace ui {
18 namespace internal {
19 class InputMethodDelegate;
23 namespace wm {
24 class FocusController;
27 namespace mojo {
28 class Shell;
31 namespace mandoline {
33 class WindowTreeHostMojo;
35 class NativeWidgetViewManager : public views::NativeWidgetAura,
36 public mojo::ViewObserver {
37 public:
38 NativeWidgetViewManager(views::internal::NativeWidgetDelegate* delegate,
39 mojo::Shell* shell,
40 mojo::View* view);
41 ~NativeWidgetViewManager() override;
43 private:
44 // Overridden from internal::NativeWidgetAura:
45 void InitNativeWidget(const views::Widget::InitParams& in_params) override;
46 void OnWindowVisibilityChanged(aura::Window* window, bool visible) override;
48 // ViewObserver:
49 void OnViewDestroyed(mojo::View* view) override;
50 void OnViewBoundsChanged(mojo::View* view,
51 const mojo::Rect& old_bounds,
52 const mojo::Rect& new_bounds) override;
53 void OnViewFocusChanged(mojo::View* gained_focus,
54 mojo::View* lost_focus) override;
55 void OnViewInputEvent(mojo::View* view, const mojo::EventPtr& event) override;
57 scoped_ptr<WindowTreeHostMojo> window_tree_host_;
59 scoped_ptr<wm::FocusController> focus_client_;
61 mojo::View* view_;
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_