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

Side by Side Diff: chrome/browser/chromeos/background/desktop_background_observer.cc

Issue 9960024: Remove "set wallpaper..." option in system context menu when guest logged in (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add shell context menu Created 8 years, 8 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
« ash/shell_context_menu.h ('K') | « ash/wm/workspace_controller.cc ('k') | no next file » | 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 "chrome/browser/chromeos/background/desktop_background_observer.h" 5 #include "chrome/browser/chromeos/background/desktop_background_observer.h"
6 6
7 #include "ash/shell.h" 7 #include "ash/shell.h"
8 #include "ash/desktop_background/desktop_background_controller.h" 8 #include "ash/desktop_background/desktop_background_controller.h"
9 #include "ash/desktop_background/desktop_background_resources.h" 9 #include "ash/desktop_background/desktop_background_resources.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 19 matching lines...) Expand all
30 virtual const int GetUserWallpaperIndex() OVERRIDE { 30 virtual const int GetUserWallpaperIndex() OVERRIDE {
31 return chromeos::UserManager::Get()->GetUserWallpaperIndex(); 31 return chromeos::UserManager::Get()->GetUserWallpaperIndex();
32 } 32 }
33 33
34 virtual void OpenSetWallpaperPage() OVERRIDE { 34 virtual void OpenSetWallpaperPage() OVERRIDE {
35 Browser* browser = Browser::GetOrCreateTabbedBrowser( 35 Browser* browser = Browser::GetOrCreateTabbedBrowser(
36 ProfileManager::GetDefaultProfileOrOffTheRecord()); 36 ProfileManager::GetDefaultProfileOrOffTheRecord());
37 browser->ShowOptionsTab("setWallpaper"); 37 browser->ShowOptionsTab("setWallpaper");
38 } 38 }
39 39
40 virtual bool IsLoggedInAsGuest() OVERRIDE {
41 return chromeos::UserManager::Get()->IsLoggedInAsGuest();
42 }
43
40 private: 44 private:
41 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate); 45 DISALLOW_COPY_AND_ASSIGN(UserWallpaperDelegate);
42 }; 46 };
43 47
44 } // namespace 48 } // namespace
45 49
46 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() { 50 ash::UserWallpaperDelegate* CreateUserWallpaperDelegate() {
47 return new chromeos::UserWallpaperDelegate(); 51 return new chromeos::UserWallpaperDelegate();
48 } 52 }
49 53
(...skipping 15 matching lines...) Expand all
65 ash::Shell::GetInstance()->desktop_background_controller()-> 69 ash::Shell::GetInstance()->desktop_background_controller()->
66 OnDesktopBackgroundChanged(); 70 OnDesktopBackgroundChanged();
67 break; 71 break;
68 } 72 }
69 default: 73 default:
70 NOTREACHED(); 74 NOTREACHED();
71 } 75 }
72 } 76 }
73 77
74 } // namespace chromeos 78 } // namespace chromeos
OLDNEW
« ash/shell_context_menu.h ('K') | « ash/wm/workspace_controller.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698