| 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/shelf/shelf_window_watcher_item_delegate.h" | 5 #include "ash/shelf/shelf_window_watcher_item_delegate.h" |
| 6 | 6 |
| 7 #include "ash/shelf/shelf_item_context_menu.h" |
| 7 #include "ash/shelf/shelf_util.h" | 8 #include "ash/shelf/shelf_util.h" |
| 8 #include "ash/wm/window_state.h" | 9 #include "ash/wm/window_state.h" |
| 9 #include "ui/aura/window.h" | 10 #include "ui/aura/window.h" |
| 10 #include "ui/views/corewm/window_animations.h" | 11 #include "ui/views/corewm/window_animations.h" |
| 11 #include "ui/views/widget/widget.h" | 12 #include "ui/views/widget/widget.h" |
| 12 | 13 |
| 13 namespace ash { | 14 namespace ash { |
| 14 namespace internal { | 15 namespace internal { |
| 15 | 16 |
| 16 ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate( | 17 ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate( |
| (...skipping 23 matching lines...) Expand all Loading... |
| 40 | 41 |
| 41 return false; | 42 return false; |
| 42 } | 43 } |
| 43 | 44 |
| 44 base::string16 ShelfWindowWatcherItemDelegate::GetTitle() { | 45 base::string16 ShelfWindowWatcherItemDelegate::GetTitle() { |
| 45 return GetLauncherItemDetailsForWindow(window_)->title; | 46 return GetLauncherItemDetailsForWindow(window_)->title; |
| 46 } | 47 } |
| 47 | 48 |
| 48 ui::MenuModel* ShelfWindowWatcherItemDelegate::CreateContextMenu( | 49 ui::MenuModel* ShelfWindowWatcherItemDelegate::CreateContextMenu( |
| 49 aura::Window* root_window) { | 50 aura::Window* root_window) { |
| 50 // TODO(simonhong): Create ShelfItemContextMenu. | 51 return new ShelfItemContextMenu(this, root_window); |
| 51 return NULL; | |
| 52 } | 52 } |
| 53 | 53 |
| 54 ShelfMenuModel* ShelfWindowWatcherItemDelegate::CreateApplicationMenu( | 54 ShelfMenuModel* ShelfWindowWatcherItemDelegate::CreateApplicationMenu( |
| 55 int event_flags) { | 55 int event_flags) { |
| 56 return NULL; | 56 return NULL; |
| 57 } | 57 } |
| 58 | 58 |
| 59 bool ShelfWindowWatcherItemDelegate::IsDraggable() { | 59 bool ShelfWindowWatcherItemDelegate::IsDraggable() { |
| 60 return true; | 60 return true; |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool ShelfWindowWatcherItemDelegate::ShouldShowTooltip() { | 63 bool ShelfWindowWatcherItemDelegate::ShouldShowTooltip() { |
| 64 return true; | 64 return true; |
| 65 } | 65 } |
| 66 | 66 |
| 67 } // namespace internal | 67 } // namespace internal |
| 68 } // namespace ash | 68 } // namespace ash |
| OLD | NEW |