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

Unified Diff: ash/wm/workspace/system_background_controller.cc

Issue 11054005: ash: Display system background while loading wallpaper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix win_aura compile, hopefully Created 8 years, 2 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 | « ash/wm/workspace/system_background_controller.h ('k') | ash/wm/workspace/workspace_manager2.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/wm/workspace/system_background_controller.cc
diff --git a/ash/wm/workspace/system_background_controller.cc b/ash/wm/workspace/system_background_controller.cc
index 728e3e11b5927e39dea0ae90f39386c8dffabe78..363a3050f46171a7381815285742d34c86c17c75 100644
--- a/ash/wm/workspace/system_background_controller.cc
+++ b/ash/wm/workspace/system_background_controller.cc
@@ -5,6 +5,7 @@
#include "ash/wm/workspace/system_background_controller.h"
#include "ash/shell_window_ids.h"
+#include "ui/aura/client/aura_constants.h"
#include "ui/aura/root_window.h"
#include "ui/gfx/canvas.h"
#include "ui/views/widget/widget.h"
@@ -49,7 +50,8 @@ views::View* SystemBackgroundController::View::GetContentsView() {
return this;
}
-SystemBackgroundController::SystemBackgroundController(aura::RootWindow* root)
+SystemBackgroundController::SystemBackgroundController(aura::RootWindow* root,
+ SkColor color)
: ALLOW_THIS_IN_INITIALIZER_LIST(view_(new View(this))) {
views::Widget* widget = new views::Widget;
views::Widget::InitParams params(
@@ -62,7 +64,9 @@ SystemBackgroundController::SystemBackgroundController(aura::RootWindow* root)
// flicker.
params.layer_type = ui::LAYER_SOLID_COLOR;
widget->Init(params);
- widget->GetNativeView()->layer()->SetColor(SK_ColorBLACK);
+ widget->GetNativeView()->SetProperty(aura::client::kAnimationsDisabledKey,
+ true);
+ widget->GetNativeView()->layer()->SetColor(color);
widget->SetBounds(params.parent->bounds());
widget->Show();
widget->GetNativeView()->SetName("SystemBackground");
@@ -73,5 +77,10 @@ SystemBackgroundController::~SystemBackgroundController() {
view_->Close();
}
+void SystemBackgroundController::SetColor(SkColor color) {
+ if (view_)
+ view_->GetWidget()->GetNativeView()->layer()->SetColor(color);
+}
+
} // namespace internal
} // namespace ash
« no previous file with comments | « ash/wm/workspace/system_background_controller.h ('k') | ash/wm/workspace/workspace_manager2.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698