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

Side by Side Diff: chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.cc

Issue 2577103002: arc: Rename methods in ArcSessionManager::Observer. (Closed)
Patch Set: OnArcShutdownBridge -> OnArcBridgeShutdown Created 4 years 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 | « chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h ('k') | no next file » | 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 "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 122 matching lines...) Expand 10 before | Expand all | Expand 10 after
133 int event_flags = it->second->event_flags(); 133 int event_flags = it->second->event_flags();
134 Close(app_id); 134 Close(app_id);
135 135
136 arc::LaunchApp(observed_profile_, app_id, event_flags); 136 arc::LaunchApp(observed_profile_, app_id, event_flags);
137 } 137 }
138 138
139 void ArcAppDeferredLauncherController::OnAppRemoved(const std::string& app_id) { 139 void ArcAppDeferredLauncherController::OnAppRemoved(const std::string& app_id) {
140 Close(app_id); 140 Close(app_id);
141 } 141 }
142 142
143 void ArcAppDeferredLauncherController::OnOptInEnabled(bool enabled) { 143 void ArcAppDeferredLauncherController::OnArcOptInChanged(bool enabled) {
144 if (enabled) 144 if (enabled)
145 return; 145 return;
146 146
147 // If Arc was disabled, remove all deferred launch requests. 147 // If Arc was disabled, remove all deferred launch requests.
148 while (!app_controller_map_.empty()) 148 while (!app_controller_map_.empty())
149 Close(app_controller_map_.begin()->first); 149 Close(app_controller_map_.begin()->first);
150 } 150 }
151 151
152 bool ArcAppDeferredLauncherController::HasApp(const std::string& app_id) const { 152 bool ArcAppDeferredLauncherController::HasApp(const std::string& app_id) const {
153 const std::string shelf_app_id = 153 const std::string shelf_app_id =
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } else { 209 } else {
210 owner_->SetItemController(shelf_id, controller); 210 owner_->SetItemController(shelf_id, controller);
211 owner_->SetItemStatus(shelf_id, ash::STATUS_RUNNING); 211 owner_->SetItemStatus(shelf_id, ash::STATUS_RUNNING);
212 } 212 }
213 213
214 if (app_controller_map_.empty()) 214 if (app_controller_map_.empty())
215 RegisterNextUpdate(); 215 RegisterNextUpdate();
216 216
217 app_controller_map_[shelf_app_id] = controller; 217 app_controller_map_[shelf_app_id] = controller;
218 } 218 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/launcher/arc_app_deferred_launcher_controller.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698