OLD | NEW |
| (Empty) |
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. | |
4 | |
5 #ifndef MOJO_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_ | |
6 #define MOJO_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_ | |
7 | |
8 #include "ui/aura/window_tree_host.h" | |
9 #include "ui/events/event_source.h" | |
10 #include "ui/gfx/geometry/rect.h" | |
11 | |
12 namespace mojo { | |
13 namespace examples { | |
14 | |
15 class WindowTreeHostViewManager : public aura::WindowTreeHost, | |
16 public ui::EventSource { | |
17 public: | |
18 explicit WindowTreeHostViewManager(const gfx::Rect& bounds); | |
19 virtual ~WindowTreeHostViewManager(); | |
20 | |
21 const gfx::Rect& bounds() const { return bounds_; } | |
22 | |
23 private: | |
24 // WindowTreeHost: | |
25 virtual ui::EventSource* GetEventSource() OVERRIDE; | |
26 virtual gfx::AcceleratedWidget GetAcceleratedWidget() OVERRIDE; | |
27 virtual void Show() OVERRIDE; | |
28 virtual void Hide() OVERRIDE; | |
29 virtual gfx::Rect GetBounds() const OVERRIDE; | |
30 virtual void SetBounds(const gfx::Rect& bounds) OVERRIDE; | |
31 virtual gfx::Point GetLocationOnNativeScreen() const OVERRIDE; | |
32 virtual void SetCapture() OVERRIDE; | |
33 virtual void ReleaseCapture() OVERRIDE; | |
34 virtual void PostNativeEvent(const base::NativeEvent& native_event) OVERRIDE; | |
35 virtual void OnDeviceScaleFactorChanged(float device_scale_factor) OVERRIDE; | |
36 virtual void SetCursorNative(gfx::NativeCursor cursor) OVERRIDE; | |
37 virtual void MoveCursorToNative(const gfx::Point& location) OVERRIDE; | |
38 virtual void OnCursorVisibilityChangedNative(bool show) OVERRIDE; | |
39 | |
40 // ui::EventSource: | |
41 virtual ui::EventProcessor* GetEventProcessor() OVERRIDE; | |
42 | |
43 gfx::Rect bounds_; | |
44 | |
45 DISALLOW_COPY_AND_ASSIGN(WindowTreeHostViewManager); | |
46 }; | |
47 | |
48 } // namespace examples | |
49 } // namespace mojo | |
50 | |
51 #endif // MOJO_EXAMPLES_AURA_DEMO_WINDOW_TREE_HOST_VIEW_MANAGER_H_ | |
OLD | NEW |