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.content_public.browser.WebContents; | 7 import org.chromium.content_public.browser.WebContents; |
8 | 8 |
9 /** | 9 /** |
10 * Generates an InfoBar for the data reduction proxy that contains a message and
a link to the | 10 * Generates an InfoBar for the data reduction proxy that contains a message and
a link to the |
(...skipping 26 matching lines...) Expand all Loading... |
37 public static void launch(WebContents webContents, | 37 public static void launch(WebContents webContents, |
38 String unused1, | 38 String unused1, |
39 String unused2, | 39 String unused2, |
40 String title, | 40 String title, |
41 String linkText, | 41 String linkText, |
42 String linkUrl) { | 42 String linkUrl) { |
43 launch(webContents, title, linkText, linkUrl); | 43 launch(webContents, title, linkText, linkUrl); |
44 } | 44 } |
45 | 45 |
46 DataReductionProxyInfoBar(long nativeInfoBar, int iconDrawableId) { | 46 DataReductionProxyInfoBar(long nativeInfoBar, int iconDrawableId) { |
47 super(nativeInfoBar, null, iconDrawableId, sTitle, | 47 super(nativeInfoBar, null, iconDrawableId, null, sTitle, sLinkText, null
, null); |
48 sLinkText, null, null); | |
49 } | 48 } |
50 | 49 |
51 @Override | 50 @Override |
52 public void createContent(InfoBarLayout layout) { | 51 public void createContent(InfoBarLayout layout) { |
53 layout.setButtons(sLinkText, null); | 52 layout.setButtons(sLinkText, null); |
54 } | 53 } |
55 | 54 |
56 @Override | 55 @Override |
57 public void onButtonClicked(boolean isPrimaryButton) { | 56 public void onButtonClicked(boolean isPrimaryButton) { |
58 if (!isPrimaryButton) return; | 57 if (!isPrimaryButton) return; |
59 onLinkClicked(); | 58 onLinkClicked(); |
60 } | 59 } |
61 } | 60 } |
OLD | NEW |