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

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

Issue 2716403005: mash: Remove shelf app menu item objects. (Closed)
Patch Set: Fix ash_shell compile Created 3 years, 9 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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_controller.h" 5 #include "ash/common/shelf/shelf_controller.h"
6 6
7 #include "ash/common/shelf/shelf_item_delegate.h" 7 #include "ash/common/shelf/shelf_item_delegate.h"
8 #include "ash/common/shelf/wm_shelf.h" 8 #include "ash/common/shelf/wm_shelf.h"
9 #include "ash/common/wm_lookup.h" 9 #include "ash/common/wm_lookup.h"
10 #include "ash/common/wm_shell.h" 10 #include "ash/common/wm_shell.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 // SHELF_ACTION_WINDOW_ACTIVATED. 67 // SHELF_ACTION_WINDOW_ACTIVATED.
68 NOTIMPLEMENTED(); 68 NOTIMPLEMENTED();
69 } 69 }
70 return SHELF_ACTION_NONE; 70 return SHELF_ACTION_NONE;
71 } 71 }
72 72
73 ShelfAppMenuItemList GetAppMenuItems(int event_flags) override { 73 ShelfAppMenuItemList GetAppMenuItems(int event_flags) override {
74 ShelfAppMenuItemList items; 74 ShelfAppMenuItemList items;
75 for (const auto& window : window_id_to_title_) { 75 for (const auto& window : window_id_to_title_) {
76 items.push_back( 76 items.push_back(
77 base::MakeUnique<ShelfApplicationMenuItem>(window.second)); 77 base::MakeUnique<ShelfApplicationMenuItem>(0, window.second));
James Cook 2017/03/01 19:50:48 Does 0 mean invalid command, or first command, or
msw 2017/03/02 02:59:20 I removed this code and left the standard no-menu
78 } 78 }
79 return items; 79 return items;
80 } 80 }
81 81
82 void ExecuteCommand(uint32_t command_id, int32_t event_flags) override {
83 NOTIMPLEMENTED();
84 }
85
82 void Close() override { NOTIMPLEMENTED(); } 86 void Close() override { NOTIMPLEMENTED(); }
83 87
84 mojom::ShelfItemDelegateAssociatedPtr delegate_; 88 mojom::ShelfItemDelegateAssociatedPtr delegate_;
85 bool pinned_ = false; 89 bool pinned_ = false;
86 std::map<uint32_t, base::string16> window_id_to_title_; 90 std::map<uint32_t, base::string16> window_id_to_title_;
87 base::string16 title_; 91 base::string16 title_;
88 92
89 DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegateMus); 93 DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegateMus);
90 }; 94 };
91 95
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
234 return; 238 return;
235 ShelfID shelf_id = app_id_to_shelf_id_[app_id]; 239 ShelfID shelf_id = app_id_to_shelf_id_[app_id];
236 int index = model_.ItemIndexByID(shelf_id); 240 int index = model_.ItemIndexByID(shelf_id);
237 DCHECK_GE(index, 0); 241 DCHECK_GE(index, 0);
238 ShelfItem item = *model_.ItemByID(shelf_id); 242 ShelfItem item = *model_.ItemByID(shelf_id);
239 item.image = GetShelfIconFromBitmap(image); 243 item.image = GetShelfIconFromBitmap(image);
240 model_.Set(index, item); 244 model_.Set(index, item);
241 } 245 }
242 246
243 } // namespace ash 247 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698