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

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

Issue 10790019: Add gesture target fuzzing to views (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Patch with unit tests 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
« no previous file with comments | « no previous file | ui/views/events/event.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #ifndef UI_VIEWS_EVENTS_EVENT_H_ 5 #ifndef UI_VIEWS_EVENTS_EVENT_H_
6 #define UI_VIEWS_EVENTS_EVENT_H_ 6 #define UI_VIEWS_EVENTS_EVENT_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 // If source / target views are provided, the model location will be converted 428 // If source / target views are provided, the model location will be converted
429 // from |source| coordinate system to |target| coordinate system. 429 // from |source| coordinate system to |target| coordinate system.
430 GestureEvent(const GestureEvent& model, View* source, View* target); 430 GestureEvent(const GestureEvent& model, View* source, View* target);
431 431
432 virtual ~GestureEvent(); 432 virtual ~GestureEvent();
433 433
434 const ui::GestureEventDetails& details() const { return details_; } 434 const ui::GestureEventDetails& details() const { return details_; }
435 435
436 protected: 436 protected:
437 GestureEvent(ui::EventType type, int x, int y, int flags); 437 GestureEvent(ui::EventType type, int x, int y, int flags);
438 GestureEvent(ui::EventType type,
439 int x,
440 int y,
441 int flags,
442 ui::GestureEventDetails details);
438 443
439 private: 444 private:
sadrul 2012/08/01 16:05:33 Instead of adding the constructors, you can add a
tdanderson 2012/08/01 18:22:39 Done.
440 friend class internal::RootView; 445 friend class internal::RootView;
441 446
442 GestureEvent(const GestureEvent& model, View* root); 447 GestureEvent(const GestureEvent& model, View* root);
443 448
444 // Overridden from ui::GestureEvent. 449 // Overridden from ui::GestureEvent.
445 virtual int GetLowestTouchId() const OVERRIDE; 450 virtual int GetLowestTouchId() const OVERRIDE;
446 451
447 ui::GestureEventDetails details_; 452 ui::GestureEventDetails details_;
448 453
449 DISALLOW_COPY_AND_ASSIGN(GestureEvent); 454 DISALLOW_COPY_AND_ASSIGN(GestureEvent);
450 }; 455 };
451 456
452 class VIEWS_EXPORT GestureEventForTest : public GestureEvent { 457 class VIEWS_EXPORT GestureEventForTest : public GestureEvent {
453 public: 458 public:
454 GestureEventForTest(ui::EventType type, int x, int y, int flags); 459 GestureEventForTest(ui::EventType type, int x, int y, int flags);
460 GestureEventForTest(ui::EventType type,
461 int x,
462 int y,
463 int flags,
464 ui::GestureEventDetails details);
455 465
456 private: 466 private:
457 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest); 467 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest);
458 }; 468 };
459 469
460 #if defined(OS_WIN) 470 #if defined(OS_WIN)
461 int GetModifiersFromKeyState(); 471 int GetModifiersFromKeyState();
462 #endif 472 #endif
463 473
464 } // namespace views 474 } // namespace views
465 475
466 #endif // UI_VIEWS_EVENTS_EVENT_H_ 476 #endif // UI_VIEWS_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/events/event.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698