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

Unified Diff: ash/root_window_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/root_window_controller.h ('k') | ash/shell.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/root_window_controller.cc
diff --git a/ash/root_window_controller.cc b/ash/root_window_controller.cc
index 5bcee4d061ff6ac94bb5db5e037c2624dacb9357..e9abfab055bf7e1c70eaa5b6e17526d8b6b62d0a 100644
--- a/ash/root_window_controller.cc
+++ b/ash/root_window_controller.cc
@@ -21,6 +21,7 @@
#include "ash/wm/toplevel_window_event_handler.h"
#include "ash/wm/visibility_controller.h"
#include "ash/wm/window_properties.h"
+#include "ash/wm/workspace/system_background_controller.h"
#include "ash/wm/workspace_controller.h"
#include "ui/aura/client/activation_client.h"
#include "ui/aura/client/aura_constants.h"
@@ -37,6 +38,12 @@
namespace ash {
namespace {
+#if defined(OS_CHROMEOS)
+// Color initially used for the system background after the system has first
+// booted.
+const SkColor kBootSystemBackgroundColor = 0xFFFEFEFE;
+#endif
+
// Creates a new window for use as a container.
aura::Window* CreateContainer(int window_id,
const char* name,
@@ -189,6 +196,21 @@ void RootWindowController::CreateContainers() {
CreateContainersInRootWindow(root_window_.get());
}
+void RootWindowController::CreateSystemBackground(
+ bool is_first_run_after_boot) {
+ SkColor color = SK_ColorBLACK;
+#if defined(OS_CHROMEOS)
+ if (is_first_run_after_boot)
+ color = kBootSystemBackgroundColor;
+#endif
+ background_.reset(new SystemBackgroundController(root_window_.get(), color));
+}
+
+void RootWindowController::HandleDesktopBackgroundVisible() {
+ if (background_.get())
+ background_->SetColor(SK_ColorBLACK);
+}
+
void RootWindowController::CloseChildWindows() {
// Close background widget first as it depends on tooltip.
root_window_->SetProperty(kWindowDesktopComponent,
« no previous file with comments | « ash/root_window_controller.h ('k') | ash/shell.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698