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

Unified Diff: chrome/browser/android/shortcut_helper.h

Issue 568823003: Merge Android RetrieveWebappInformation and Extensions GetApplicationInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@manifest_manager_content
Patch Set: Created 6 years, 3 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/android/shortcut_helper.h
diff --git a/chrome/browser/android/shortcut_helper.h b/chrome/browser/android/shortcut_helper.h
index 4443583cdd688e23f59f67c868afe67a2dae5bab..04ef1bad004e0b3d030e89c002be712968d6205a 100644
--- a/chrome/browser/android/shortcut_helper.h
+++ b/chrome/browser/android/shortcut_helper.h
@@ -10,6 +10,7 @@
#include "base/basictypes.h"
#include "base/strings/string16.h"
#include "base/task/cancelable_task_tracker.h"
+#include "chrome/common/web_application_info.h"
#include "components/favicon_base/favicon_types.h"
#include "content/public/browser/web_contents_observer.h"
@@ -30,12 +31,6 @@ class GURL;
// the ownership of the object. The instance will then destroy itself when done.
class ShortcutHelper : public content::WebContentsObserver {
public:
- enum ShortcutType {
- APP_SHORTCUT,
- APP_SHORTCUT_APPLE,
- BOOKMARK
- };
-
ShortcutHelper(JNIEnv* env,
jobject obj,
content::WebContents* web_contents);
@@ -50,10 +45,7 @@ class ShortcutHelper : public content::WebContentsObserver {
void TearDown(JNIEnv* env, jobject obj);
// IPC message received when the initialization is finished.
- void OnDidRetrieveWebappInformation(bool success,
- bool is_mobile_webapp_capable,
- bool is_apple_mobile_webapp_capable,
- const GURL& expected_url);
+ void OnDidGetWebApplicationInfo(const WebApplicationInfo& web_app_info);
// Adds a shortcut to the current URL to the Android home screen.
void AddShortcut(JNIEnv* env,
@@ -72,7 +64,7 @@ class ShortcutHelper : public content::WebContentsObserver {
static void AddShortcutInBackground(
const GURL& url,
const base::string16& title,
- ShortcutType shortcut_type,
+ WebApplicationInfo::MobileCapable mobile_capable,
const favicon_base::FaviconRawBitmapResult& bitmap_result);
// Registers JNI hooks.
@@ -88,7 +80,7 @@ class ShortcutHelper : public content::WebContentsObserver {
GURL url_;
base::string16 title_;
int launcher_large_icon_size_;
- ShortcutType shortcut_type_;
+ WebApplicationInfo::MobileCapable web_app_capable_;
favicon_base::FaviconRawBitmapResult icon_;
base::CancelableTaskTracker cancelable_task_tracker_;

Powered by Google App Engine
This is Rietveld 408576698