| 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.text.TextUtils; | 8 import android.text.TextUtils; |
| 9 import android.text.method.LinkMovementMethod; | 9 import android.text.method.LinkMovementMethod; |
| 10 import android.view.LayoutInflater; | 10 import android.view.LayoutInflater; |
| 11 import android.view.View; | 11 import android.view.View; |
| 12 import android.view.ViewGroup; | 12 import android.view.ViewGroup; |
| 13 import android.widget.Button; | 13 import android.widget.Button; |
| 14 import android.widget.ImageButton; | 14 import android.widget.ImageButton; |
| 15 import android.widget.ImageView; | 15 import android.widget.ImageView; |
| 16 import android.widget.TextView; | 16 import android.widget.TextView; |
| 17 | 17 |
| 18 import org.chromium.chrome.R; | 18 import org.chromium.chrome.R; |
| 19 | |
| 20 import org.chromium.ui.base.LocalizationUtils; | 19 import org.chromium.ui.base.LocalizationUtils; |
| 21 | 20 |
| 22 import java.util.ArrayList; | 21 import java.util.ArrayList; |
| 23 | 22 |
| 24 /** | 23 /** |
| 25 * Layout that can be used to arrange an InfoBar's View. | 24 * Layout that can be used to arrange an InfoBar's View. |
| 26 * All InfoBars consist of at least: | 25 * All InfoBars consist of at least: |
| 27 * - An icon representing the InfoBar's purpose on the left side. | 26 * - An icon representing the InfoBar's purpose on the left side. |
| 28 * - A message describing the action that the user can take. | 27 * - A message describing the action that the user can take. |
| 29 * - A close button on the right side. | 28 * - A close button on the right side. |
| (...skipping 735 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 765 if (view.getId() == R.id.infobar_close_button) { | 764 if (view.getId() == R.id.infobar_close_button) { |
| 766 mInfoBarView.onCloseButtonClicked(); | 765 mInfoBarView.onCloseButtonClicked(); |
| 767 } else if (view.getId() == R.id.button_primary) { | 766 } else if (view.getId() == R.id.button_primary) { |
| 768 mInfoBarView.onButtonClicked(true); | 767 mInfoBarView.onButtonClicked(true); |
| 769 } else if (view.getId() == R.id.button_secondary) { | 768 } else if (view.getId() == R.id.button_secondary) { |
| 770 mInfoBarView.onButtonClicked(false); | 769 mInfoBarView.onButtonClicked(false); |
| 771 } | 770 } |
| 772 } | 771 } |
| 773 | 772 |
| 774 } | 773 } |
| OLD | NEW |