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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/emptybackground/EmptyBackgroundViewTablet.java

Issue 2325893002: [blimp] Add support for having multiple tabs (Closed)
Patch Set: Add tablet and non-blimp support Created 4 years, 3 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
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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.widget.emptybackground; 5 package org.chromium.chrome.browser.widget.emptybackground;
6 6
7 import android.animation.Animator; 7 import android.animation.Animator;
8 import android.animation.AnimatorListenerAdapter; 8 import android.animation.AnimatorListenerAdapter;
9 import android.animation.ObjectAnimator; 9 import android.animation.ObjectAnimator;
10 import android.content.Context; 10 import android.content.Context;
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 52
53 @Override 53 @Override
54 public void onFinishInflate() { 54 public void onFinishInflate() {
55 super.onFinishInflate(); 55 super.onFinishInflate();
56 56
57 View newTabButton = findViewById(R.id.empty_new_tab_button); 57 View newTabButton = findViewById(R.id.empty_new_tab_button);
58 newTabButton.setOnClickListener(new OnClickListener() { 58 newTabButton.setOnClickListener(new OnClickListener() {
59 @Override 59 @Override
60 public void onClick(View v) { 60 public void onClick(View v) {
61 if (mTabCreator == null) return; 61 if (mTabCreator == null) return;
62 mTabModelSelector.getModel(false).commitAllTabClosures();
62 mTabCreator.launchNTP(); 63 mTabCreator.launchNTP();
63 } 64 }
64 }); 65 });
65 66
66 buildAnimatorSets(); 67 buildAnimatorSets();
67 } 68 }
68 69
69 /** 70 /**
70 * Sets the {@link TabModelSelector} that will be queried for information ab out the state of 71 * Sets the {@link TabModelSelector} that will be queried for information ab out the state of
71 * the system. 72 * the system.
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 165
165 @Override 166 @Override
166 public void onAnimationEnd(Animator animation) { 167 public void onAnimationEnd(Animator animation) {
167 setVisibility(View.GONE); 168 setVisibility(View.GONE);
168 mCurrentTransitionAnimation = null; 169 mCurrentTransitionAnimation = null;
169 mIncognitoToggleButton.setEnabled(true); 170 mIncognitoToggleButton.setEnabled(true);
170 } 171 }
171 }); 172 });
172 } 173 }
173 } 174 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/compositor/overlays/strip/StripLayoutHelper.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698