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

Side by Side Diff: ash/desktop_background/desktop_background_controller.cc

Issue 18308004: Update CrOS to use scoped_refptr<T>::get() rather than implicit "operator T*" (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased Created 7 years, 5 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
« no previous file with comments | « no previous file | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/desktop_background/desktop_background_controller.h" 5 #include "ash/desktop_background/desktop_background_controller.h"
6 6
7 #include "ash/ash_switches.h" 7 #include "ash/ash_switches.h"
8 #include "ash/desktop_background/desktop_background_controller_observer.h" 8 #include "ash/desktop_background/desktop_background_controller_observer.h"
9 #include "ash/desktop_background/desktop_background_view.h" 9 #include "ash/desktop_background/desktop_background_view.h"
10 #include "ash/desktop_background/desktop_background_widget_controller.h" 10 #include "ash/desktop_background/desktop_background_widget_controller.h"
(...skipping 342 matching lines...) Expand 10 before | Expand all | Expand 10 after
353 bool DesktopBackgroundController::MoveDesktopToUnlockedContainer() { 353 bool DesktopBackgroundController::MoveDesktopToUnlockedContainer() {
354 if (!locked_) 354 if (!locked_)
355 return false; 355 return false;
356 locked_ = false; 356 locked_ = false;
357 return ReparentBackgroundWidgets(GetBackgroundContainerId(true), 357 return ReparentBackgroundWidgets(GetBackgroundContainerId(true),
358 GetBackgroundContainerId(false)); 358 GetBackgroundContainerId(false));
359 } 359 }
360 360
361 bool DesktopBackgroundController::DefaultWallpaperIsAlreadyLoadingOrLoaded( 361 bool DesktopBackgroundController::DefaultWallpaperIsAlreadyLoadingOrLoaded(
362 const base::FilePath& image_file, int image_resource_id) const { 362 const base::FilePath& image_file, int image_resource_id) const {
363 return (wallpaper_loader_ && 363 return (wallpaper_loader_.get() &&
364 wallpaper_loader_->file_path() == image_file && 364 wallpaper_loader_->file_path() == image_file &&
365 wallpaper_loader_->resource_id() == image_resource_id) || 365 wallpaper_loader_->resource_id() == image_resource_id) ||
366 (current_wallpaper_.get() && 366 (current_wallpaper_.get() &&
367 current_default_wallpaper_path_ == image_file && 367 current_default_wallpaper_path_ == image_file &&
368 current_default_wallpaper_resource_id_ == image_resource_id); 368 current_default_wallpaper_resource_id_ == image_resource_id);
369 } 369 }
370 370
371 bool DesktopBackgroundController::CustomWallpaperIsAlreadyLoaded( 371 bool DesktopBackgroundController::CustomWallpaperIsAlreadyLoaded(
372 const gfx::ImageSkia& image) const { 372 const gfx::ImageSkia& image) const {
373 return current_wallpaper_.get() && 373 return current_wallpaper_.get() &&
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
480 } 480 }
481 return moved; 481 return moved;
482 } 482 }
483 483
484 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) { 484 int DesktopBackgroundController::GetBackgroundContainerId(bool locked) {
485 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer : 485 return locked ? internal::kShellWindowId_LockScreenBackgroundContainer :
486 internal::kShellWindowId_DesktopBackgroundContainer; 486 internal::kShellWindowId_DesktopBackgroundContainer;
487 } 487 }
488 488
489 } // namespace ash 489 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | cc/test/fake_picture_layer_tiling_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698