Chromium Code Reviews| Index: ui/aura/window.h |
| diff --git a/ui/aura/window.h b/ui/aura/window.h |
| index 485bcb41b5ea3b6a7df52550b665eb843546f619..b0dabe9daa978d78e859a4b9fccf5a39cd82bbba 100644 |
| --- a/ui/aura/window.h |
| +++ b/ui/aura/window.h |
| @@ -46,6 +46,7 @@ class WindowObserver; |
| namespace internal { |
| class FocusManager; |
| +class Shadow; |
| } |
| // Aura window implementation. Interesting events are sent to the |
| @@ -90,6 +91,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate { |
| void set_user_data(void* user_data) { user_data_ = user_data; } |
| void* user_data() const { return user_data_; } |
| + // Just made available for tests; outside callers shouldn't need to modify it. |
| + const internal::Shadow* shadow() const { return shadow_.get(); } |
| + |
| // Changes the visibility of the window. |
| void Show(); |
| void Hide(); |
| @@ -265,6 +269,11 @@ class AURA_EXPORT Window : public ui::LayerDelegate { |
| void* GetProperty(const char* name) const; |
| int GetIntProperty(const char* name) const; |
| + // Sets whether a drop shadow should be displayed around this window or not. |
| + // By default, shadows aren't displayed. It's safe to call this method before |
| + // calling Init(). |
| + void SetShadowVisible(bool visible); |
| + |
| protected: |
| // Returns the desktop or NULL if we aren't yet attached to a desktop. |
| virtual Desktop* GetDesktop(); |
| @@ -300,6 +309,9 @@ class AURA_EXPORT Window : public ui::LayerDelegate { |
| bool return_tightest, |
| bool for_event_handling); |
| + // Initialize |shadow_|. Init() must be called first. |
| + void InitShadow(); |
| + |
| // Overridden from ui::LayerDelegate: |
| virtual void OnPaintLayer(gfx::Canvas* canvas) OVERRIDE; |
| @@ -349,6 +361,12 @@ class AURA_EXPORT Window : public ui::LayerDelegate { |
| // implementation. |
| std::map<const char*, void*> prop_map_; |
| + // NULL if SetShadowVisible(true) has never been called. |
| + scoped_ptr<internal::Shadow> shadow_; |
|
sky
2011/11/15 04:49:13
Would it work to make the shadow a transient child
|
| + |
| + // Is |shadow_| currently being shown? |
| + bool show_shadow_; |
| + |
| DISALLOW_COPY_AND_ASSIGN(Window); |
| }; |