OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #include "ash/mus/shelf_delegate_mus.h" | |
6 | |
7 #include "ash/shelf/shelf_controller.h" | |
8 #include "ash/shell.h" | |
9 #include "base/strings/string_util.h" | |
10 | |
11 namespace ash { | |
12 | |
13 ShelfDelegateMus::ShelfDelegateMus() {} | |
14 | |
15 ShelfDelegateMus::~ShelfDelegateMus() {} | |
16 | |
17 /////////////////////////////////////////////////////////////////////////////// | |
18 // ShelfDelegate: | |
19 | |
20 ShelfID ShelfDelegateMus::GetShelfIDForAppID(const std::string& app_id) { | |
21 if (Shell::Get()->shelf_controller()->app_id_to_shelf_id().count(app_id)) | |
22 return Shell::Get()->shelf_controller()->app_id_to_shelf_id().at(app_id); | |
23 return 0; | |
24 } | |
25 | |
26 ShelfID ShelfDelegateMus::GetShelfIDForAppIDAndLaunchID( | |
27 const std::string& app_id, | |
28 const std::string& launch_id) { | |
29 return ShelfDelegateMus::GetShelfIDForAppID(app_id); | |
30 } | |
31 | |
32 const std::string& ShelfDelegateMus::GetAppIDForShelfID(ShelfID id) { | |
33 if (Shell::Get()->shelf_controller()->shelf_id_to_app_id().count(id)) | |
34 return Shell::Get()->shelf_controller()->shelf_id_to_app_id().at(id); | |
35 return base::EmptyString(); | |
36 } | |
37 | |
38 void ShelfDelegateMus::PinAppWithID(const std::string& app_id) { | |
39 NOTIMPLEMENTED(); | |
40 } | |
41 | |
42 bool ShelfDelegateMus::IsAppPinned(const std::string& app_id) { | |
43 NOTIMPLEMENTED(); | |
44 return false; | |
45 } | |
46 | |
47 void ShelfDelegateMus::UnpinAppWithID(const std::string& app_id) { | |
48 NOTIMPLEMENTED(); | |
49 } | |
50 | |
51 } // namespace ash | |
OLD | NEW |