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

Side by Side Diff: ash/mus/shelf_delegate_mus.cc

Issue 2791463002: mash: Remove ShelfDelegate; move functions to ShelfModel. (Closed)
Patch Set: Address comment. Created 3 years, 8 months 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
« no previous file with comments | « ash/mus/shelf_delegate_mus.h ('k') | ash/mus/shell_delegate_mus.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(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
OLDNEW
« no previous file with comments | « ash/mus/shelf_delegate_mus.h ('k') | ash/mus/shell_delegate_mus.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698