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

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

Issue 406413004: Cleanups for aura/test/event_generator.h (resolve TODOs) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase at r285842 Created 6 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 | Annotate | Revision Log
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_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
(Empty)
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
3 // found in the LICENSE file.
4
5 // TODO(tapted): Rename this file event_generator_delegate_aura.h.
6
7 #ifndef UI_AURA_TEST_EVENT_GENERATOR_H_
8 #define UI_AURA_TEST_EVENT_GENERATOR_H_
9
10 #include "ui/events/test/event_generator.h"
11
12 namespace aura {
13 class Window;
14 class WindowTreeHost;
15
16 namespace client {
17 class ScreenPositionClient;
18 }
19
20 namespace test {
21
22 // Implementation of ui::test::EventGeneratorDelegate for Aura.
23 class EventGeneratorDelegateAura : public ui::test::EventGeneratorDelegate {
24 public:
25 EventGeneratorDelegateAura();
26 virtual ~EventGeneratorDelegateAura();
27
28 // Returns the host for given point.
29 virtual WindowTreeHost* GetHostAt(const gfx::Point& point) const = 0;
30
31 // Returns the screen position client that determines the
32 // coordinates used in EventGenerator. EventGenerator uses
33 // root Window's coordinate if this returns NULL.
34 virtual client::ScreenPositionClient* GetScreenPositionClient(
35 const aura::Window* window) const = 0;
36
37 // Overridden from ui::test::EventGeneratorDelegate:
38 virtual ui::EventTarget* GetTargetAt(const gfx::Point& location) OVERRIDE;
39 virtual ui::EventSource* GetEventSource(ui::EventTarget* target) OVERRIDE;
40 virtual gfx::Point CenterOfTarget(
41 const ui::EventTarget* target) const OVERRIDE;
42 virtual gfx::Point CenterOfWindow(gfx::NativeWindow window) const OVERRIDE;
43 virtual void ConvertPointFromTarget(const ui::EventTarget* target,
44 gfx::Point* point) const OVERRIDE;
45 virtual void ConvertPointToTarget(const ui::EventTarget* target,
46 gfx::Point* point) const OVERRIDE;
47 virtual void ConvertPointFromHost(const ui::EventTarget* hosted_target,
48 gfx::Point* point) const OVERRIDE;
49
50 private:
51 DISALLOW_COPY_AND_ASSIGN(EventGeneratorDelegateAura);
52 };
53
54 // Expose the EventGenerator from ui::test in the aura::test namespace.
55 // TODO(tapted): Remove this.
56 using ui::test::EventGenerator;
57
58 } // namespace test
59 } // namespace aura
60
61 #endif // UI_AURA_TEST_EVENT_GENERATOR_H_
OLDNEW
« no previous file with comments | « ui/aura/gestures/gesture_recognizer_unittest.cc ('k') | ui/aura/test/event_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698