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

Side by Side Diff: trunk/src/ui/aura/test/event_generator_delegate_aura.h

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

Powered by Google App Engine
This is Rietveld 408576698