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

Unified Diff: ash/wm/panels/panel_window_resizer.h

Issue 13896026: Stick windows to sides of workspaces (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Dock with zero width (no logs) Created 7 years, 6 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: ash/wm/panels/panel_window_resizer.h
diff --git a/ash/wm/panels/panel_window_resizer.h b/ash/wm/panels/panel_window_resizer.h
index 5dbc32d0aea2bd612dbc76b114b23a5e4d368323..eee15b4bc48c03cf3ca6c935f3505f216ffc271c 100644
--- a/ash/wm/panels/panel_window_resizer.h
+++ b/ash/wm/panels/panel_window_resizer.h
@@ -13,6 +13,10 @@ class Rect;
class Point;
}
+namespace aura {
+class RootWindow;
+}
+
namespace ash {
// PanelWindowResizer is used by ToplevelWindowEventFilter to handle dragging,
@@ -30,7 +34,7 @@ class ASH_EXPORT PanelWindowResizer : public WindowResizer {
const gfx::Point& location,
int window_component);
- // WindowResizer overides:
+ // WindowResizer:
virtual void Drag(const gfx::Point& location, int event_flags) OVERRIDE;
virtual void CompleteDrag(int event_flags) OVERRIDE;
virtual void RevertDrag() OVERRIDE;
@@ -65,6 +69,8 @@ class ASH_EXPORT PanelWindowResizer : public WindowResizer {
const Details details_;
+ gfx::Point last_mouse_location_;
+
// Wraps a window resizer and adds panel detaching / reattaching and snapping
// to launcher behavior during drags.
scoped_ptr<WindowResizer> next_window_resizer_;
@@ -72,6 +78,9 @@ class ASH_EXPORT PanelWindowResizer : public WindowResizer {
// Panel container window.
aura::Window* panel_container_;
+ // Cached root window when drag started
+ aura::RootWindow* root_window_;
+
// Set to true once Drag() is invoked and the bounds of the window change.
bool did_move_or_resize_;
@@ -88,6 +97,6 @@ class ASH_EXPORT PanelWindowResizer : public WindowResizer {
DISALLOW_COPY_AND_ASSIGN(PanelWindowResizer);
};
-} // namespace aura
+} // namespace ash
#endif // ASH_WM_PANELS_PANEL_WINDOW_RESIZER_H_

Powered by Google App Engine
This is Rietveld 408576698