Updating trunk VERSION from 2139.0 to 2140.0
[chromium-blink-merge.git] / mojo / views / native_widget_view_manager.h
blob2e5879574515abdb6ebfbdbfee6bb8e727fa502c
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;
20 class ScopedCaptureClient;
23 namespace mojo {
25 class WindowTreeHostMojo;
27 class NativeWidgetViewManager : public views::NativeWidgetAura,
28 public WindowTreeHostMojoDelegate,
29 public ViewObserver {
30 public:
31 NativeWidgetViewManager(views::internal::NativeWidgetDelegate* delegate,
32 View* view);
33 virtual ~NativeWidgetViewManager();
35 private:
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;
43 // ViewObserver:
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_;
56 View* view_;
58 scoped_ptr<wm::ScopedCaptureClient> capture_client_;
60 DISALLOW_COPY_AND_ASSIGN(NativeWidgetViewManager);
63 } // namespace mojo
65 #endif // MOJO_VIEWS_NATIVE_WIDGET_VIEW_MANAGER_H_