OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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.contextmenu; | 5 package org.chromium.chrome.browser.contextmenu; |
6 | 6 |
7 import android.text.TextUtils; | 7 import android.text.TextUtils; |
8 | 8 |
9 import org.chromium.base.CalledByNative; | 9 import org.chromium.base.CalledByNative; |
10 import org.chromium.base.JNINamespace; | 10 import org.chromium.base.JNINamespace; |
11 import org.chromium.content_public.Referrer; | 11 import org.chromium.content_public.common.Referrer; |
12 | 12 |
13 import java.util.ArrayList; | 13 import java.util.ArrayList; |
14 | 14 |
15 /** | 15 /** |
16 * A list of parameters that explain what kind of context menu to show the user.
This data is | 16 * A list of parameters that explain what kind of context menu to show the user.
This data is |
17 * generated from content/public/common/context_menu_params.h. | 17 * generated from content/public/common/context_menu_params.h. |
18 */ | 18 */ |
19 @JNINamespace("ContextMenuParamsAndroid") | 19 @JNINamespace("ContextMenuParamsAndroid") |
20 public class ContextMenuParams { | 20 public class ContextMenuParams { |
21 /** Must correspond to the MediaType enum in WebKit/chromium/public/WebConte
xtMenuData.h */ | 21 /** Must correspond to the MediaType enum in WebKit/chromium/public/WebConte
xtMenuData.h */ |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
181 null : new Referrer(sanitizedReferrer, referrerPolicy); | 181 null : new Referrer(sanitizedReferrer, referrerPolicy); |
182 return new ContextMenuParams(mediaType, linkUrl, linkText, unfilteredLin
kUrl, srcUrl, | 182 return new ContextMenuParams(mediaType, linkUrl, linkText, unfilteredLin
kUrl, srcUrl, |
183 selectionText, isEditable, referrer); | 183 selectionText, isEditable, referrer); |
184 } | 184 } |
185 | 185 |
186 @CalledByNative | 186 @CalledByNative |
187 private void addCustomItem(String label, int action) { | 187 private void addCustomItem(String label, int action) { |
188 mCustomMenuItems.add(new CustomMenuItem(label, action)); | 188 mCustomMenuItems.add(new CustomMenuItem(label, action)); |
189 } | 189 } |
190 } | 190 } |
OLD | NEW |