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

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

Issue 11280283: Extract the code of showing a dragging window on another display from PhantomWindowController. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: assign NULL after deleting Layer Created 8 years 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 | « ash/wm/workspace/frame_maximize_button.cc ('k') | ash/wm/workspace/phantom_window_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/phantom_window_controller.h
diff --git a/ash/wm/workspace/phantom_window_controller.h b/ash/wm/workspace/phantom_window_controller.h
index 7b90615fc2204b5c0ad96fa47e890c6c982b4971..d7622fcc556104e4cae233effd3d40050ca57834 100644
--- a/ash/wm/workspace/phantom_window_controller.h
+++ b/ash/wm/workspace/phantom_window_controller.h
@@ -10,16 +10,13 @@
#include "base/gtest_prod_util.h"
#include "base/memory/scoped_ptr.h"
#include "ui/base/animation/animation_delegate.h"
-#include "ui/gfx/display.h"
#include "ui/gfx/rect.h"
namespace aura {
-class RootWindow;
class Window;
}
namespace ui {
-class Layer;
class SlideAnimation;
}
@@ -34,17 +31,9 @@ namespace internal {
// of a window. It's used used during dragging a window to show a snap location.
class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate {
public:
- enum Style {
- STYLE_SHADOW, // for window snapping.
- STYLE_DRAGGING, // for window dragging.
- };
-
explicit PhantomWindowController(aura::Window* window);
virtual ~PhantomWindowController();
- // Sets the display where the phantom is placed.
- void SetDestinationDisplay(const gfx::Display& dst_display);
-
// Bounds last passed to Show().
const gfx::Rect& bounds() const { return bounds_; }
@@ -52,11 +41,7 @@ class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate {
// parent). If |layer| is non-NULL, it is shown on top of the phantom window.
// |layer| is owned by the caller.
// This does not immediately show the window.
- void Show(const gfx::Rect& bounds, ui::Layer* layer);
-
- // This is used to set bounds for the phantom window immediately. This should
- // be called only when the phantom window is already visible.
- void SetBounds(const gfx::Rect& bounds);
+ void Show(const gfx::Rect& bounds);
// Hides the phantom.
void Hide();
@@ -70,14 +55,6 @@ class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate {
phantom_below_window_ = phantom_below_window;
}
- // Sets/gets the style of the phantom window.
- void set_style(Style style);
- Style style() const { return style_; }
-
- // Sets/gets the opacity of the phantom window.
- void SetOpacity(float opacity);
- float GetOpacity() const;
-
// ui::AnimationDelegate overrides:
virtual void AnimationProgressed(const ui::Animation* animation) OVERRIDE;
@@ -87,20 +64,11 @@ class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate {
// Creates and shows the |phantom_widget_| at |bounds|.
// |layer| is shown on top of the phantom window if it is non-NULL.
// |layer| is not owned by this object.
- void CreatePhantomWidget(const gfx::Rect& bounds, ui::Layer* layer);
-
- // Sets bounds of the phantom window. The window is shown on |dst_display_|
- // if its id() is valid. Otherwise, a display nearest to |bounds| is chosen.
- void SetBoundsInternal(const gfx::Rect& bounds);
+ void CreatePhantomWidget(const gfx::Rect& bounds);
// Window the phantom is placed beneath.
aura::Window* window_;
- // The display where the phantom is placed. When dst_display_.id() is
- // kInvalidDisplayID (i.e. the default), a display nearest to the current
- // |bounds_| is automatically used.
- gfx::Display dst_display_;
-
// If set, the phantom window should get stacked below this window.
aura::Window* phantom_below_window_;
@@ -116,9 +84,6 @@ class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate {
// Used to transition the bounds.
scoped_ptr<ui::SlideAnimation> animation_;
- // The style of the phantom window.
- Style style_;
-
DISALLOW_COPY_AND_ASSIGN(PhantomWindowController);
};
« no previous file with comments | « ash/wm/workspace/frame_maximize_button.cc ('k') | ash/wm/workspace/phantom_window_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698