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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java

Issue 579883002: Use Manifest's orientation when creating a shortcut and as default orientation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@use_display_in_shortcuthelper
Patch Set: review comments 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
« no previous file with comments | « no previous file | chrome/browser/DEPS » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
index 3f75a06e4520785f0ecb5df3798867de5ae3b500..28217788be5dbb6ccd081e65b58bd5c480f9cc42 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/ShortcutHelper.java
@@ -13,6 +13,7 @@ import android.util.Base64;
import android.util.Log;
import org.chromium.base.CalledByNative;
+import org.chromium.content_public.common.ScreenOrientationConstants;
import java.io.ByteArrayOutputStream;
import java.util.UUID;
@@ -26,6 +27,7 @@ public class ShortcutHelper {
public static final String EXTRA_MAC = "org.chromium.chrome.browser.webapp_mac";
public static final String EXTRA_TITLE = "org.chromium.chrome.browser.webapp_title";
public static final String EXTRA_URL = "org.chromium.chrome.browser.webapp_url";
+ public static final String EXTRA_ORIENTATION = ScreenOrientationConstants.EXTRA_ORIENTATION;
private static String sFullScreenAction;
@@ -121,7 +123,7 @@ public class ShortcutHelper {
@SuppressWarnings("unused")
@CalledByNative
private static void addShortcut(Context context, String url, String title, Bitmap favicon,
- int red, int green, int blue, boolean isWebappCapable) {
+ int red, int green, int blue, boolean isWebappCapable, int orientation) {
assert sFullScreenAction != null;
Intent shortcutIntent;
@@ -142,6 +144,7 @@ public class ShortcutHelper {
shortcutIntent.putExtra(EXTRA_ID, UUID.randomUUID().toString());
shortcutIntent.putExtra(EXTRA_TITLE, title);
shortcutIntent.putExtra(EXTRA_URL, url);
+ shortcutIntent.putExtra(EXTRA_ORIENTATION, orientation);
// The only reason we convert to a String here is because Android inexplicably eats a
// byte[] when adding the shortcut -- the Bundle received by the launched Activity even
« no previous file with comments | « no previous file | chrome/browser/DEPS » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698