Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(214)

Side by Side Diff: ash/common/shelf/shelf_window_watcher_item_delegate.cc

Issue 2791803002: mash: Move LauncherItemController to ash, rename ShelfItemDelegate. (Closed)
Patch Set: Sync and rebase. Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « ash/common/shelf/shelf_window_watcher_item_delegate.h ('k') | ash/common/shelf/wm_shelf.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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/common/shelf/shelf_window_watcher_item_delegate.h" 5 #include "ash/common/shelf/shelf_window_watcher_item_delegate.h"
6 6
7 #include "ash/common/shelf/shelf_controller.h" 7 #include "ash/common/shelf/shelf_controller.h"
8 #include "ash/common/shelf/shelf_model.h" 8 #include "ash/common/shelf/shelf_model.h"
9 #include "ash/common/wm/window_state.h" 9 #include "ash/common/wm/window_state.h"
10 #include "ash/common/wm_window.h" 10 #include "ash/common/wm_window.h"
(...skipping 10 matching lines...) Expand all
21 ShelfItemType GetShelfItemType(ShelfID id) { 21 ShelfItemType GetShelfItemType(ShelfID id) {
22 ShelfModel* model = Shell::Get()->shelf_controller()->model(); 22 ShelfModel* model = Shell::Get()->shelf_controller()->model();
23 ShelfItems::const_iterator item = model->ItemByID(id); 23 ShelfItems::const_iterator item = model->ItemByID(id);
24 return item == model->items().end() ? TYPE_UNDEFINED : item->type; 24 return item == model->items().end() ? TYPE_UNDEFINED : item->type;
25 } 25 }
26 26
27 } // namespace 27 } // namespace
28 28
29 ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate(ShelfID id, 29 ShelfWindowWatcherItemDelegate::ShelfWindowWatcherItemDelegate(ShelfID id,
30 WmWindow* window) 30 WmWindow* window)
31 : id_(id), window_(window) { 31 : ShelfItemDelegate(AppLaunchId()), id_(id), window_(window) {
32 DCHECK_NE(kInvalidShelfID, id_); 32 DCHECK_NE(kInvalidShelfID, id_);
33 DCHECK(window_); 33 DCHECK(window_);
34 } 34 }
35 35
36 ShelfWindowWatcherItemDelegate::~ShelfWindowWatcherItemDelegate() {} 36 ShelfWindowWatcherItemDelegate::~ShelfWindowWatcherItemDelegate() {}
37 37
38 void ShelfWindowWatcherItemDelegate::ItemSelected( 38 void ShelfWindowWatcherItemDelegate::ItemSelected(
39 std::unique_ptr<ui::Event> event, 39 std::unique_ptr<ui::Event> event,
40 int64_t display_id, 40 int64_t display_id,
41 ShelfLaunchSource source, 41 ShelfLaunchSource source,
(...skipping 22 matching lines...) Expand all
64 } 64 }
65 65
66 void ShelfWindowWatcherItemDelegate::ExecuteCommand(uint32_t command_id, 66 void ShelfWindowWatcherItemDelegate::ExecuteCommand(uint32_t command_id,
67 int32_t event_flags) {} 67 int32_t event_flags) {}
68 68
69 void ShelfWindowWatcherItemDelegate::Close() { 69 void ShelfWindowWatcherItemDelegate::Close() {
70 window_->CloseWidget(); 70 window_->CloseWidget();
71 } 71 }
72 72
73 } // namespace ash 73 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/shelf_window_watcher_item_delegate.h ('k') | ash/common/shelf/wm_shelf.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698