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 14 matching lines...) Expand all Loading... |
25 public static void launch(WebContents webContents, | 25 public static void launch(WebContents webContents, |
26 String title, | 26 String title, |
27 String linkText, | 27 String linkText, |
28 String linkUrl) { | 28 String linkUrl) { |
29 sTitle = title; | 29 sTitle = title; |
30 sLinkText = linkText; | 30 sLinkText = linkText; |
31 DataReductionProxyInfoBarDelegate.launch(webContents, linkUrl); | 31 DataReductionProxyInfoBarDelegate.launch(webContents, linkUrl); |
32 } | 32 } |
33 | 33 |
34 DataReductionProxyInfoBar(int iconDrawableId) { | 34 DataReductionProxyInfoBar(int iconDrawableId) { |
35 super(null, iconDrawableId, null, sTitle, sLinkText, null, null); | 35 super(iconDrawableId, null, sTitle, sLinkText, null, null); |
36 } | 36 } |
37 | 37 |
38 @Override | 38 @Override |
39 public void onButtonClicked(boolean isPrimaryButton) { | 39 public void onButtonClicked(boolean isPrimaryButton) { |
40 if (!isPrimaryButton) return; | 40 if (!isPrimaryButton) return; |
41 onLinkClicked(); | 41 onLinkClicked(); |
42 } | 42 } |
43 } | 43 } |
OLD | NEW |