summaryrefslogtreecommitdiffstats
path: root/ash/shell.cc
diff options
context:
space:
mode:
authorbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-11 18:17:47 +0000
committerbshe@chromium.org <bshe@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-04-11 18:17:47 +0000
commit0cfc18eb157e254e046ad48b104f7d59f04a30a2 (patch)
tree64f7e20270bd0c26175792e20cb2f90c224a4cee /ash/shell.cc
parent60ca6f3e715460d584cdd4ef2929e449bb46ff74 (diff)
downloadchromium_src-0cfc18eb157e254e046ad48b104f7d59f04a30a2.zip
chromium_src-0cfc18eb157e254e046ad48b104f7d59f04a30a2.tar.gz
chromium_src-0cfc18eb157e254e046ad48b104f7d59f04a30a2.tar.bz2
Remove "set wallpaper..." option in system context menu when guest logged in
BUG=120763 TEST=Log in as guest user, click right mouse button on wallpaper, there should be no "set wallpaper..." options in the popup context menu. Review URL: https://chromiumcodereview.appspot.com/9960024 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell.cc')
-rw-r--r--ash/shell.cc10
1 files changed, 8 insertions, 2 deletions
diff --git a/ash/shell.cc b/ash/shell.cc
index 036c00f..0d30ef1 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"
@@ -255,6 +256,10 @@ class DummyUserWallpaperDelegate : public UserWallpaperDelegate {
virtual void OpenSetWallpaperPage() OVERRIDE {
}
+ virtual bool CanOpenSetWallpaperPage() OVERRIDE {
+ return false;
+ }
+
private:
DISALLOW_COPY_AND_ASSIGN(DummyUserWallpaperDelegate);
};
@@ -635,6 +640,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_);
@@ -794,8 +800,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() {