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 "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h" | 5 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h" |
6 | 6 |
7 #include "chrome/browser/chromeos/arc/arc_support_host.h" | 7 #include "chrome/browser/chromeos/arc/arc_support_host.h" |
8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
9 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" | 9 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
10 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controll
er.h" | 10 #include "chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_item_controll
er.h" |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 return; | 124 return; |
125 | 125 |
126 const std::string shelf_app_id = | 126 const std::string shelf_app_id = |
127 ArcAppWindowLauncherController::GetShelfAppIdFromArcAppId(app_id); | 127 ArcAppWindowLauncherController::GetShelfAppIdFromArcAppId(app_id); |
128 AppControllerMap::const_iterator it = app_controller_map_.find(shelf_app_id); | 128 AppControllerMap::const_iterator it = app_controller_map_.find(shelf_app_id); |
129 if (it == app_controller_map_.end()) | 129 if (it == app_controller_map_.end()) |
130 return; | 130 return; |
131 | 131 |
132 Close(app_id); | 132 Close(app_id); |
133 | 133 |
134 arc::LaunchApp(owner_->GetProfile(), app_id); | 134 arc::LaunchApp(observed_profile_, app_id); |
135 } | 135 } |
136 | 136 |
137 void ArcAppDeferredLauncherController::OnAppRemoved(const std::string& app_id) { | 137 void ArcAppDeferredLauncherController::OnAppRemoved(const std::string& app_id) { |
138 Close(app_id); | 138 Close(app_id); |
139 } | 139 } |
140 | 140 |
141 void ArcAppDeferredLauncherController::OnOptInEnabled(bool enabled) { | 141 void ArcAppDeferredLauncherController::OnOptInEnabled(bool enabled) { |
142 if (enabled) | 142 if (enabled) |
143 return; | 143 return; |
144 | 144 |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
208 } else { | 208 } else { |
209 owner_->SetItemController(shelf_id, controller); | 209 owner_->SetItemController(shelf_id, controller); |
210 owner_->SetItemStatus(shelf_id, ash::STATUS_RUNNING); | 210 owner_->SetItemStatus(shelf_id, ash::STATUS_RUNNING); |
211 } | 211 } |
212 | 212 |
213 if (app_controller_map_.empty()) | 213 if (app_controller_map_.empty()) |
214 RegisterNextUpdate(); | 214 RegisterNextUpdate(); |
215 | 215 |
216 app_controller_map_[shelf_app_id] = controller; | 216 app_controller_map_[shelf_app_id] = controller; |
217 } | 217 } |
OLD | NEW |