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

Side by Side Diff: ui/aura/test/event_generator.h

Issue 37733003: Make GetRootWindow() return a Window instead of a RootWindow. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/root_window_unittest.cc ('k') | ui/aura/test/event_generator.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_AURA_TEST_EVENT_GENERATOR_H_ 5 #ifndef UI_AURA_TEST_EVENT_GENERATOR_H_
6 #define UI_AURA_TEST_EVENT_GENERATOR_H_ 6 #define UI_AURA_TEST_EVENT_GENERATOR_H_
7 7
8 #include <list> 8 #include <list>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 // 80 //
81 // If one of these applies to your test, please use |ui_controls| 81 // If one of these applies to your test, please use |ui_controls|
82 // package instead. 82 // package instead.
83 // 83 //
84 // Note: The coordinates of the points in API is determined by the 84 // Note: The coordinates of the points in API is determined by the
85 // EventGeneratorDelegate. 85 // EventGeneratorDelegate.
86 class EventGenerator { 86 class EventGenerator {
87 public: 87 public:
88 // Creates an EventGenerator with the mouse/touch location (0,0), 88 // Creates an EventGenerator with the mouse/touch location (0,0),
89 // which uses the |root_window|'s coordinates. 89 // which uses the |root_window|'s coordinates.
90 explicit EventGenerator(RootWindow* root_window); 90 explicit EventGenerator(Window* root_window);
91 91
92 // Create an EventGenerator with EventGeneratorDelegate, 92 // Create an EventGenerator with EventGeneratorDelegate,
93 // which uses the coordinates used by |delegate|. 93 // which uses the coordinates used by |delegate|.
94 explicit EventGenerator(EventGeneratorDelegate* delegate); 94 explicit EventGenerator(EventGeneratorDelegate* delegate);
95 95
96 // Creates an EventGenerator with the mouse/touch location 96 // Creates an EventGenerator with the mouse/touch location
97 // at |initial_location|, which uses the |root_window|'s coordinates. 97 // at |initial_location|, which uses the |root_window|'s coordinates.
98 EventGenerator(RootWindow* root_window, const gfx::Point& initial_location); 98 EventGenerator(Window* root_window, const gfx::Point& initial_location);
99 99
100 // Creates an EventGenerator with the mouse/touch location 100 // Creates an EventGenerator with the mouse/touch location
101 // centered over |window|, which uses the |root_window|'s coordinates. 101 // centered over |window|, which uses the |root_window|'s coordinates.
102 EventGenerator(RootWindow* root_window, Window* window); 102 EventGenerator(Window* root_window, Window* window);
103 103
104 virtual ~EventGenerator(); 104 virtual ~EventGenerator();
105 105
106 // Explicitly sets the location used by mouse/touch events. This is set by the 106 // Explicitly sets the location used by mouse/touch events. This is set by the
107 // various methods that take a location but can be manipulated directly, 107 // various methods that take a location but can be manipulated directly,
108 // typically for touch. 108 // typically for touch.
109 void set_current_location(const gfx::Point& location) { 109 void set_current_location(const gfx::Point& location) {
110 current_location_ = location; 110 current_location_ = location;
111 } 111 }
112 const gfx::Point& current_location() const { return current_location_; } 112 const gfx::Point& current_location() const { return current_location_; }
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 // Set to true to cause events to be posted asynchronously. 343 // Set to true to cause events to be posted asynchronously.
344 bool async_; 344 bool async_;
345 345
346 DISALLOW_COPY_AND_ASSIGN(EventGenerator); 346 DISALLOW_COPY_AND_ASSIGN(EventGenerator);
347 }; 347 };
348 348
349 } // namespace test 349 } // namespace test
350 } // namespace aura 350 } // namespace aura
351 351
352 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_ 352 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_
OLDNEW
« no previous file with comments | « ui/aura/root_window_unittest.cc ('k') | ui/aura/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698