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

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

Issue 9703031: Retry landing "Enable users change desktop background image from settings page in Chromeos Aura bui… (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Merge to trunk 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
61 #include "content/public/common/main_function_params.h" 61 #include "content/public/common/main_function_params.h"
62 #include "grit/platform_locale_settings.h" 62 #include "grit/platform_locale_settings.h"
63 #include "net/base/network_change_notifier.h" 63 #include "net/base/network_change_notifier.h"
64 #include "net/url_request/url_request.h" 64 #include "net/url_request/url_request.h"
65 #include "ui/base/l10n/l10n_util.h" 65 #include "ui/base/l10n/l10n_util.h"
66 66
67 #if defined(TOOLKIT_USES_GTK) 67 #if defined(TOOLKIT_USES_GTK)
68 #include <gtk/gtk.h> 68 #include <gtk/gtk.h>
69 #endif 69 #endif
70 70
71 #if defined(OS_CHROMEOS) && defined(USE_ASH)
72 #include "chrome/browser/chromeos/background/desktop_background_observer.h"
73 #endif
74
71 #if defined(USE_AURA) 75 #if defined(USE_AURA)
72 #include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_o bserver.h" 76 #include "chrome/browser/chromeos/legacy_window_manager/initial_browser_window_o bserver.h"
73 #include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo s.h" 77 #include "chrome/browser/chromeos/power/power_button_controller_delegate_chromeo s.h"
74 #include "chrome/browser/chromeos/power/power_button_observer.h" 78 #include "chrome/browser/chromeos/power/power_button_observer.h"
75 #include "chrome/browser/chromeos/power/video_property_writer.h" 79 #include "chrome/browser/chromeos/power/video_property_writer.h"
76 #endif 80 #endif
77 81
78 class MessageLoopObserver : public MessageLoopForUI::Observer { 82 class MessageLoopObserver : public MessageLoopForUI::Observer {
79 #if defined(USE_AURA) 83 #if defined(USE_AURA)
80 virtual base::EventStatus WillProcessEvent( 84 virtual base::EventStatus WillProcessEvent(
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
401 content::NotificationService::AllSources(), 405 content::NotificationService::AllSources(),
402 content::NotificationService::NoDetails()); 406 content::NotificationService::NoDetails());
403 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) { 407 } else if (parsed_command_line().HasSwitch(switches::kLoginManager)) {
404 // Initialize status area mode early on. 408 // Initialize status area mode early on.
405 chromeos::StatusAreaViewChromeos:: 409 chromeos::StatusAreaViewChromeos::
406 SetScreenMode(chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI); 410 SetScreenMode(chromeos::StatusAreaViewChromeos::LOGIN_MODE_WEBUI);
407 } 411 }
408 412
409 // In Aura builds this will initialize ash::Shell. 413 // In Aura builds this will initialize ash::Shell.
410 ChromeBrowserMainPartsLinux::PreProfileInit(); 414 ChromeBrowserMainPartsLinux::PreProfileInit();
415
416 #if defined(OS_CHROMEOS) && defined(USE_ASH)
417 // Initialize desktop background observer so that it can receive
418 // LOGIN_USER_CHANGED notification from UserManager.
419 desktop_background_observer_.reset(new chromeos::DesktopBackgroundObserver);
420 #endif
411 } 421 }
412 422
413 void ChromeBrowserMainPartsChromeos::PostProfileInit() { 423 void ChromeBrowserMainPartsChromeos::PostProfileInit() {
414 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun() 424 // -- This used to be in ChromeBrowserMainParts::PreMainMessageLoopRun()
415 // -- just after CreateProfile(). 425 // -- just after CreateProfile().
416 426
417 if (parsed_command_line().HasSwitch(switches::kLoginUser) && 427 if (parsed_command_line().HasSwitch(switches::kLoginUser) &&
418 !parsed_command_line().HasSwitch(switches::kLoginPassword)) { 428 !parsed_command_line().HasSwitch(switches::kLoginPassword)) {
419 // Pass the TokenService pointer to the policy connector so user policy can 429 // Pass the TokenService pointer to the policy connector so user policy can
420 // grab a token and register with the policy server. 430 // grab a token and register with the policy server.
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after
532 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell 542 // Let VideoPropertyWriter unregister itself as an observer of the ash::Shell
533 // singleton before the shell is destroyed. 543 // singleton before the shell is destroyed.
534 video_property_writer_.reset(); 544 video_property_writer_.reset();
535 // Remove PowerButtonObserver attached to a D-Bus client before 545 // Remove PowerButtonObserver attached to a D-Bus client before
536 // DBusThreadManager is shut down. 546 // DBusThreadManager is shut down.
537 power_button_observer_.reset(); 547 power_button_observer_.reset();
538 #endif 548 #endif
539 549
540 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun(); 550 ChromeBrowserMainPartsLinux::PostMainMessageLoopRun();
541 } 551 }
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/chrome_browser_main_chromeos.h ('k') | chrome/browser/chromeos/login/mock_user_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698