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

Unified Diff: chrome/browser/chromeos/login/wallpaper_manager.cc

Issue 162393002: Enable surprise me wallpaper for new profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 6 years, 10 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: chrome/browser/chromeos/login/wallpaper_manager.cc
diff --git a/chrome/browser/chromeos/login/wallpaper_manager.cc b/chrome/browser/chromeos/login/wallpaper_manager.cc
index 14cfbf3c22b0b5206cf5ea356b61a9500154d361..fc6b939e9ac30c7c1ae05aeaa8bc6d1cb08ddbb7 100644
--- a/chrome/browser/chromeos/login/wallpaper_manager.cc
+++ b/chrome/browser/chromeos/login/wallpaper_manager.cc
@@ -27,6 +27,8 @@
#include "base/values.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/chromeos/extensions/wallpaper_private_api.h"
+#include "chrome/browser/chromeos/login/login_display_host_impl.h"
#include "chrome/browser/chromeos/login/startup_utils.h"
#include "chrome/browser/chromeos/login/user.h"
#include "chrome/browser/chromeos/login/user_manager.h"
@@ -39,6 +41,7 @@
#include "chromeos/dbus/dbus_thread_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_service.h"
+#include "content/public/browser/web_ui.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/codec/jpeg_codec.h"
#include "ui/gfx/image/image_skia_operations.h"
@@ -850,6 +853,14 @@ void WallpaperManager::RemoveObserver(WallpaperManager::Observer* observer) {
observers_.RemoveObserver(observer);
}
+void WallpaperManager::EnableSurpriseMe() {
+ static_cast<chromeos::LoginDisplayHostImpl*>(
+ chromeos::LoginDisplayHostImpl::default_host())
Nikita (slow) 2014/02/28 10:44:14 I assumes this call may happen inside session (whe
+ ->GetOobeUI()
+ ->web_ui()
+ ->CallJavascriptFunction("SurpriseWallpaper.prototype.enableSurpriseMe");
+}
+
void WallpaperManager::NotifyAnimationFinished() {
FOR_EACH_OBSERVER(
Observer, observers_, OnWallpaperAnimationFinished(last_selected_user_));

Powered by Google App Engine
This is Rietveld 408576698