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

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

Issue 10832019: Speed up custom wallpaper switching time and wallpaper manager code refactor (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compile Created 8 years, 4 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 <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
277 ChromeBrowserMainPartsLinux::PreMainMessageLoopStart(); 277 ChromeBrowserMainPartsLinux::PreMainMessageLoopStart();
278 } 278 }
279 279
280 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() { 280 void ChromeBrowserMainPartsChromeos::PostMainMessageLoopStart() {
281 MessageLoopForUI* message_loop = MessageLoopForUI::current(); 281 MessageLoopForUI* message_loop = MessageLoopForUI::current();
282 message_loop->AddObserver(g_message_loop_observer.Pointer()); 282 message_loop->AddObserver(g_message_loop_observer.Pointer());
283 283
284 // Initialize DBusThreadManager for the browser. This must be done after 284 // Initialize DBusThreadManager for the browser. This must be done after
285 // the main message loop is started, as it uses the message loop. 285 // the main message loop is started, as it uses the message loop.
286 chromeos::DBusThreadManager::Initialize(); 286 chromeos::DBusThreadManager::Initialize();
287 // Add PowerManagerClient observer for WallpaperManager. WallpaperManager 287 // Add observers for WallpaperManager. WallpaperManager is initialized before
288 // is initialized before DBusThreadManager. 288 // DBusThreadManager.
289 chromeos::WallpaperManager::Get()->AddPowerManagerClientObserver(); 289 chromeos::WallpaperManager::Get()->AddObservers();
290 290
291 chromeos::CrosDBusService::Initialize(); 291 chromeos::CrosDBusService::Initialize();
292 292
293 // Initialize the session manager observer so that we'll take actions 293 // Initialize the session manager observer so that we'll take actions
294 // per signals sent from the session manager. 294 // per signals sent from the session manager.
295 session_manager_observer_.reset(new chromeos::SessionManagerObserver); 295 session_manager_observer_.reset(new chromeos::SessionManagerObserver);
296 296
297 chromeos::disks::DiskMountManager::Initialize(); 297 chromeos::disks::DiskMountManager::Initialize();
298 cryptohome::AsyncMethodCaller::Initialize(); 298 cryptohome::AsyncMethodCaller::Initialize();
299 299
(...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after
581 LOG(WARNING) << "low_mem: Part of '100MB' experiment"; 581 LOG(WARNING) << "low_mem: Part of '100MB' experiment";
582 chromeos::LowMemoryObserver::SetLowMemoryMargin(100); 582 chromeos::LowMemoryObserver::SetLowMemoryMargin(100);
583 } else if (trial->group() == margin_200mb) { 583 } else if (trial->group() == margin_200mb) {
584 LOG(WARNING) << "low_mem: Part of '200MB' experiment"; 584 LOG(WARNING) << "low_mem: Part of '200MB' experiment";
585 chromeos::LowMemoryObserver::SetLowMemoryMargin(200); 585 chromeos::LowMemoryObserver::SetLowMemoryMargin(200);
586 } else { 586 } else {
587 LOG(WARNING) << "low_mem: Part of 'default' experiment"; 587 LOG(WARNING) << "low_mem: Part of 'default' experiment";
588 } 588 }
589 } 589 }
590 } 590 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698