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

Side by Side Diff: ui/aura/window_tree_host.h

Issue 191223007: Move touch CTM from X into Chrome (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: move the logic of if a touch event should be dispatched to a root window into CanDispatchEvent() Created 6 years, 7 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef UI_AURA_WINDOW_TREE_HOST_H_ 5 #ifndef UI_AURA_WINDOW_TREE_HOST_H_
6 #define UI_AURA_WINDOW_TREE_HOST_H_ 6 #define UI_AURA_WINDOW_TREE_HOST_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/event_types.h" 10 #include "base/event_types.h"
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 void OnCursorVisibilityChanged(bool visible); 109 void OnCursorVisibilityChanged(bool visible);
110 110
111 // Moves the cursor to the specified location relative to the root window. 111 // Moves the cursor to the specified location relative to the root window.
112 void MoveCursorTo(const gfx::Point& location); 112 void MoveCursorTo(const gfx::Point& location);
113 113
114 // Moves the cursor to the |host_location| given in host coordinates. 114 // Moves the cursor to the |host_location| given in host coordinates.
115 void MoveCursorToHostLocation(const gfx::Point& host_location); 115 void MoveCursorToHostLocation(const gfx::Point& host_location);
116 116
117 gfx::NativeCursor last_cursor() const { return last_cursor_; } 117 gfx::NativeCursor last_cursor() const { return last_cursor_; }
118 118
119 void UpdateDisplayID(int64 id1, int64 id2) {
120 display_ids_.first = id1;
121 display_ids_.second = id2;
122 }
123
124 const std::pair<int64, int64>& display_ids() const {
125 return display_ids_;
126 }
127
119 // Returns the EventSource responsible for dispatching events to the window 128 // Returns the EventSource responsible for dispatching events to the window
120 // tree. 129 // tree.
121 virtual ui::EventSource* GetEventSource() = 0; 130 virtual ui::EventSource* GetEventSource() = 0;
122 131
123 // Returns the accelerated widget. 132 // Returns the accelerated widget.
124 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0; 133 virtual gfx::AcceleratedWidget GetAcceleratedWidget() = 0;
125 134
126 // Shows the WindowTreeHost. 135 // Shows the WindowTreeHost.
127 virtual void Show() = 0; 136 virtual void Show() = 0;
128 137
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 scoped_ptr<WindowEventDispatcher> dispatcher_; 200 scoped_ptr<WindowEventDispatcher> dispatcher_;
192 201
193 scoped_ptr<ui::Compositor> compositor_; 202 scoped_ptr<ui::Compositor> compositor_;
194 203
195 // Last cursor set. Used for testing. 204 // Last cursor set. Used for testing.
196 gfx::NativeCursor last_cursor_; 205 gfx::NativeCursor last_cursor_;
197 gfx::Point last_cursor_request_position_in_host_; 206 gfx::Point last_cursor_request_position_in_host_;
198 207
199 scoped_ptr<ui::ViewProp> prop_; 208 scoped_ptr<ui::ViewProp> prop_;
200 209
210 // The display IDs associated with this root window.
211 // In single monitor or extended mode dual monitor case, the root window
212 // is associated with one display.
213 // In mirror mode dual monitors case, the root window is associated with
214 // both displays.
215 std::pair<int64, int64> display_ids_;
oshima 2014/05/01 09:35:42 this can move to ash_window_tree_host_x11 now?
Yufeng Shen (Slow to review) 2014/05/01 22:43:48 In touch_transformer_controller.cc I need to get a
oshima 2014/05/01 23:07:56 You can use RootWindowController()->ash_host()
Yufeng Shen (Slow to review) 2014/05/02 00:03:39 Done.
216
201 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost); 217 DISALLOW_COPY_AND_ASSIGN(WindowTreeHost);
202 }; 218 };
203 219
204 } // namespace aura 220 } // namespace aura
205 221
206 #endif // UI_AURA_WINDOW_TREE_HOST_H_ 222 #endif // UI_AURA_WINDOW_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698