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

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

Issue 2074543003: ARC: Add a link to "Manage supported links" in the Chrome app info dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + GN changes. Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/app_list/arc/arc_app_utils.cc
diff --git a/chrome/browser/ui/app_list/arc/arc_app_utils.cc b/chrome/browser/ui/app_list/arc/arc_app_utils.cc
index bd91ee82b91f576ed102c68b9b4352ecea0fbca0..7b59ae146f669a60fdf9321eea8c060c3f908360 100644
--- a/chrome/browser/ui/app_list/arc/arc_app_utils.cc
+++ b/chrome/browser/ui/app_list/arc/arc_app_utils.cc
@@ -28,9 +28,10 @@ constexpr int kNexus5Width = 410;
constexpr int kNexus5Height = 690;
// Minimum required versions.
-constexpr int kMinVersion = 0;
constexpr int kCanHandleResolutionMinVersion = 1;
+constexpr int kMinVersion = 0;
constexpr int kShowPackageInfoMinVersion = 5;
+constexpr int kShowPackageInfoOnPageMinVersion = 11;
constexpr int kUninstallPackageMinVersion = 2;
constexpr int kRemoveIconMinVersion = 9;
Peter Kasting 2016/06/23 07:07:19 Nit: I normally suggest that constants used in onl
mtomasz 2016/06/23 08:51:56 Sorted by number. Done.
@@ -274,6 +275,7 @@ void RemoveCachedIcon(const std::string& icon_resource_id) {
app_instance->RemoveCachedIcon(icon_resource_id);
}
+// Deprecated.
bool ShowPackageInfo(const std::string& package_name) {
VLOG(2) << "Showing package info for " << package_name;
@@ -282,9 +284,24 @@ bool ShowPackageInfo(const std::string& package_name) {
if (!app_instance)
return false;
- app_instance->ShowPackageInfo(
+ app_instance->ShowPackageInfoDeprecated(
package_name, GetTargetRect(gfx::Size(kNexus7Width, kNexus7Height)));
return true;
}
+bool ShowPackageInfoOnPage(const std::string& package_name,
+ mojom::ShowPackageInfoPage page) {
+ VLOG(2) << "Showing package info for " << package_name;
Peter Kasting 2016/06/23 07:07:19 I realize this is consistent with the rest of this
mtomasz 2016/06/23 08:51:56 I don't know any context here. It's purely for con
+
+ arc::mojom::AppInstance* app_instance =
+ GetAppInstance(kShowPackageInfoOnPageMinVersion, kShowPackageInfoStr);
+ if (!app_instance)
+ return false;
+
+ app_instance->ShowPackageInfoOnPage(
+ package_name, page,
+ GetTargetRect(gfx::Size(kNexus7Width, kNexus7Height)));
+ return true;
+}
+
} // namespace arc

Powered by Google App Engine
This is Rietveld 408576698