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

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

Issue 10837211: Draw web content area correctly on a phantom window for window dragging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: review 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
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 44262ea4857b3a0efe978c39aa5df141f6ddc5f0..61ee045f9a133059b9631676793964f709ad0278 100644
--- a/ash/wm/workspace/phantom_window_controller.h
+++ b/ash/wm/workspace/phantom_window_controller.h
@@ -13,11 +13,12 @@
#include "ui/gfx/rect.h"
namespace aura {
-class Window;
class RootWindow;
+class Window;
}
namespace ui {
+class Layer;
class SlideAnimation;
}
@@ -32,6 +33,8 @@ 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:
+ // TODO(yusukes): Rename STYLE_WINDOW to STYLE_NONE and remove WindowPainter.
+ // See comments in CreatePhantomWidget() for more details.
enum Style {
STYLE_SHADOW, // for window snapping.
STYLE_WINDOW, // for window dragging.
@@ -66,6 +69,11 @@ class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate {
phantom_below_window_ = phantom_below_window;
}
+ // Sets/gets the |layer| which is shown on top of the |phantom_widget_|.
+ // PhantomWindowController does not own the |layer|.
+ void set_layer(ui::Layer* layer);
+ ui::Layer* layer() const { return layer_; }
+
// Sets/gets the style of the phantom window.
void set_style(Style style);
Style style() const { return style_; }
@@ -111,6 +119,10 @@ class ASH_EXPORT PhantomWindowController : public ui::AnimationDelegate {
// The style of the phantom window.
Style style_;
+ // The layer which should be shown on top of the |phantom_widget_|. NULL when
+ // no layer needs to be shown. This object does not own the layer.
+ ui::Layer* layer_;
+
DISALLOW_COPY_AND_ASSIGN(PhantomWindowController);
};

Powered by Google App Engine
This is Rietveld 408576698