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

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, 5 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 "ui/aura/client/capture_client.h" 8 #include "ui/aura/client/capture_client.h"
9 #include "ui/aura/client/screen_position_client.h" 9 #include "ui/aura/client/screen_position_client.h"
10 #include "ui/aura/env.h" 10 #include "ui/aura/env.h"
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 return ui_controls && 108 return ui_controls &&
109 ui_controls->SendMouseEventsNotifyWhenDone(type, state, closure); 109 ui_controls->SendMouseEventsNotifyWhenDone(type, state, closure);
110 } 110 }
111 111
112 bool SendMouseClick(MouseButton type) override { 112 bool SendMouseClick(MouseButton type) override {
113 gfx::Point p(display::Screen::GetScreen()->GetCursorScreenPoint()); 113 gfx::Point p(display::Screen::GetScreen()->GetCursorScreenPoint());
114 UIControlsAura* ui_controls = GetUIControlsAt(p); 114 UIControlsAura* ui_controls = GetUIControlsAt(p);
115 return ui_controls && ui_controls->SendMouseClick(type); 115 return ui_controls && ui_controls->SendMouseClick(type);
116 } 116 }
117 117
118 bool SendTouchEvents(int action, int num, int x, int y) override {
119 NOTIMPLEMENTED();
120 return false;
121 }
122
118 void RunClosureAfterAllPendingUIEvents( 123 void RunClosureAfterAllPendingUIEvents(
119 const base::Closure& closure) override { 124 const base::Closure& closure) override {
120 UIControlsAura* ui_controls = 125 UIControlsAura* ui_controls =
121 GetUIControlsForRootWindow(ash::Shell::GetRootWindowForNewWindows()); 126 GetUIControlsForRootWindow(ash::Shell::GetRootWindowForNewWindows());
122 if (ui_controls) 127 if (ui_controls)
123 ui_controls->RunClosureAfterAllPendingUIEvents(closure); 128 ui_controls->RunClosureAfterAllPendingUIEvents(closure);
124 } 129 }
125 130
126 private: 131 private:
127 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh); 132 DISALLOW_COPY_AND_ASSIGN(UIControlsAsh);
128 }; 133 };
129 134
130 ui_controls::UIControlsAura* CreateAshUIControls() { 135 ui_controls::UIControlsAura* CreateAshUIControls() {
131 return new ash::test::UIControlsAsh(); 136 return new ash::test::UIControlsAsh();
132 } 137 }
133 138
134 } // namespace test 139 } // namespace test
135 } // namespace ash 140 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698