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

Side by Side Diff: ash/test/ui_controls_factory_ash.cc

Issue 2904113002: Replacing WM_TOUCH with WM_POINTER for touch events on Wins 8+ (Closed)
Patch Set: wm touch Created 3 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
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 "ash/shell.h" 5 #include "ash/shell.h"
6 #include "ash/wm/root_window_finder.h" 6 #include "ash/wm/root_window_finder.h"
7 #include "ash/wm/window_properties.h" 7 #include "ash/wm/window_properties.h"
8 #include "ash/wm_window.h" 8 #include "ash/wm_window.h"
9 #include "ui/aura/client/capture_client.h" 9 #include "ui/aura/client/capture_client.h"
10 #include "ui/aura/client/screen_position_client.h" 10 #include "ui/aura/client/screen_position_client.h"
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
110 return ui_controls && 110 return ui_controls &&
111 ui_controls->SendMouseEventsNotifyWhenDone(type, state, closure); 111 ui_controls->SendMouseEventsNotifyWhenDone(type, state, closure);
112 } 112 }
113 113
114 bool SendMouseClick(MouseButton type) override { 114 bool SendMouseClick(MouseButton type) override {
115 gfx::Point p(display::Screen::GetScreen()->GetCursorScreenPoint()); 115 gfx::Point p(display::Screen::GetScreen()->GetCursorScreenPoint());
116 UIControlsAura* ui_controls = GetUIControlsAt(p); 116 UIControlsAura* ui_controls = GetUIControlsAt(p);
117 return ui_controls && ui_controls->SendMouseClick(type); 117 return ui_controls && ui_controls->SendMouseClick(type);
118 } 118 }
119 119
120 bool SendTouchEvents(int action, int num, int x, int y) override {
121 NOTIMPLEMENTED();
122 return false;
123 }
124
125 bool SendTouchEventsNotifyWhenDone(int action,
126 int num,
127 int x,
128 int y,
129 const base::Closure& task) override {
130 NOTIMPLEMENTED();
131 return false;
132 }
133
120 void RunClosureAfterAllPendingUIEvents( 134 void RunClosureAfterAllPendingUIEvents(
121 const base::Closure& closure) override { 135 const base::Closure& closure) override {
122 UIControlsAura* ui_controls = 136 UIControlsAura* ui_controls =
123 GetUIControlsForRootWindow(ash::Shell::GetRootWindowForNewWindows()); 137 GetUIControlsForRootWindow(ash::Shell::GetRootWindowForNewWindows());
124 if (ui_controls) 138 if (ui_controls)
125 ui_controls->RunClosureAfterAllPendingUIEvents(closure); 139 ui_controls->RunClosureAfterAllPendingUIEvents(closure);
126 } 140 }
127 141
128 private: 142 private:
129 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh); 143 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh);
130 }; 144 };
131 145
132 ui_controls::UIControlsAura* CreateAshUIControls() { 146 ui_controls::UIControlsAura* CreateAshUIControls() {
133 return new ash::test::UIControlsAsh(); 147 return new ash::test::UIControlsAsh();
134 } 148 }
135 149
136 } // namespace test 150 } // namespace test
137 } // namespace ash 151 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/touchevents_browsertest.cc » ('j') | chrome/browser/touchevents_browsertest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698