| OLD | NEW |
| 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 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 98 NOTIMPLEMENTED(); | 98 NOTIMPLEMENTED(); |
| 99 } | 99 } |
| 100 return kNoAction; | 100 return kNoAction; |
| 101 } | 101 } |
| 102 | 102 |
| 103 base::string16 GetTitle() override { | 103 base::string16 GetTitle() override { |
| 104 return window_id_to_title_.empty() ? title_ | 104 return window_id_to_title_.empty() ? title_ |
| 105 : window_id_to_title_.begin()->second; | 105 : window_id_to_title_.begin()->second; |
| 106 } | 106 } |
| 107 | 107 |
| 108 bool CanPin() const override { | |
| 109 NOTIMPLEMENTED(); | |
| 110 return true; | |
| 111 } | |
| 112 | |
| 113 ShelfMenuModel* CreateApplicationMenu(int event_flags) override { | 108 ShelfMenuModel* CreateApplicationMenu(int event_flags) override { |
| 114 return new ShelfMenuModelMus(this); | 109 return new ShelfMenuModelMus(this); |
| 115 } | 110 } |
| 116 | 111 |
| 117 void Close() override { NOTIMPLEMENTED(); } | 112 void Close() override { NOTIMPLEMENTED(); } |
| 118 | 113 |
| 119 mojom::ShelfItemDelegateAssociatedPtr delegate_; | 114 mojom::ShelfItemDelegateAssociatedPtr delegate_; |
| 120 bool pinned_ = false; | 115 bool pinned_ = false; |
| 121 std::map<uint32_t, base::string16> window_id_to_title_; | 116 std::map<uint32_t, base::string16> window_id_to_title_; |
| 122 base::string16 title_; | 117 base::string16 title_; |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 return; | 263 return; |
| 269 ShelfID shelf_id = app_id_to_shelf_id_[app_id]; | 264 ShelfID shelf_id = app_id_to_shelf_id_[app_id]; |
| 270 int index = model_.ItemIndexByID(shelf_id); | 265 int index = model_.ItemIndexByID(shelf_id); |
| 271 DCHECK_GE(index, 0); | 266 DCHECK_GE(index, 0); |
| 272 ShelfItem item = *model_.ItemByID(shelf_id); | 267 ShelfItem item = *model_.ItemByID(shelf_id); |
| 273 item.image = GetShelfIconFromBitmap(image); | 268 item.image = GetShelfIconFromBitmap(image); |
| 274 model_.Set(index, item); | 269 model_.Set(index, item); |
| 275 } | 270 } |
| 276 | 271 |
| 277 } // namespace ash | 272 } // namespace ash |
| OLD | NEW |