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

Side by Side Diff: ui/events/test/events_test_utils.h

Issue 1372253002: gfx: Make conversions from gfx::Point to PointF explicit. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: pointfconvert-event: mandol_line Created 5 years, 1 month 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 | « ui/events/test/event_generator.cc ('k') | ui/gfx/geometry/point.h » ('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 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 #ifndef UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ 5 #ifndef UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_
6 #define UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ 6 #define UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_
7 7
8 #include "ui/events/event.h" 8 #include "ui/events/event.h"
9 #include "ui/events/event_dispatcher.h" 9 #include "ui/events/event_dispatcher.h"
10 #include "ui/events/event_target.h" 10 #include "ui/events/event_target.h"
(...skipping 21 matching lines...) Expand all
32 Event* event_; 32 Event* event_;
33 33
34 DISALLOW_COPY_AND_ASSIGN(EventTestApi); 34 DISALLOW_COPY_AND_ASSIGN(EventTestApi);
35 }; 35 };
36 36
37 class LocatedEventTestApi : public EventTestApi { 37 class LocatedEventTestApi : public EventTestApi {
38 public: 38 public:
39 explicit LocatedEventTestApi(LocatedEvent* located_event); 39 explicit LocatedEventTestApi(LocatedEvent* located_event);
40 ~LocatedEventTestApi() override; 40 ~LocatedEventTestApi() override;
41 41
42 void set_location(const gfx::PointF& location) { 42 void set_location(const gfx::Point& location) {
43 located_event_->location_ = location; 43 located_event_->set_location(location);
44 }
45 void set_location_f(const gfx::PointF& location) {
46 located_event_->set_location_f(location);
44 } 47 }
45 48
46 private: 49 private:
47 LocatedEventTestApi(); 50 LocatedEventTestApi();
48 51
49 LocatedEvent* located_event_; 52 LocatedEvent* located_event_;
50 53
51 DISALLOW_COPY_AND_ASSIGN(LocatedEventTestApi); 54 DISALLOW_COPY_AND_ASSIGN(LocatedEventTestApi);
52 }; 55 };
53 56
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 EventSourceTestApi(); 97 EventSourceTestApi();
95 98
96 EventSource* event_source_; 99 EventSource* event_source_;
97 100
98 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi); 101 DISALLOW_COPY_AND_ASSIGN(EventSourceTestApi);
99 }; 102 };
100 103
101 } // namespace ui 104 } // namespace ui
102 105
103 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_ 106 #endif // UI_EVENTS_TEST_EVENTS_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « ui/events/test/event_generator.cc ('k') | ui/gfx/geometry/point.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698