diff options
author | simonhong@chromium.org <simonhong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 20:25:42 +0000 |
---|---|---|
committer | simonhong@chromium.org <simonhong@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-01-09 20:25:42 +0000 |
commit | e0cfc7fc54879d4842afa11e953095b3ed728535 (patch) | |
tree | 7f7bf5c8d2316a3a8dda0f6466018cce99d8b007 /ash/shell | |
parent | 531cf0b269ebacb2e19d865218a95ee4851d6f92 (diff) | |
download | chromium_src-e0cfc7fc54879d4842afa11e953095b3ed728535.zip chromium_src-e0cfc7fc54879d4842afa11e953095b3ed728535.tar.gz chromium_src-e0cfc7fc54879d4842afa11e953095b3ed728535.tar.bz2 |
[ash] Add TYPE_DIALOG and its item's LauncherContextMenu
This is third CL for adding an item for dialog.
This cl adds new LauncherItemType, TYPE_DIALOG, and
implements a context menu of item created by ShelfWindowWatcher.
R=sky@chromium.org
BUG=121242
TEST=NONE
Review URL: https://codereview.chromium.org/107163005
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@243965 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ash/shell')
-rw-r--r-- | ash/shell/shell_delegate_impl.cc | 5 | ||||
-rw-r--r-- | ash/shell/shell_delegate_impl.h | 4 | ||||
-rw-r--r-- | ash/shell/window_watcher_shelf_item_delegate.cc | 3 | ||||
-rw-r--r-- | ash/shell/window_watcher_shelf_item_delegate.h | 1 |
4 files changed, 11 insertions, 2 deletions
diff --git a/ash/shell/shell_delegate_impl.cc b/ash/shell/shell_delegate_impl.cc index ab41a4c..20e8fde 100644 --- a/ash/shell/shell_delegate_impl.cc +++ b/ash/shell/shell_delegate_impl.cc @@ -158,7 +158,10 @@ aura::client::UserActionClient* ShellDelegateImpl::CreateUserActionClient() { return NULL; } -ui::MenuModel* ShellDelegateImpl::CreateContextMenu(aura::Window* root) { +ui::MenuModel* ShellDelegateImpl::CreateContextMenu( + aura::Window* root, + ash::ShelfItemDelegate* item_delegate, + ash::LauncherItem* item) { return new ContextMenu(root); } diff --git a/ash/shell/shell_delegate_impl.h b/ash/shell/shell_delegate_impl.h index 7a1e98e..bea08e3 100644 --- a/ash/shell/shell_delegate_impl.h +++ b/ash/shell/shell_delegate_impl.h @@ -55,7 +55,9 @@ class ShellDelegateImpl : public ash::ShellDelegate { virtual ash::MediaDelegate* CreateMediaDelegate() OVERRIDE; virtual aura::client::UserActionClient* CreateUserActionClient() OVERRIDE; virtual ui::MenuModel* CreateContextMenu( - aura::Window* root_window) OVERRIDE; + aura::Window* root_window, + ash::ShelfItemDelegate* item_delegate, + ash::LauncherItem* item) OVERRIDE; virtual WindowTreeHostFactory* CreateWindowTreeHostFactory() OVERRIDE; virtual base::string16 GetProductName() const OVERRIDE; diff --git a/ash/shell/window_watcher_shelf_item_delegate.cc b/ash/shell/window_watcher_shelf_item_delegate.cc index fd8be8e..1c665d6 100644 --- a/ash/shell/window_watcher_shelf_item_delegate.cc +++ b/ash/shell/window_watcher_shelf_item_delegate.cc @@ -53,5 +53,8 @@ bool WindowWatcherShelfItemDelegate::ShouldShowTooltip() { return true; } +void WindowWatcherShelfItemDelegate::Close() { +} + } // namespace shell } // namespace ash diff --git a/ash/shell/window_watcher_shelf_item_delegate.h b/ash/shell/window_watcher_shelf_item_delegate.h index cf8f6a7..a77698c 100644 --- a/ash/shell/window_watcher_shelf_item_delegate.h +++ b/ash/shell/window_watcher_shelf_item_delegate.h @@ -28,6 +28,7 @@ class WindowWatcherShelfItemDelegate : public ShelfItemDelegate { virtual ShelfMenuModel* CreateApplicationMenu(int event_flags) OVERRIDE; virtual bool IsDraggable() OVERRIDE; virtual bool ShouldShowTooltip() OVERRIDE; + virtual void Close() OVERRIDE; private: LauncherID id_; |