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

Unified Diff: ash/wm/workspace/workspace_window_resizer.h

Issue 10834097: Allow the user to drag a window from one display to another (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 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
« no previous file with comments | « no previous file | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/workspace_window_resizer.h
diff --git a/ash/wm/workspace/workspace_window_resizer.h b/ash/wm/workspace/workspace_window_resizer.h
index 018a7ccf6adf4b5f0621101d846743cfaec94320..258d89c58567e30beb550fec331b585e4f814086 100644
--- a/ash/wm/workspace/workspace_window_resizer.h
+++ b/ash/wm/workspace/workspace_window_resizer.h
@@ -11,6 +11,10 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
+namespace aura {
+class RootWindow;
+} // namespace aura
+
namespace ash {
namespace internal {
@@ -105,11 +109,13 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
int PrimaryAxisSize(const gfx::Size& size) const;
int PrimaryAxisCoordinate(int x, int y) const;
- // Updates the bounds of the phantom window.
- void UpdatePhantomWindow(
- const gfx::Point& location,
- const gfx::Rect& bounds,
- int grid_size);
+ // Updates the bounds of the phantom window for window snapping.
+ void UpdateSnapPhantomWindow(const gfx::Point& location,
+ const gfx::Rect& bounds,
+ int grid_size);
+
+ // Updates the bounds of the phantom window for window dragging.
+ void UpdateDragPhantomWindow(const gfx::Rect& bounds);
// Restacks the windows z-order position so that one of the windows is at the
// top of the z-order, and the rest directly underneath it.
@@ -157,7 +163,12 @@ class ASH_EXPORT WorkspaceWindowResizer : public WindowResizer {
// Gives a previews of where the the window will end up. Only used if there
// is a grid and the caption is being dragged.
- scoped_ptr<PhantomWindowController> phantom_window_controller_;
+ scoped_ptr<PhantomWindowController> snap_phantom_window_controller_;
+
+ // For now, we show a phantom window on the other root window during dragging.
+ // TODO(yusukes): Show a semi-transparent image (screen shot) of the window
+ // instead.
+ scoped_ptr<PhantomWindowController> drag_phantom_window_controller_;
// Used to determine the target position of a snap.
scoped_ptr<SnapSizer> snap_sizer_;
« no previous file with comments | « no previous file | ash/wm/workspace/workspace_window_resizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698