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

Side by Side Diff: chrome/browser/chromeos/chrome_browser_main_chromeos.cc

Issue 9580023: Enable user change background image in settings page in Aura build. (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: address review Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h" 5 #include "chrome/browser/chromeos/chrome_browser_main_chromeos.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 #include "content/public/common/main_function_params.h" 63 #include "content/public/common/main_function_params.h"
64 #include "grit/platform_locale_settings.h" 64 #include "grit/platform_locale_settings.h"
65 #include "net/base/network_change_notifier.h" 65 #include "net/base/network_change_notifier.h"
66 #include "net/url_request/url_request.h" 66 #include "net/url_request/url_request.h"
67 #include "ui/base/l10n/l10n_util.h" 67 #include "ui/base/l10n/l10n_util.h"
68 68
69 #if defined(TOOLKIT_USES_GTK) 69 #if defined(TOOLKIT_USES_GTK)
70 #include <gtk/gtk.h> 70 #include <gtk/gtk.h>
71 #endif 71 #endif
72 72
73 #if defined(USE_ASH)
74 #include "chrome/browser/chromeos/background/desktop_background_observer.h"
75 #endif
76
73 #if defined(USE_AURA) 77 #if defined(USE_AURA)
74 #include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_o bserver.h" 78 #include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_o bserver.h"
75 #include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo s.h" 79 #include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo s.h"
76 #include "chrome/browser/chromeos/power/power_button_observer.h" 80 #include "chrome/browser/chromeos/power/power_button_observer.h"
77 #include "chrome/browser/chromeos/power/video_property_writer.h" 81 #include "chrome/browser/chromeos/power/video_property_writer.h"
78 #endif 82 #endif
79 83
80 class MessageLoopObserver : public MessageLoopForUI::Observer { 84 class MessageLoopObserver : public MessageLoopForUI::Observer {
81 #if defined(USE_AURA) 85 #if defined(USE_AURA)
82 virtual base::EventStatus WillProcessEvent( 86 virtual base::EventStatus WillProcessEvent(
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
363 // -- just before CreateProfile(). 367 // -- just before CreateProfile().
364 368
365 // Initialize the screen locker now so that it can receive 369 // Initialize the screen locker now so that it can receive
366 // LOGIN_USER_CHANGED notification from UserManager. 370 // LOGIN_USER_CHANGED notification from UserManager.
367 if (chromeos::KioskModeHelper::IsKioskModeEnabled()) { 371 if (chromeos::KioskModeHelper::IsKioskModeEnabled()) {
368 chromeos::InitializeKioskModeIdleLogout(); 372 chromeos::InitializeKioskModeIdleLogout();
369 } else { 373 } else {
370 chromeos::ScreenLocker::InitClass(); 374 chromeos::ScreenLocker::InitClass();
371 } 375 }
372 376
377 #if defined(USE_ASH)
378 // Initialize desktop background observer so that it can receive
379 // LOGIN_USER_CHANGED notification from UserManager.
380 desktop_background_observer_.reset(new chromeos::DesktopBackgroundObserver);
381 #endif
382
373 // This forces the ProfileManager to be created and register for the 383 // This forces the ProfileManager to be created and register for the
374 // notification it needs to track the logged in user. 384 // notification it needs to track the logged in user.
375 g_browser_process->profile_manager(); 385 g_browser_process->profile_manager();
376 386
377 // TODO(abarth): Should this move to InitializeNetworkOptions()? 387 // TODO(abarth): Should this move to InitializeNetworkOptions()?
378 // Allow access to file:// on ChromeOS for tests. 388 // Allow access to file:// on ChromeOS for tests.
379 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess)) 389 if (parsed_command_line().HasSwitch(switches::kAllowFileAccess))
380 net::URLRequest::AllowFileAccess(); 390 net::URLRequest::AllowFileAccess();
381 391
382 // There are two use cases for kLoginUser: 392 // There are two use cases for kLoginUser:
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell 559 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell
550 // singleton before the shell is destroyed. 560 // singleton before the shell is destroyed.
551 video_property_writer_.reset(); 561 video_property_writer_.reset();
552 // Remove PowerButtonObserver attached to a D-Bus client before 562 // Remove PowerButtonObserver attached to a D-Bus client before
553 // DBusThreadManager is shut down. 563 // DBusThreadManager is shut down.
554 power_button_observer_.reset(); 564 power_button_observer_.reset();
555 #endif 565 #endif
556 566
557 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); 567 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun();
558 } 568 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698