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

Unified Diff: ash/common/wm/dock/docked_window_layout_manager.cc

Issue 2053113002: Replaced BackgroundAnimator with ShelfBackgroundAnimator. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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/common/wm/dock/docked_window_layout_manager.cc
diff --git a/ash/common/wm/dock/docked_window_layout_manager.cc b/ash/common/wm/dock/docked_window_layout_manager.cc
index 56825c25be9b79ae115df8bfbb47804472b533f9..ee26295d4fcc6bfcaf96e846bb53136ad9e893ee 100644
--- a/ash/common/wm/dock/docked_window_layout_manager.cc
+++ b/ash/common/wm/dock/docked_window_layout_manager.cc
@@ -55,6 +55,7 @@ class DockedBackgroundWidget : public views::Widget,
alignment_(DOCKED_ALIGNMENT_NONE),
background_animator_(this, 0, GetShelfConstant(SHELF_BACKGROUND_ALPHA)),
alpha_(0),
+ // TODO(bruthig): Remove opaque_background_.
opaque_background_(ui::LAYER_SOLID_COLOR),
visible_background_type_(manager_->shelf()->GetBackgroundType()),
visible_background_change_type_(BACKGROUND_CHANGE_IMMEDIATE) {
@@ -69,6 +70,7 @@ class DockedBackgroundWidget : public views::Widget,
// Sets widget bounds and sizes opaque background layer to fill the widget.
void SetBackgroundBounds(const gfx::Rect& bounds, DockedAlignment alignment) {
SetBounds(bounds);
+ // TODO(bruthig): Remove opaque_background_.
opaque_background_.SetBounds(gfx::Rect(bounds.size()));
alignment_ = alignment;
}
@@ -114,7 +116,7 @@ class DockedBackgroundWidget : public views::Widget,
}
// BackgroundAnimatorDelegate:
- void UpdateBackground(int alpha) override {
+ void UpdateBackground(BackgroundAnimator* animator, int alpha) override {
alpha_ = alpha;
SchedulePaintInRect(gfx::Rect(GetWindowBoundsInScreen().size()));
}
@@ -145,6 +147,7 @@ class DockedBackgroundWidget : public views::Widget,
SetVisibilityChangedAnimationsEnabled(false);
WmWindow* wm_window = WmLookup::Get()->GetWindowForWidget(this);
wm_window->SetLockedToRoot(true);
+ // TODO(bruthig): Remove opaque_background_.
opaque_background_.SetColor(SK_ColorBLACK);
opaque_background_.SetBounds(gfx::Rect(GetWindowBoundsInScreen().size()));
opaque_background_.SetOpacity(0.0f);
@@ -167,6 +170,7 @@ class DockedBackgroundWidget : public views::Widget,
parent->StackChildAtBottom(wm_window);
}
+ // TODO(bruthig): Remove opaque_background_ => and this entire method.
// Transitions to |visible_background_type_| if the widget is visible and to
// SHELF_BACKGROUND_DEFAULT if it is not.
void UpdateBackground() {
@@ -200,12 +204,14 @@ class DockedBackgroundWidget : public views::Widget,
DockedAlignment alignment_;
+ // TODO(bruthig): Replace BackgroundAnimator with ShelfBackgroundAnimator.
// The animator for the background transitions.
BackgroundAnimator background_animator_;
// The alpha to use for drawing image assets covering the docked background.
int alpha_;
+ // TODO(bruthig): Remove opaque_background_.
// Solid black background that can be made fully opaque.
ui::Layer opaque_background_;

Powered by Google App Engine
This is Rietveld 408576698