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

Side by Side Diff: ui/views/events/event.cc

Issue 10790019: Add gesture target fuzzing to views (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: No longer using screen coordinates Created 8 years, 4 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 #include "ui/views/events/event.h" 5 #include "ui/views/events/event.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "ui/base/keycodes/keyboard_code_conversion.h" 8 #include "ui/base/keycodes/keyboard_code_conversion.h"
9 #include "ui/views/view.h" 9 #include "ui/views/view.h"
10 #include "ui/views/widget/root_view.h" 10 #include "ui/views/widget/root_view.h"
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 //////////////////////////////////////////////////////////////////////////////// 209 ////////////////////////////////////////////////////////////////////////////////
210 // GestureEvent, public: 210 // GestureEvent, public:
211 211
212 GestureEvent::GestureEvent(const GestureEvent& model, View* source, 212 GestureEvent::GestureEvent(const GestureEvent& model, View* source,
213 View* target) 213 View* target)
214 : LocatedEvent(model, source, target), 214 : LocatedEvent(model, source, target),
215 details_(model.details_) { 215 details_(model.details_) {
216 } 216 }
217 217
218 //////////////////////////////////////////////////////////////////////////////// 218 ////////////////////////////////////////////////////////////////////////////////
219 // GestureEvent, protected:
220
221 GestureEvent::GestureEvent(ui::EventType type, int x, int y, int flags)
222 : LocatedEvent(type, gfx::Point(x, y), flags),
223 details_(type, 0.f, 0.f) {
224 }
225
226 ////////////////////////////////////////////////////////////////////////////////
219 // GestureEvent, private: 227 // GestureEvent, private:
220 228
221 GestureEvent::GestureEvent(const GestureEvent& model, View* root) 229 GestureEvent::GestureEvent(const GestureEvent& model, View* root)
222 : LocatedEvent(model, root), 230 : LocatedEvent(model, root),
223 details_(model.details_) { 231 details_(model.details_) {
224 } 232 }
225 233
226 GestureEvent::GestureEvent(ui::EventType type, int x, int y, int flags)
227 : LocatedEvent(type, gfx::Point(x, y), flags),
228 details_(type, 0.f, 0.f) {
229 }
230
231 GestureEvent::~GestureEvent() { 234 GestureEvent::~GestureEvent() {
232 } 235 }
233 236
234 #if !defined(USE_AURA) 237 #if !defined(USE_AURA)
235 int GestureEvent::GetLowestTouchId() const { 238 int GestureEvent::GetLowestTouchId() const {
236 // TODO: 239 // TODO:
237 return 0; 240 return 0;
238 } 241 }
239 #endif 242 #endif
240 243
241 GestureEventForTest::GestureEventForTest(ui::EventType type, 244 GestureEventForTest::GestureEventForTest(ui::EventType type,
242 int x, 245 int x,
243 int y, 246 int y,
244 int flags) 247 int flags)
245 : GestureEvent(type, x, y, flags) { 248 : GestureEvent(type, x, y, flags) {
246 } 249 }
247 250
248 } // namespace views 251 } // namespace views
OLDNEW
« no previous file with comments | « ui/views/events/event.h ('k') | ui/views/view.h » ('j') | ui/views/view.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698