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/app_list/arc/arc_app_utils.h" | 5 #include "chrome/browser/ui/app_list/arc/arc_app_utils.h" |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/synchronization/waitable_event.h" | 9 #include "base/synchronization/waitable_event.h" |
10 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" | 10 #include "chrome/browser/ui/app_list/arc/arc_app_list_prefs.h" |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 result.set_x((work_area.width() - result.width()) / 2); | 102 result.set_x((work_area.width() - result.width()) / 2); |
103 result.set_y((work_area.height() - result.height()) / 2); | 103 result.set_y((work_area.height() - result.height()) / 2); |
104 return result; | 104 return result; |
105 } | 105 } |
106 | 106 |
107 DISALLOW_COPY_AND_ASSIGN(LaunchAppWithoutSize); | 107 DISALLOW_COPY_AND_ASSIGN(LaunchAppWithoutSize); |
108 }; | 108 }; |
109 | 109 |
110 } // namespace | 110 } // namespace |
111 | 111 |
| 112 const char kPlayStoreAppId[] = "gpkmicpkkebkmabiaedjognfppcchdfa"; |
| 113 |
112 bool LaunchAppWithRect(content::BrowserContext* context, | 114 bool LaunchAppWithRect(content::BrowserContext* context, |
113 const std::string& app_id, | 115 const std::string& app_id, |
114 const gfx::Rect& target_rect) { | 116 const gfx::Rect& target_rect) { |
115 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context); | 117 ArcAppListPrefs* prefs = ArcAppListPrefs::Get(context); |
116 CHECK(prefs); | 118 CHECK(prefs); |
117 | 119 |
118 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id); | 120 std::unique_ptr<ArcAppListPrefs::AppInfo> app_info = prefs->GetApp(app_id); |
119 if (!app_info) { | 121 if (!app_info) { |
120 VLOG(2) << "Cannot launch unavailable app: " << app_id << "."; | 122 VLOG(2) << "Cannot launch unavailable app: " << app_id << "."; |
121 return false; | 123 return false; |
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 | 223 |
222 if (bridge_service->app_version() < 2) { | 224 if (bridge_service->app_version() < 2) { |
223 LOG(ERROR) << "Request to uninstall package when version " | 225 LOG(ERROR) << "Request to uninstall package when version " |
224 << bridge_service->app_version() << " does not support it"; | 226 << bridge_service->app_version() << " does not support it"; |
225 return; | 227 return; |
226 } | 228 } |
227 app_instance->UninstallPackage(package_name); | 229 app_instance->UninstallPackage(package_name); |
228 } | 230 } |
229 | 231 |
230 } // namespace arc | 232 } // namespace arc |
OLD | NEW |