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

Unified 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: Fix targeting and missing widget on unit tests. Created 4 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 side-by-side diff with in-line comments
Download patch
Index: ui/aura/window_targeter.h
diff --git a/ui/aura/window_targeter.h b/ui/aura/window_targeter.h
index 048d8ad2e472aca897fccab4dfb8c125180d45ab..6a1a2d9a873701b48ebfcea403ca3eadc8cce297 100644
--- a/ui/aura/window_targeter.h
+++ b/ui/aura/window_targeter.h
@@ -14,7 +14,14 @@ class KeyEvent;
class LocatedEvent;
} // namespace ui
+namespace gfx {
+class Point;
+} // namespace gfx
+
namespace aura {
Lei Zhang 2016/08/18 20:30:57 nit: leave a blank line after the namespace like b
rbpotter 2016/08/19 01:59:09 Done.
+// Key for native window property that indicates if the window should have
+// bounds independent of its modal parent. Only supported on ChromeOS.
+AURA_EXPORT extern const char kHasIndependentBoundsKey[];
class Window;
@@ -60,6 +67,19 @@ class AURA_EXPORT WindowTargeter : public ui::EventTargeter {
ui::EventTarget* FindNextBestTarget(ui::EventTarget* previous_target,
ui::Event* event) override;
+ // Returns true if |child|'s bounds extend outside of |parent|'s bounds.
+ bool ChildHasBoundsOutsideParent(Window* parent, Window* child);
Lei Zhang 2016/08/18 20:30:57 static method since it doesn't depend on |this| at
rbpotter 2016/08/19 01:59:09 Done.
+
+ // Returns whether the location of the event is in an actionable region of
Lei Zhang 2016/08/18 20:30:58 s/the location of the event/|point|/
rbpotter 2016/08/19 01:59:10 Done.
+ // |window| or of any of its children. Does not assume that children are
+ // restricted to the bounds of their modal parent windows if the
+ // kHasIndependentBounds property is set. If in_parent_coordinates is true
Lei Zhang 2016/08/18 20:30:57 nit: refer to variables as |var|
rbpotter 2016/08/19 01:59:09 Done.
+ // |point| is in |window|'s parent's coordinate system, if false |point| is
+ // in |window|'s coordinate system.
+ bool HasIndependentChildWithEvent(Window* window,
+ gfx::Point point,
Lei Zhang 2016/08/18 20:30:57 Pass by const-ref
rbpotter 2016/08/19 01:59:10 Done.
+ bool in_parent_coordinates);
+
private:
Window* FindTargetForKeyEvent(Window* root_window, const ui::KeyEvent& event);
Window* FindTargetForNonKeyEvent(Window* root_window, ui::Event* event);

Powered by Google App Engine
This is Rietveld 408576698