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

Unified Diff: ash/shell.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: IsLoggedInAsGuest => CanOpenSetWallpaperPage 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.h ('k') | ash/shell_context_menu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shell.cc
diff --git a/ash/shell.cc b/ash/shell.cc
index d246e6ce53d8ae98c3415b3037651b4bd1184d38..54b1b3331f006681cc7846a9e2c64135ba9045f8 100644
--- a/ash/shell.cc
+++ b/ash/shell.cc
@@ -18,6 +18,7 @@
#include "ash/monitor/monitor_controller.h"
#include "ash/monitor/multi_monitor_manager.h"
#include "ash/screen_ash.h"
+#include "ash/shell_context_menu.h"
#include "ash/shell_delegate.h"
#include "ash/shell_factory.h"
#include "ash/shell_window_ids.h"
@@ -253,6 +254,10 @@ class DummyUserWallpaperDelegate : public UserWallpaperDelegate {
virtual void OpenSetWallpaperPage() OVERRIDE {
}
+ virtual bool CanOpenSetWallpaperPage() OVERRIDE {
+ return false;
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(DummyUserWallpaperDelegate);
};
@@ -632,6 +637,7 @@ void Shell::Init() {
nested_dispatcher_controller_.reset(new NestedDispatcherController);
accelerator_controller_.reset(new AcceleratorController);
#endif
+ shell_context_menu_.reset(new internal::ShellContextMenu);
// Pass ownership of the filter to the root window.
GetRootWindow()->SetEventFilter(root_filter_);
@@ -803,8 +809,8 @@ size_t Shell::GetRootWindowEventFilterCount() const {
void Shell::ShowBackgroundMenu(views::Widget* widget,
const gfx::Point& location) {
- if (workspace_controller_.get())
- workspace_controller_->ShowMenu(widget, location);
+ if (shell_context_menu_.get())
+ shell_context_menu_->ShowMenu(widget, location);
}
void Shell::ToggleAppList() {
« no previous file with comments | « ash/shell.h ('k') | ash/shell_context_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698