Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/infobar/DataReductionProxyInfoBar.java

Issue 1150193004: Straighten up life cycle of native InfoBar pointers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: removed unrelated file Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 13 matching lines...) Expand all
24 */ 24 */
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(long nativeInfoBar, int iconDrawableId) { 34 DataReductionProxyInfoBar(int iconDrawableId) {
35 super(nativeInfoBar, null, iconDrawableId, null, sTitle, sLinkText, null , null); 35 super(null, iconDrawableId, null, sTitle, sLinkText, null, null);
36 } 36 }
37 37
38 @Override 38 @Override
39 public void createContent(InfoBarLayout layout) { 39 public void createContent(InfoBarLayout layout) {
40 layout.setButtons(sLinkText, null); 40 layout.setButtons(sLinkText, null);
41 } 41 }
42 42
43 @Override 43 @Override
44 public void onButtonClicked(boolean isPrimaryButton) { 44 public void onButtonClicked(boolean isPrimaryButton) {
45 if (!isPrimaryButton) return; 45 if (!isPrimaryButton) return;
46 onLinkClicked(); 46 onLinkClicked();
47 } 47 }
48 } 48 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698