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

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

Issue 899543003: Break out more manifest parsing logic from ShortcutHelper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebasing Created 5 years, 11 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
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager.cc ('k') | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/android/shortcut_helper.h
diff --git a/chrome/browser/android/shortcut_helper.h b/chrome/browser/android/shortcut_helper.h
index d0ef52e565d8c0e783010f993025e8511f9e6006..ca81d03a95e1585676e98f4aa0098d584a352385 100644
--- a/chrome/browser/android/shortcut_helper.h
+++ b/chrome/browser/android/shortcut_helper.h
@@ -8,13 +8,12 @@
#include "base/android/jni_android.h"
#include "base/android/jni_weak_ref.h"
#include "base/basictypes.h"
-#include "base/strings/string16.h"
#include "base/task/cancelable_task_tracker.h"
+#include "chrome/browser/android/shortcut_info.h"
#include "chrome/common/web_application_info.h"
#include "components/favicon_base/favicon_types.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/manifest.h"
-#include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h"
namespace content {
class WebContents;
@@ -85,20 +84,14 @@ class ShortcutHelper : public content::WebContentsObserver {
// Adds a shortcut to the launcher using a FaviconRawBitmapResult.
// Must be called from a WorkerPool task.
static void AddShortcutInBackgroundWithRawBitmap(
- const GURL& url,
- const base::string16& title,
- content::Manifest::DisplayMode display,
- const favicon_base::FaviconRawBitmapResult& bitmap_result,
- blink::WebScreenOrientationLockType orientation);
+ const ShortcutInfo& info,
+ const favicon_base::FaviconRawBitmapResult& bitmap_result);
// Adds a shortcut to the launcher using a SkBitmap.
// Must be called from a WorkerPool task.
static void AddShortcutInBackgroundWithSkBitmap(
- const GURL& url,
- const base::string16& title,
- content::Manifest::DisplayMode display,
- const SkBitmap& icon_bitmap,
- blink::WebScreenOrientationLockType orientation);
+ const ShortcutInfo& info,
+ const SkBitmap& icon_bitmap);
// Registers JNI hooks.
static bool RegisterShortcutHelper(JNIEnv* env);
@@ -116,12 +109,9 @@ class ShortcutHelper : public content::WebContentsObserver {
JavaObjectWeakGlobalRef java_ref_;
- GURL url_;
- base::string16 title_;
- content::Manifest::DisplayMode display_;
+ ShortcutInfo shortcut_info_;
SkBitmap manifest_icon_;
base::CancelableTaskTracker cancelable_task_tracker_;
- blink::WebScreenOrientationLockType orientation_;
bool add_shortcut_requested_;
« no previous file with comments | « chrome/browser/android/banners/app_banner_manager.cc ('k') | chrome/browser/android/shortcut_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698