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

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: sadrul's comments about testing addressed 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') | ui/views/view.h » ('J')
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 418 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 438
439 // Used for views testing.
440 void set_details(ui::GestureEventDetails details) { details_ = details; }
sky 2012/08/02 15:52:08 const ui::GestureEventDetails& here and 458. Can
tdanderson 2012/08/02 18:11:37 Done.
441
439 private: 442 private:
440 friend class internal::RootView; 443 friend class internal::RootView;
441 444
442 GestureEvent(const GestureEvent& model, View* root); 445 GestureEvent(const GestureEvent& model, View* root);
443 446
444 // Overridden from ui::GestureEvent. 447 // Overridden from ui::GestureEvent.
445 virtual int GetLowestTouchId() const OVERRIDE; 448 virtual int GetLowestTouchId() const OVERRIDE;
446 449
447 ui::GestureEventDetails details_; 450 ui::GestureEventDetails details_;
448 451
449 DISALLOW_COPY_AND_ASSIGN(GestureEvent); 452 DISALLOW_COPY_AND_ASSIGN(GestureEvent);
450 }; 453 };
451 454
452 class VIEWS_EXPORT GestureEventForTest : public GestureEvent { 455 class VIEWS_EXPORT GestureEventForTest : public GestureEvent {
453 public: 456 public:
454 GestureEventForTest(ui::EventType type, int x, int y, int flags); 457 GestureEventForTest(ui::EventType type, int x, int y, int flags);
458 void set_details(ui::GestureEventDetails details) {
459 GestureEvent::set_details(details);
460 }
455 461
456 private: 462 private:
457 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest); 463 DISALLOW_COPY_AND_ASSIGN(GestureEventForTest);
458 }; 464 };
459 465
460 #if defined(OS_WIN) 466 #if defined(OS_WIN)
461 int GetModifiersFromKeyState(); 467 int GetModifiersFromKeyState();
462 #endif 468 #endif
463 469
464 } // namespace views 470 } // namespace views
465 471
466 #endif // UI_VIEWS_EVENTS_EVENT_H_ 472 #endif // UI_VIEWS_EVENTS_EVENT_H_
OLDNEW
« no previous file with comments | « no previous file | ui/views/events/event.cc » ('j') | ui/views/view.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698