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

Unified Diff: ui/aura_shell/toplevel_window_event_filter.h

Issue 8618009: Aura: Fix window resizing for large drags. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix HtmlDialogBrowserTest Created 9 years, 1 month 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
« no previous file with comments | « ui/aura/window_delegate.h ('k') | ui/aura_shell/toplevel_window_event_filter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/aura_shell/toplevel_window_event_filter.h
diff --git a/ui/aura_shell/toplevel_window_event_filter.h b/ui/aura_shell/toplevel_window_event_filter.h
index e114586f57049b01b78897df73411e5125838e1c..6491c0aeb6ed0c12c1f328ac5fec18d92d5d32ce 100644
--- a/ui/aura_shell/toplevel_window_event_filter.h
+++ b/ui/aura_shell/toplevel_window_event_filter.h
@@ -53,17 +53,29 @@ class AURA_SHELL_EXPORT ToplevelWindowEventFilter : public aura::EventFilter {
// Calculates the new origin of the window during a drag.
gfx::Point GetOriginForDrag(int bounds_change,
- aura::Window* target,
- aura::MouseEvent* event) const;
+ int delta_x,
+ int delta_y) const;
- // Calculates the new size of the window during a drag.
+ // Calculates the new size of the |target| window during a drag.
+ // If the size is constrained, |delta_x| and |delta_y| may be clamped.
gfx::Size GetSizeForDrag(int bounds_change,
aura::Window* target,
- aura::MouseEvent* event) const;
-
- // The mouse position in the target window when the mouse was pressed, in
- // target window coordinates.
- gfx::Point mouse_down_offset_in_target_;
+ int* delta_x,
+ int* delta_y) const;
+
+ // Calculates new width of a window during a drag where the mouse
+ // position changed by |delta_x|. |delta_x| may be clamped if the window
+ // size is constrained by |min_width|.
+ int GetWidthForDrag(int size_change_direction,
+ int min_width,
+ int* delta_x) const;
+
+ // Calculates new height of a window during a drag where the mouse
+ // position changed by |delta_y|. |delta_y| may be clamped if the window
+ // size is constrained by |min_height|.
+ int GetHeightForDrag(int size_change_direction,
+ int min_height,
+ int* delta_y) const;
// The mouse position in the target window when the mouse was pressed, in
// the target window's parent's coordinates.
« no previous file with comments | « ui/aura/window_delegate.h ('k') | ui/aura_shell/toplevel_window_event_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698