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

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

Issue 2761373002: Move yet more from WmShell to Shell (Closed)
Patch Set: merge Created 3 years, 9 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/metrics/user_metrics_recorder_unittest.cc ('k') | ash/mus/system_tray_delegate_mus.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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/common/wm_shell.h" 8 #include "ash/shell.h"
9 #include "base/strings/string_util.h" 9 #include "base/strings/string_util.h"
10 10
11 namespace ash { 11 namespace ash {
12 12
13 ShelfDelegateMus::ShelfDelegateMus() {} 13 ShelfDelegateMus::ShelfDelegateMus() {}
14 14
15 ShelfDelegateMus::~ShelfDelegateMus() {} 15 ShelfDelegateMus::~ShelfDelegateMus() {}
16 16
17 /////////////////////////////////////////////////////////////////////////////// 17 ///////////////////////////////////////////////////////////////////////////////
18 // ShelfDelegate: 18 // ShelfDelegate:
19 19
20 ShelfID ShelfDelegateMus::GetShelfIDForAppID(const std::string& app_id) { 20 ShelfID ShelfDelegateMus::GetShelfIDForAppID(const std::string& app_id) {
21 if (WmShell::Get()->shelf_controller()->app_id_to_shelf_id().count(app_id)) 21 if (Shell::Get()->shelf_controller()->app_id_to_shelf_id().count(app_id))
22 return WmShell::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 { 32 bool ShelfDelegateMus::HasShelfIDToAppIDMapping(ShelfID id) const {
33 return WmShell::Get()->shelf_controller()->shelf_id_to_app_id().count(id) > 0; 33 return Shell::Get()->shelf_controller()->shelf_id_to_app_id().count(id) > 0;
34 } 34 }
35 35
36 const std::string& ShelfDelegateMus::GetAppIDForShelfID(ShelfID id) { 36 const std::string& ShelfDelegateMus::GetAppIDForShelfID(ShelfID id) {
37 if (WmShell::Get()->shelf_controller()->shelf_id_to_app_id().count(id)) 37 if (Shell::Get()->shelf_controller()->shelf_id_to_app_id().count(id))
38 return WmShell::Get()->shelf_controller()->shelf_id_to_app_id().at(id); 38 return Shell::Get()->shelf_controller()->shelf_id_to_app_id().at(id);
39 return base::EmptyString(); 39 return base::EmptyString();
40 } 40 }
41 41
42 void ShelfDelegateMus::PinAppWithID(const std::string& app_id) { 42 void ShelfDelegateMus::PinAppWithID(const std::string& app_id) {
43 NOTIMPLEMENTED(); 43 NOTIMPLEMENTED();
44 } 44 }
45 45
46 bool ShelfDelegateMus::IsAppPinned(const std::string& app_id) { 46 bool ShelfDelegateMus::IsAppPinned(const std::string& app_id) {
47 NOTIMPLEMENTED(); 47 NOTIMPLEMENTED();
48 return false; 48 return false;
49 } 49 }
50 50
51 void ShelfDelegateMus::UnpinAppWithID(const std::string& app_id) { 51 void ShelfDelegateMus::UnpinAppWithID(const std::string& app_id) {
52 NOTIMPLEMENTED(); 52 NOTIMPLEMENTED();
53 } 53 }
54 54
55 } // namespace ash 55 } // namespace ash
OLDNEW
« no previous file with comments | « ash/metrics/user_metrics_recorder_unittest.cc ('k') | ash/mus/system_tray_delegate_mus.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698