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

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: Modify tracking of nonclipped state for new code structure. 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..706fec16a1bc5a1d6da1dd22f152beaf40186921 100644
--- a/ui/aura/window_targeter.h
+++ b/ui/aura/window_targeter.h
@@ -14,8 +14,16 @@ class KeyEvent;
class LocatedEvent;
} // namespace ui
+namespace gfx {
+class Point;
+} // namespace gfx
+
namespace aura {
+// Key for native window proprety 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;
class AURA_EXPORT WindowTargeter : public ui::EventTargeter {
@@ -60,6 +68,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 can extend outside of |parent|'s bounds.
+ static bool ChildHasBoundsOutsideParent(Window* parent, Window* child);
+
+ // Returns whether the location of |event_point| is in an actionable region of
+ // |window| or 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
+ // then |event_point| is in |window|'s parent's coordinate system, if false
+ // |event_point| is in |window|'s coordinate system.
+ bool HasIndependentChildWithEvent(Window* window,
+ const gfx::Point& event_point,
+ 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