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

Side by Side Diff: ui/aura/window_targeter.h

Issue 2172363002: Created min size for print preview dialog and modified to allow the Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: reduced diff Created 4 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
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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_AURA_WINDOW_TARGETER_H_ 5 #ifndef UI_AURA_WINDOW_TARGETER_H_
6 #define UI_AURA_WINDOW_TARGETER_H_ 6 #define UI_AURA_WINDOW_TARGETER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "ui/aura/aura_export.h" 9 #include "ui/aura/aura_export.h"
10 #include "ui/events/event_targeter.h" 10 #include "ui/events/event_targeter.h"
11 11
12 namespace ui { 12 namespace ui {
13 class KeyEvent; 13 class KeyEvent;
14 class LocatedEvent; 14 class LocatedEvent;
15 } // namespace ui 15 } // namespace ui
16 16
17 namespace gfx {
18 class Point;
19 }
20
17 namespace aura { 21 namespace aura {
18 22
19 class Window; 23 class Window;
20 24
21 class AURA_EXPORT WindowTargeter : public ui::EventTargeter { 25 class AURA_EXPORT WindowTargeter : public ui::EventTargeter {
22 public: 26 public:
23 WindowTargeter(); 27 WindowTargeter();
24 ~WindowTargeter() override; 28 ~WindowTargeter() override;
25 29
26 // Returns true if |window| or one of its descendants can be a target of 30 // Returns true if |window| or one of its descendants can be a target of
(...skipping 25 matching lines...) Expand all
52 // target. Note that the location etc. of |event| is in the |window|'s 56 // target. Note that the location etc. of |event| is in the |window|'s
53 // parent's coordinate system. 57 // parent's coordinate system.
54 virtual bool EventLocationInsideBounds(Window* target, 58 virtual bool EventLocationInsideBounds(Window* target,
55 const ui::LocatedEvent& event) const; 59 const ui::LocatedEvent& event) const;
56 60
57 // ui::EventTargeter: 61 // ui::EventTargeter:
58 ui::EventTarget* FindTargetForEvent(ui::EventTarget* root, 62 ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
59 ui::Event* event) override; 63 ui::Event* event) override;
60 ui::EventTarget* FindNextBestTarget(ui::EventTarget* previous_target, 64 ui::EventTarget* FindNextBestTarget(ui::EventTarget* previous_target,
61 ui::Event* event) override; 65 ui::Event* event) override;
66 bool EventLocationInsideBoundsRecursive(Window* window,
67 gfx::Point point, gfx::Point location);
62 68
63 private: 69 private:
64 Window* FindTargetForKeyEvent(Window* root_window, const ui::KeyEvent& event); 70 Window* FindTargetForKeyEvent(Window* root_window, const ui::KeyEvent& event);
65 Window* FindTargetForNonKeyEvent(Window* root_window, ui::Event* event); 71 Window* FindTargetForNonKeyEvent(Window* root_window, ui::Event* event);
66 Window* FindTargetInRootWindow(Window* root_window, 72 Window* FindTargetInRootWindow(Window* root_window,
67 const ui::LocatedEvent& event); 73 const ui::LocatedEvent& event);
68 Window* FindTargetForLocatedEventRecursively(Window* root_window, 74 Window* FindTargetForLocatedEventRecursively(Window* root_window,
69 ui::LocatedEvent* event); 75 ui::LocatedEvent* event);
70 76
71 DISALLOW_COPY_AND_ASSIGN(WindowTargeter); 77 DISALLOW_COPY_AND_ASSIGN(WindowTargeter);
72 }; 78 };
73 79
74 } // namespace aura 80 } // namespace aura
75 81
76 #endif // UI_AURA_WINDOW_TARGETER_H_ 82 #endif // UI_AURA_WINDOW_TARGETER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698