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

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

Issue 2558963002: Move shelf item tooltip flag from delegate to item. (Closed)
Patch Set: Remove WmWindowMus::SetBoolProperty override. 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 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 { 117 bool IsDraggable() override {
118 NOTIMPLEMENTED(); 118 NOTIMPLEMENTED();
119 return false; 119 return false;
120 } 120 }
121 121
122 bool ShouldShowTooltip() override { return true; }
123
124 void Close() override { NOTIMPLEMENTED(); } 122 void Close() override { NOTIMPLEMENTED(); }
125 123
126 mojom::ShelfItemDelegateAssociatedPtr delegate_; 124 mojom::ShelfItemDelegateAssociatedPtr delegate_;
127 bool pinned_ = false; 125 bool pinned_ = false;
128 std::map<uint32_t, base::string16> window_id_to_title_; 126 std::map<uint32_t, base::string16> window_id_to_title_;
129 base::string16 title_; 127 base::string16 title_;
130 128
131 DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegateMus); 129 DISALLOW_COPY_AND_ASSIGN(ShelfItemDelegateMus);
132 }; 130 };
133 131
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
275 return; 273 return;
276 ShelfID shelf_id = app_id_to_shelf_id_[app_id]; 274 ShelfID shelf_id = app_id_to_shelf_id_[app_id];
277 int index = model_.ItemIndexByID(shelf_id); 275 int index = model_.ItemIndexByID(shelf_id);
278 DCHECK_GE(index, 0); 276 DCHECK_GE(index, 0);
279 ShelfItem item = *model_.ItemByID(shelf_id); 277 ShelfItem item = *model_.ItemByID(shelf_id);
280 item.image = GetShelfIconFromBitmap(image); 278 item.image = GetShelfIconFromBitmap(image);
281 model_.Set(index, item); 279 model_.Set(index, item);
282 } 280 }
283 281
284 } // namespace ash 282 } // 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