| 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/mus/shelf_delegate_mus.h" | 5 #include "ash/mus/shelf_delegate_mus.h" |
| 6 | 6 |
| 7 #include "ash/common/shelf/shelf_controller.h" | 7 #include "ash/common/shelf/shelf_controller.h" |
| 8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 | 10 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 return Shell::Get()->shelf_controller()->app_id_to_shelf_id().at(app_id); | 22 return Shell::Get()->shelf_controller()->app_id_to_shelf_id().at(app_id); |
| 23 return 0; | 23 return 0; |
| 24 } | 24 } |
| 25 | 25 |
| 26 ShelfID ShelfDelegateMus::GetShelfIDForAppIDAndLaunchID( | 26 ShelfID ShelfDelegateMus::GetShelfIDForAppIDAndLaunchID( |
| 27 const std::string& app_id, | 27 const std::string& app_id, |
| 28 const std::string& launch_id) { | 28 const std::string& launch_id) { |
| 29 return ShelfDelegateMus::GetShelfIDForAppID(app_id); | 29 return ShelfDelegateMus::GetShelfIDForAppID(app_id); |
| 30 } | 30 } |
| 31 | 31 |
| 32 bool ShelfDelegateMus::HasShelfIDToAppIDMapping(ShelfID id) const { | |
| 33 return Shell::Get()->shelf_controller()->shelf_id_to_app_id().count(id) > 0; | |
| 34 } | |
| 35 | |
| 36 const std::string& ShelfDelegateMus::GetAppIDForShelfID(ShelfID id) { | 32 const std::string& ShelfDelegateMus::GetAppIDForShelfID(ShelfID id) { |
| 37 if (Shell::Get()->shelf_controller()->shelf_id_to_app_id().count(id)) | 33 if (Shell::Get()->shelf_controller()->shelf_id_to_app_id().count(id)) |
| 38 return Shell::Get()->shelf_controller()->shelf_id_to_app_id().at(id); | 34 return Shell::Get()->shelf_controller()->shelf_id_to_app_id().at(id); |
| 39 return base::EmptyString(); | 35 return base::EmptyString(); |
| 40 } | 36 } |
| 41 | 37 |
| 42 void ShelfDelegateMus::PinAppWithID(const std::string& app_id) { | 38 void ShelfDelegateMus::PinAppWithID(const std::string& app_id) { |
| 43 NOTIMPLEMENTED(); | 39 NOTIMPLEMENTED(); |
| 44 } | 40 } |
| 45 | 41 |
| 46 bool ShelfDelegateMus::IsAppPinned(const std::string& app_id) { | 42 bool ShelfDelegateMus::IsAppPinned(const std::string& app_id) { |
| 47 NOTIMPLEMENTED(); | 43 NOTIMPLEMENTED(); |
| 48 return false; | 44 return false; |
| 49 } | 45 } |
| 50 | 46 |
| 51 void ShelfDelegateMus::UnpinAppWithID(const std::string& app_id) { | 47 void ShelfDelegateMus::UnpinAppWithID(const std::string& app_id) { |
| 52 NOTIMPLEMENTED(); | 48 NOTIMPLEMENTED(); |
| 53 } | 49 } |
| 54 | 50 |
| 55 } // namespace ash | 51 } // namespace ash |
| OLD | NEW |