Chromium Code Reviews| 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.infobar; | 5 package org.chromium.chrome.browser.infobar; |
| 6 | 6 |
| 7 import android.content.Context; | 7 import android.content.Context; |
| 8 import android.graphics.Bitmap; | 8 import android.graphics.Bitmap; |
| 9 import android.view.View; | 9 import android.view.View; |
| 10 import android.widget.TextView; | 10 import android.widget.TextView; |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 137 | 137 |
| 138 @Override | 138 @Override |
| 139 public boolean isLegalDisclosure() { | 139 public boolean isLegalDisclosure() { |
| 140 return false; | 140 return false; |
| 141 } | 141 } |
| 142 | 142 |
| 143 /** | 143 /** |
| 144 * @return whether the infobar actually needed closing. | 144 * @return whether the infobar actually needed closing. |
| 145 */ | 145 */ |
| 146 @CalledByNative | 146 @CalledByNative |
| 147 private boolean closeInfoBar() { | 147 protected boolean closeInfoBar() { |
|
gone
2017/04/26 17:19:51
I'm really wary of exposing this method. It allow
ramyasharma
2017/04/27 08:01:42
Thank Dan. But I dont need this anymore, I dont ha
| |
| 148 if (!mIsDismissed) { | 148 if (!mIsDismissed) { |
| 149 mIsDismissed = true; | 149 mIsDismissed = true; |
| 150 if (!mContainer.hasBeenDestroyed()) { | 150 if (!mContainer.hasBeenDestroyed()) { |
| 151 // If the container was destroyed, it's already been emptied of all its infobars. | 151 // If the container was destroyed, it's already been emptied of all its infobars. |
| 152 mContainer.removeInfoBar(this); | 152 mContainer.removeInfoBar(this); |
| 153 } | 153 } |
| 154 return true; | 154 return true; |
| 155 } | 155 } |
| 156 return false; | 156 return false; |
| 157 } | 157 } |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 197 } | 197 } |
| 198 | 198 |
| 199 @Override | 199 @Override |
| 200 public void createContent(InfoBarLayout layout) { | 200 public void createContent(InfoBarLayout layout) { |
| 201 } | 201 } |
| 202 | 202 |
| 203 private native void nativeOnLinkClicked(long nativeInfoBarAndroid); | 203 private native void nativeOnLinkClicked(long nativeInfoBarAndroid); |
| 204 private native void nativeOnButtonClicked(long nativeInfoBarAndroid, int act ion); | 204 private native void nativeOnButtonClicked(long nativeInfoBarAndroid, int act ion); |
| 205 private native void nativeOnCloseButtonClicked(long nativeInfoBarAndroid); | 205 private native void nativeOnCloseButtonClicked(long nativeInfoBarAndroid); |
| 206 } | 206 } |
| OLD | NEW |