Chromium Code Reviews| Index: chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
| diff --git a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
| index 3341991646752f023c18c72d74343cc3da814e1b..2fc27cd87ce62458caca7c913b46f3427b3b373f 100644 |
| --- a/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
| +++ b/chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java |
| @@ -72,6 +72,8 @@ public class ChromeShellToolbar extends LinearLayout { |
| private SuggestionPopup mSuggestionPopup; |
| private ImageButton mStopReloadButton; |
| + private ImageButton mAddButton; |
| + |
| private int mProgress = 0; |
| private boolean mLoading = true; |
| @@ -242,6 +244,20 @@ public class ChromeShellToolbar extends LinearLayout { |
| }); |
| } |
| + |
| + public void initializeAddButton(boolean tabswitcher) { |
|
Bernhard Bauer
2014/11/05 10:01:53
This should have a Javadoc comment. Also, |tabswit
|
| + mAddButton = (ImageButton) findViewById(R.id.add_button); |
| + mAddButton.setVisibility(tabswitcher ? VISIBLE : GONE); |
| + mStopReloadButton.setVisibility(tabswitcher ? GONE : VISIBLE); |
| + mAddButton.setOnClickListener(new OnClickListener() { |
| + @Override |
| + public void onClick(View v) { |
| + mTabManager.createNewTab(); |
| + } |
| + }); |
| + } |
| + |
| + |
| /** |
| * @return Current tab that is shown by ChromeShell. |
| */ |