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

Unified Diff: chrome/browser/ui/app_list/arc/arc_app_item.cc

Issue 1523643002: arc-bridge: Move most methods to Mojo interfaces (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@master
Patch Set: Rebased to ToT Created 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/arc/arc_app_item.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_item.cc b/chrome/browser/ui/app_list/arc/arc_app_item.cc
index 66da1900247399e63b9654eeaf6c3c8032811f75..1fa0b9ed862015f7f2b925529ec34e3513d73dd3 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_item.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_item.cc
@@ -59,14 +59,19 @@ void ArcAppItem::Activate(int event_flags) {
}
arc::ArcBridgeService* bridge_service = arc::ArcBridgeService::Get();
- if (!bridge_service ||
- bridge_service->state() != arc::ArcBridgeService::State::READY) {
- VLOG(2) << "Cannot launch app: " << app_info->package
- << ". Bridge service is not ready.";
+ if (!bridge_service) {
+ VLOG(2) << "Request to launch app when bridge service is not ready: "
+ << id() << ".";
+ return;
+ }
+ arc::AppInstance* app_instance = bridge_service->app_instance();
+ if (!app_instance) {
+ VLOG(2) << "Request to launch app when bridge service is not ready: "
+ << id() << ".";
return;
}
- bridge_service->LaunchApp(app_info->package, app_info->activity);
+ app_instance->LaunchApp(app_info->package, app_info->activity);
}
void ArcAppItem::SetReady(bool ready) {

Powered by Google App Engine
This is Rietveld 408576698