OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 package org.chromium.chrome.browser.browseractions; | 5 package org.chromium.chrome.browser.browseractions; |
6 | 6 |
7 import android.app.PendingIntent; | 7 import android.app.PendingIntent; |
8 import android.content.Intent; | 8 import android.content.Intent; |
9 import android.graphics.Bitmap; | 9 import android.graphics.Bitmap; |
10 import android.net.Uri; | 10 import android.net.Uri; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
94 } | 94 } |
95 | 95 |
96 /** | 96 /** |
97 * Creates a {@link ContextMenuParams} with given Uri and type. | 97 * Creates a {@link ContextMenuParams} with given Uri and type. |
98 * @return The ContextMenuParams used to construct context menu. | 98 * @return The ContextMenuParams used to construct context menu. |
99 */ | 99 */ |
100 private ContextMenuParams createContextMenuParams() { | 100 private ContextMenuParams createContextMenuParams() { |
101 Referrer referrer = IntentHandler.constructValidReferrerForAuthority(mCr
eatorPackageName); | 101 Referrer referrer = IntentHandler.constructValidReferrerForAuthority(mCr
eatorPackageName); |
102 return new ContextMenuParams(mType, mUri.toString(), mUri.toString(), mU
ri.toString(), | 102 return new ContextMenuParams(mType, mUri.toString(), mUri.toString(), mU
ri.toString(), |
103 mUri.toString(), mUri.toString(), mUri.toString(), false /* imag
eWasFetchedLoFi */, | 103 mUri.toString(), mUri.toString(), mUri.toString(), false /* imag
eWasFetchedLoFi */, |
104 referrer, false /* canSaveMedia */); | 104 referrer, false /* canSaveMedia */, 0 /* touchPointXDp */, 0 /*
touchPointYDp */); |
105 } | 105 } |
106 | 106 |
107 @Override | 107 @Override |
108 protected boolean shouldDelayBrowserStartup() { | 108 protected boolean shouldDelayBrowserStartup() { |
109 return true; | 109 return true; |
110 } | 110 } |
111 | 111 |
112 @Override | 112 @Override |
113 public boolean shouldStartGpuProcess() { | 113 public boolean shouldStartGpuProcess() { |
114 return true; | 114 return true; |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 } | 149 } |
150 | 150 |
151 @Override | 151 @Override |
152 public void onContextMenuClosed(Menu menu) { | 152 public void onContextMenuClosed(Menu menu) { |
153 super.onContextMenuClosed(menu); | 153 super.onContextMenuClosed(menu); |
154 if (mHelper != null) { | 154 if (mHelper != null) { |
155 mHelper.onContextMenuClosed(); | 155 mHelper.onContextMenuClosed(); |
156 } | 156 } |
157 } | 157 } |
158 } | 158 } |
OLD | NEW |