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

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

Powered by Google App Engine
This is Rietveld 408576698