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

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: Add a browser test 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, long x, long y) override {
121 NOTIMPLEMENTED();
122 return false;
123 }
124
120 void RunClosureAfterAllPendingUIEvents( 125 void RunClosureAfterAllPendingUIEvents(
121 const base::Closure& closure) override { 126 const base::Closure& closure) override {
122 UIControlsAura* ui_controls = 127 UIControlsAura* ui_controls =
123 GetUIControlsForRootWindow(ash::Shell::GetRootWindowForNewWindows()); 128 GetUIControlsForRootWindow(ash::Shell::GetRootWindowForNewWindows());
124 if (ui_controls) 129 if (ui_controls)
125 ui_controls->RunClosureAfterAllPendingUIEvents(closure); 130 ui_controls->RunClosureAfterAllPendingUIEvents(closure);
126 } 131 }
127 132
128 private: 133 private:
129 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh); 134 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh);
130 }; 135 };
131 136
132 ui_controls::UIControlsAura* CreateAshUIControls() { 137 ui_controls::UIControlsAura* CreateAshUIControls() {
133 return new ash::test::UIControlsAsh(); 138 return new ash::test::UIControlsAsh();
134 } 139 }
135 140
136 } // namespace test 141 } // namespace test
137 } // namespace ash 142 } // 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