Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "ash/shell/window_watcher_shelf_item_delegate.h" | 5 #include "ash/shell/window_watcher_shelf_item_delegate.h" |
| 6 | 6 |
| 7 #include "ash/shell/window_watcher.h" | 7 #include "ash/shell/window_watcher.h" |
| 8 #include "ash/wm/window_util.h" | 8 #include "ash/wm/window_util.h" |
| 9 #include "ui/aura/window.h" | 9 #include "ui/aura/window.h" |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 24 ShelfItemDelegate::PerformedAction WindowWatcherShelfItemDelegate::ItemSelected( | 24 ShelfItemDelegate::PerformedAction WindowWatcherShelfItemDelegate::ItemSelected( |
| 25 const ui::Event& event) { | 25 const ui::Event& event) { |
| 26 aura::Window* window = watcher_->GetWindowByID(id_); | 26 aura::Window* window = watcher_->GetWindowByID(id_); |
| 27 if (window->type() == ui::wm::WINDOW_TYPE_PANEL) | 27 if (window->type() == ui::wm::WINDOW_TYPE_PANEL) |
| 28 wm::MoveWindowToEventRoot(window, event); | 28 wm::MoveWindowToEventRoot(window, event); |
| 29 window->Show(); | 29 window->Show(); |
| 30 wm::ActivateWindow(window); | 30 wm::ActivateWindow(window); |
| 31 return kExistingWindowActivated; | 31 return kExistingWindowActivated; |
| 32 } | 32 } |
| 33 | 33 |
| 34 ui::SimpleMenuModel* WindowWatcherShelfItemDelegate::CreateApplicationMenu( | 34 ShelfApplicationMenuItems WindowWatcherShelfItemDelegate::GetAppMenuItems( |
| 35 int event_flags) { | 35 int event_flags) { |
| 36 return nullptr; | 36 return ShelfApplicationMenuItems(); |
|
James Cook
2017/02/06 17:30:21
Given that the type of ShelfApplicationMenuItems i
msw
2017/02/07 09:12:01
I added comments, renamed to ShelfAppMenuItemList,
| |
| 37 } | 37 } |
| 38 | 38 |
| 39 void WindowWatcherShelfItemDelegate::Close() {} | 39 void WindowWatcherShelfItemDelegate::Close() {} |
| 40 | 40 |
| 41 } // namespace shell | 41 } // namespace shell |
| 42 } // namespace ash | 42 } // namespace ash |
| OLD | NEW |