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

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

Issue 118553004: aura: Add an EasyResizeWindowTargeter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r243131 Created 6 years, 11 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 | « ash/shelf/shelf_widget_unittest.cc ('k') | ui/aura/window_targeter.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) 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 #include "ui/aura/aura_export.h"
5 #include "ui/events/event_targeter.h" 6 #include "ui/events/event_targeter.h"
6 7
7 namespace aura { 8 namespace aura {
8 9
9 class Window; 10 class Window;
10 11
11 class WindowTargeter : public ui::EventTargeter { 12 class AURA_EXPORT WindowTargeter : public ui::EventTargeter {
12 public: 13 public:
13 WindowTargeter(); 14 WindowTargeter();
14 virtual ~WindowTargeter(); 15 virtual ~WindowTargeter();
15 16
16 protected: 17 protected:
18 bool WindowCanAcceptEvent(aura::Window* window,
19 const ui::LocatedEvent& event) const;
20
21 // Returns whether the location of the event is in an actionable region of the
22 // window. Note that the location etc. of |event| is in the |window|'s
23 // parent's coordinate system.
24 virtual bool EventLocationInsideBounds(aura::Window* window,
25 const ui::LocatedEvent& event) const;
26
17 // ui::EventTargeter: 27 // ui::EventTargeter:
18 virtual ui::EventTarget* FindTargetForEvent(ui::EventTarget* root, 28 virtual ui::EventTarget* FindTargetForEvent(ui::EventTarget* root,
19 ui::Event* event) OVERRIDE; 29 ui::Event* event) OVERRIDE;
20 virtual ui::EventTarget* FindTargetForLocatedEvent( 30 virtual ui::EventTarget* FindTargetForLocatedEvent(
21 ui::EventTarget* root, 31 ui::EventTarget* root,
22 ui::LocatedEvent* event) OVERRIDE; 32 ui::LocatedEvent* event) OVERRIDE;
23 virtual bool SubtreeShouldBeExploredForEvent( 33 virtual bool SubtreeShouldBeExploredForEvent(
24 ui::EventTarget* target, 34 ui::EventTarget* target,
25 const ui::LocatedEvent& event) OVERRIDE; 35 const ui::LocatedEvent& event) OVERRIDE;
26 36
27 private: 37 private:
28 Window* FindTargetInRootWindow(Window* root_window, 38 Window* FindTargetInRootWindow(Window* root_window,
29 const ui::LocatedEvent& event); 39 const ui::LocatedEvent& event);
30 40
31 DISALLOW_COPY_AND_ASSIGN(WindowTargeter); 41 DISALLOW_COPY_AND_ASSIGN(WindowTargeter);
32 }; 42 };
33 43
34 } // namespace aura 44 } // namespace aura
OLDNEW
« no previous file with comments | « ash/shelf/shelf_widget_unittest.cc ('k') | ui/aura/window_targeter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698