Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(80)

Side by Side Diff: mojo/examples/aura_demo/window_tree_host_view_manager.h

Issue 313483002: Gets aura_demo working with the view_manager (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 master and fix windows Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(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_
OLDNEW
« no previous file with comments | « mojo/examples/aura_demo/view_manager_init.cc ('k') | mojo/examples/aura_demo/window_tree_host_view_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698