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

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

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
« no previous file with comments | « mojo/examples/aura_demo/window_tree_host_view_manager.h ('k') | mojo/mojo.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "mojo/examples/aura_demo/window_tree_host_view_manager.h"
6
7 #include "ui/aura/window.h"
8 #include "ui/aura/window_event_dispatcher.h"
9 #include "ui/events/event.h"
10 #include "ui/events/event_constants.h"
11
12 namespace mojo {
13 namespace examples {
14
15 ////////////////////////////////////////////////////////////////////////////////
16 // WindowTreeHostViewManager, public:
17
18 WindowTreeHostViewManager::WindowTreeHostViewManager(const gfx::Rect& bounds)
19 : bounds_(bounds) {
20 CreateCompositor(GetAcceleratedWidget());
21 }
22
23 WindowTreeHostViewManager::~WindowTreeHostViewManager() {
24 DestroyCompositor();
25 DestroyDispatcher();
26 }
27
28 ////////////////////////////////////////////////////////////////////////////////
29 // WindowTreeHostViewManager, aura::WindowTreeHost implementation:
30
31 ui::EventSource* WindowTreeHostViewManager::GetEventSource() {
32 return this;
33 }
34
35 gfx::AcceleratedWidget WindowTreeHostViewManager::GetAcceleratedWidget() {
36 NOTIMPLEMENTED() << "GetAcceleratedWidget";
37 return gfx::kNullAcceleratedWidget;
38 }
39
40 void WindowTreeHostViewManager::Show() {
41 window()->Show();
42 }
43
44 void WindowTreeHostViewManager::Hide() {
45 }
46
47 gfx::Rect WindowTreeHostViewManager::GetBounds() const {
48 return bounds_;
49 }
50
51 void WindowTreeHostViewManager::SetBounds(const gfx::Rect& bounds) {
52 }
53
54 gfx::Point WindowTreeHostViewManager::GetLocationOnNativeScreen() const {
55 return gfx::Point(0, 0);
56 }
57
58 void WindowTreeHostViewManager::SetCapture() {
59 NOTIMPLEMENTED();
60 }
61
62 void WindowTreeHostViewManager::ReleaseCapture() {
63 NOTIMPLEMENTED();
64 }
65
66 void WindowTreeHostViewManager::PostNativeEvent(
67 const base::NativeEvent& native_event) {
68 NOTIMPLEMENTED();
69 }
70
71 void WindowTreeHostViewManager::OnDeviceScaleFactorChanged(
72 float device_scale_factor) {
73 NOTIMPLEMENTED();
74 }
75
76 void WindowTreeHostViewManager::SetCursorNative(gfx::NativeCursor cursor) {
77 NOTIMPLEMENTED();
78 }
79
80 void WindowTreeHostViewManager::MoveCursorToNative(const gfx::Point& location) {
81 NOTIMPLEMENTED();
82 }
83
84 void WindowTreeHostViewManager::OnCursorVisibilityChangedNative(bool show) {
85 NOTIMPLEMENTED();
86 }
87
88 ////////////////////////////////////////////////////////////////////////////////
89 // WindowTreeHostViewManager, ui::EventSource implementation:
90
91 ui::EventProcessor* WindowTreeHostViewManager::GetEventProcessor() {
92 return dispatcher();
93 }
94
95 } // namespace examples
96 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/examples/aura_demo/window_tree_host_view_manager.h ('k') | mojo/mojo.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698