OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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.infobar; | 5 package org.chromium.chrome.browser.infobar; |
6 | 6 |
7 import org.chromium.base.CalledByNative; | 7 import org.chromium.base.CalledByNative; |
8 import org.chromium.chrome.browser.ResourceId; | 8 import org.chromium.chrome.browser.ResourceId; |
9 import org.chromium.content_public.browser.WebContents; | 9 import org.chromium.content_public.browser.WebContents; |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 private DataReductionProxyInfoBarDelegate() { | 23 private DataReductionProxyInfoBarDelegate() { |
24 } | 24 } |
25 | 25 |
26 @CalledByNative | 26 @CalledByNative |
27 public static DataReductionProxyInfoBarDelegate create() { | 27 public static DataReductionProxyInfoBarDelegate create() { |
28 return new DataReductionProxyInfoBarDelegate(); | 28 return new DataReductionProxyInfoBarDelegate(); |
29 } | 29 } |
30 | 30 |
31 /** | 31 /** |
32 * Creates and begins the process for showing a DataReductionProxyInfoBarDel
egate. | 32 * Creates and begins the process for showing a DataReductionProxyInfoBarDel
egate. |
33 * @param nativeInfoBar Pointer to the C++ InfoBar corresponding to the Java
InfoBar. | |
34 * @param enumeratedIconId ID corresponding to the icon that will be shown f
or the InfoBar. | 33 * @param enumeratedIconId ID corresponding to the icon that will be shown f
or the InfoBar. |
35 * The ID must have been mapped using the ResourceMa
pper class before | 34 * The ID must have been mapped using the ResourceMa
pper class before |
36 * passing it to this function. | 35 * passing it to this function. |
37 */ | 36 */ |
38 @CalledByNative | 37 @CalledByNative |
39 InfoBar showDataReductionProxyInfoBar(long nativeInfoBar, int enumeratedIcon
Id) { | 38 InfoBar showDataReductionProxyInfoBar(int enumeratedIconId) { |
40 int drawableId = ResourceId.mapToDrawableId(enumeratedIconId); | 39 int drawableId = ResourceId.mapToDrawableId(enumeratedIconId); |
41 DataReductionProxyInfoBar infoBar = new DataReductionProxyInfoBar( | 40 DataReductionProxyInfoBar infoBar = new DataReductionProxyInfoBar(drawab
leId); |
42 nativeInfoBar, drawableId); | |
43 return infoBar; | 41 return infoBar; |
44 } | 42 } |
45 | 43 |
46 protected static native void nativeLaunch(WebContents webContents, String li
nkUrl); | 44 private static native void nativeLaunch(WebContents webContents, String link
Url); |
47 } | 45 } |
OLD | NEW |