diff options
author | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-25 22:53:59 +0000 |
---|---|---|
committer | sky@chromium.org <sky@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-03-25 22:53:59 +0000 |
commit | c758fbfb081067de767084064c3e94067d922beb (patch) | |
tree | 6adbed42b929e6ce20dce0c4eb51f15e343e4dfa /ash/shell | |
parent | bbcde910463b8d226b6f077fc4f0009f5c147406 (diff) | |
download | chromium_src-c758fbfb081067de767084064c3e94067d922beb.zip chromium_src-c758fbfb081067de767084064c3e94067d922beb.tar.gz chromium_src-c758fbfb081067de767084064c3e94067d922beb.tar.bz2 |
Adds context menu so that shelf always auto-hides (except on lock
screen). This also cleans up code that was forcing shelf to be visible
when lock screen up, and it removes the 'snap to grid' menu item on
the background.
BUG=119804
TEST=none
R=ben@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9854001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@128839 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r-- | ash/shell/launcher_delegate_impl.cc | 4 | ||||
-rw-r--r-- | ash/shell/launcher_delegate_impl.h | 1 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.cc | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/ash/shell/launcher_delegate_impl.cc b/ash/shell/launcher_delegate_impl.cc index 91ec431..6a9f0d9 100644 --- a/ash/shell/launcher_delegate_impl.cc +++ b/ash/shell/launcher_delegate_impl.cc @@ -46,6 +46,10 @@ ui::MenuModel* LauncherDelegateImpl::CreateContextMenu( return NULL; } +ui::MenuModel* LauncherDelegateImpl::CreateContextMenuForLauncher() { + return NULL; +} + ash::LauncherID LauncherDelegateImpl::GetIDByWindow(aura::Window* window) { return watcher_->GetIDByWindow(window); } diff --git a/ash/shell/launcher_delegate_impl.h b/ash/shell/launcher_delegate_impl.h index 016164f..0bd2f9e 100644 --- a/ash/shell/launcher_delegate_impl.h +++ b/ash/shell/launcher_delegate_impl.h @@ -32,6 +32,7 @@ class LauncherDelegateImpl : public ash::LauncherDelegate { virtual string16 GetTitle(const ash::LauncherItem& item) OVERRIDE; virtual ui::MenuModel* CreateContextMenu( const ash::LauncherItem& item) OVERRIDE; + virtual ui::MenuModel* CreateContextMenuForLauncher() OVERRIDE; virtual ash::LauncherID GetIDByWindow(aura::Window* window) OVERRIDE; private: diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index 21a21af..4ceca7b 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -41,10 +41,12 @@ bool ShellDelegateImpl::IsUserLoggedIn() { void ShellDelegateImpl::LockScreen() { ash::shell::CreateLockScreen(); locked_ = true; + ash::Shell::GetInstance()->UpdateShelfVisibility(); } void ShellDelegateImpl::UnlockScreen() { locked_ = false; + ash::Shell::GetInstance()->UpdateShelfVisibility(); } bool ShellDelegateImpl::IsScreenLocked() const { |