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

Side by Side Diff: ui/aura/root_window_host_ozone.cc

Issue 158023006: Adding Ozone CursorLoader and necessary API functions to allow setting the cursor in SoftwareFactor… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Removed cursor*_null.* Created 6 years, 10 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 | « no previous file | ui/base/cursor/cursor.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/aura/root_window_host_ozone.h" 5 #include "ui/aura/root_window_host_ozone.h"
6 6
7 #include "ui/aura/root_window.h" 7 #include "ui/aura/root_window.h"
8 #include "ui/events/ozone/event_factory_ozone.h" 8 #include "ui/events/ozone/event_factory_ozone.h"
9 #include "ui/gfx/ozone/surface_factory_ozone.h" 9 #include "ui/gfx/ozone/surface_factory_ozone.h"
10 #include "ui/ozone/ozone_platform.h" 10 #include "ui/ozone/ozone_platform.h"
(...skipping 20 matching lines...) Expand all
31 CreateCompositor(GetAcceleratedWidget()); 31 CreateCompositor(GetAcceleratedWidget());
32 } 32 }
33 33
34 WindowTreeHostOzone::~WindowTreeHostOzone() { 34 WindowTreeHostOzone::~WindowTreeHostOzone() {
35 base::MessagePumpOzone::Current()->RemoveDispatcherForRootWindow(0); 35 base::MessagePumpOzone::Current()->RemoveDispatcherForRootWindow(0);
36 DestroyCompositor(); 36 DestroyCompositor();
37 } 37 }
38 38
39 uint32_t WindowTreeHostOzone::Dispatch(const base::NativeEvent& ne) { 39 uint32_t WindowTreeHostOzone::Dispatch(const base::NativeEvent& ne) {
40 ui::Event* event = static_cast<ui::Event*>(ne); 40 ui::Event* event = static_cast<ui::Event*>(ne);
41
42 if (event->type() == ui::ET_MOUSE_MOVED) {
dnicoara 2014/02/12 16:18:19 Removed as per our offline discussion.
43 ui::MouseEvent* mouse_event = static_cast<ui::MouseEvent*>(event);
44 gfx::SurfaceFactoryOzone::GetInstance()->MoveCursorTo(
45 mouse_event->location());
46 }
47
41 ui::EventDispatchDetails details ALLOW_UNUSED = SendEventToProcessor(event); 48 ui::EventDispatchDetails details ALLOW_UNUSED = SendEventToProcessor(event);
42 return POST_DISPATCH_NONE; 49 return POST_DISPATCH_NONE;
43 } 50 }
44 51
45 RootWindow* WindowTreeHostOzone::GetRootWindow() { 52 RootWindow* WindowTreeHostOzone::GetRootWindow() {
46 return delegate_->AsRootWindow(); 53 return delegate_->AsRootWindow();
47 } 54 }
48 55
49 gfx::AcceleratedWidget WindowTreeHostOzone::GetAcceleratedWidget() { 56 gfx::AcceleratedWidget WindowTreeHostOzone::GetAcceleratedWidget() {
50 return widget_; 57 return widget_;
(...skipping 19 matching lines...) Expand all
70 77
71 gfx::Point WindowTreeHostOzone::GetLocationOnNativeScreen() const { 78 gfx::Point WindowTreeHostOzone::GetLocationOnNativeScreen() const {
72 return bounds_.origin(); 79 return bounds_.origin();
73 } 80 }
74 81
75 void WindowTreeHostOzone::SetCapture() { NOTIMPLEMENTED(); } 82 void WindowTreeHostOzone::SetCapture() { NOTIMPLEMENTED(); }
76 83
77 void WindowTreeHostOzone::ReleaseCapture() { NOTIMPLEMENTED(); } 84 void WindowTreeHostOzone::ReleaseCapture() { NOTIMPLEMENTED(); }
78 85
79 void WindowTreeHostOzone::SetCursor(gfx::NativeCursor cursor) { 86 void WindowTreeHostOzone::SetCursor(gfx::NativeCursor cursor) {
80 NOTIMPLEMENTED(); 87 gfx::SurfaceFactoryOzone::GetInstance()->SetCursorImage(*cursor.platform());
81 } 88 }
82 89
83 bool WindowTreeHostOzone::QueryMouseLocation(gfx::Point* location_return) { 90 bool WindowTreeHostOzone::QueryMouseLocation(gfx::Point* location_return) {
84 NOTIMPLEMENTED(); 91 NOTIMPLEMENTED();
85 return false; 92 return false;
86 } 93 }
87 94
88 bool WindowTreeHostOzone::ConfineCursorToRootWindow() { 95 bool WindowTreeHostOzone::ConfineCursorToRootWindow() {
89 NOTIMPLEMENTED(); 96 NOTIMPLEMENTED();
90 return false; 97 return false;
91 } 98 }
92 99
93 void WindowTreeHostOzone::UnConfineCursor() { NOTIMPLEMENTED(); } 100 void WindowTreeHostOzone::UnConfineCursor() { NOTIMPLEMENTED(); }
94 101
95 void WindowTreeHostOzone::OnCursorVisibilityChanged(bool show) { 102 void WindowTreeHostOzone::OnCursorVisibilityChanged(bool show) {
96 NOTIMPLEMENTED(); 103 NOTIMPLEMENTED();
97 } 104 }
98 105
99 void WindowTreeHostOzone::MoveCursorTo(const gfx::Point& location) { 106 void WindowTreeHostOzone::MoveCursorTo(const gfx::Point& location) {
100 NOTIMPLEMENTED(); 107 gfx::SurfaceFactoryOzone::GetInstance()->MoveCursorTo(location);
101 } 108 }
102 109
103 void WindowTreeHostOzone::PostNativeEvent( 110 void WindowTreeHostOzone::PostNativeEvent(
104 const base::NativeEvent& native_event) { 111 const base::NativeEvent& native_event) {
105 NOTIMPLEMENTED(); 112 NOTIMPLEMENTED();
106 } 113 }
107 114
108 void WindowTreeHostOzone::OnDeviceScaleFactorChanged( 115 void WindowTreeHostOzone::OnDeviceScaleFactorChanged(
109 float device_scale_factor) { 116 float device_scale_factor) {
110 NOTIMPLEMENTED(); 117 NOTIMPLEMENTED();
(...skipping 10 matching lines...) Expand all
121 return new WindowTreeHostOzone(bounds); 128 return new WindowTreeHostOzone(bounds);
122 } 129 }
123 130
124 // static 131 // static
125 gfx::Size WindowTreeHost::GetNativeScreenSize() { 132 gfx::Size WindowTreeHost::GetNativeScreenSize() {
126 NOTIMPLEMENTED(); 133 NOTIMPLEMENTED();
127 return gfx::Size(); 134 return gfx::Size();
128 } 135 }
129 136
130 } // namespace aura 137 } // namespace aura
OLDNEW
« no previous file with comments | « no previous file | ui/base/cursor/cursor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698