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

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

Issue 2575613002: Remove ShelfItemDelegate::IsDraggable; check for app list button. (Closed)
Patch Set: Address comments. Created 4 years 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/shelf_menu_model.h" 8 #include "ash/common/shelf/shelf_menu_model.h"
9 #include "ash/common/shelf/wm_shelf.h" 9 #include "ash/common/shelf/wm_shelf.h"
10 #include "ash/common/wm_lookup.h" 10 #include "ash/common/wm_lookup.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 107
108 bool CanPin() const override { 108 bool CanPin() const override {
109 NOTIMPLEMENTED(); 109 NOTIMPLEMENTED();
110 return true; 110 return true;
111 } 111 }
112 112
113 ShelfMenuModel* CreateApplicationMenu(int event_flags) override { 113 ShelfMenuModel* CreateApplicationMenu(int event_flags) override {
114 return new ShelfMenuModelMus(this); 114 return new ShelfMenuModelMus(this);
115 } 115 }
116 116
117 bool IsDraggable() override {
118 NOTIMPLEMENTED();
119 return false;
120 }
121
122 void Close() override { NOTIMPLEMENTED(); } 117 void Close() override { NOTIMPLEMENTED(); }
123 118
124 mojom::ShelfItemDelegateAssociatedPtr delegate_; 119 mojom::ShelfItemDelegateAssociatedPtr delegate_;
125 bool pinned_ = false; 120 bool pinned_ = false;
126 std::map<uint32_t, base::string16> window_id_to_title_; 121 std::map<uint32_t, base::string16> window_id_to_title_;
127 base::string16 title_; 122 base::string16 title_;
128 123
129 DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegateMus); 124 DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegateMus);
130 }; 125 };
131 126
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
273 return; 268 return;
274 ShelfID shelf_id = app_id_to_shelf_id_[app_id]; 269 ShelfID shelf_id = app_id_to_shelf_id_[app_id];
275 int index = model_.ItemIndexByID(shelf_id); 270 int index = model_.ItemIndexByID(shelf_id);
276 DCHECK_GE(index, 0); 271 DCHECK_GE(index, 0);
277 ShelfItem item = *model_.ItemByID(shelf_id); 272 ShelfItem item = *model_.ItemByID(shelf_id);
278 item.image = GetShelfIconFromBitmap(image); 273 item.image = GetShelfIconFromBitmap(image);
279 model_.Set(index, item); 274 model_.Set(index, item);
280 } 275 }
281 276
282 } // namespace ash 277 } // namespace ash
OLDNEW
« no previous file with comments | « ash/common/shelf/app_list_shelf_item_delegate.cc ('k') | ash/common/shelf/shelf_item_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698