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

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

Issue 1298483004: Fix Custom Action Bar for custom tabs on tablet (Closed) Base URL: https://chromium.googlesource.com/a/chromium/src.git@2454
Patch Set: Created 5 years, 4 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 | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java » ('j') | 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; 5 package org.chromium.chrome.browser;
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.animation.ValueAnimator; 10 import android.animation.ValueAnimator;
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 * @param actionBarDelegate The delegate for communicating with the action b ar while animating 80 * @param actionBarDelegate The delegate for communicating with the action b ar while animating
81 * it. 81 * it.
82 */ 82 */
83 public ContextualMenuBar(Context context, ActionBarDelegate actionBarDelegat e) { 83 public ContextualMenuBar(Context context, ActionBarDelegate actionBarDelegat e) {
84 mActionBarDelegate = actionBarDelegate; 84 mActionBarDelegate = actionBarDelegate;
85 mContext = context; 85 mContext = context;
86 mTabStripHeight = mContext.getResources().getDimension(R.dimen.tab_strip _height); 86 mTabStripHeight = mContext.getResources().getDimension(R.dimen.tab_strip _height);
87 } 87 }
88 88
89 /** 89 /**
90 * Overrides the preset height of the tab strip.
91 */
92 public void setTabStripHeight(int tabStripHeight) {
93 mTabStripHeight = tabStripHeight;
94 }
95
96 /**
90 * @return The delegate handling action bar positioning for the contextual m enu bar. 97 * @return The delegate handling action bar positioning for the contextual m enu bar.
91 */ 98 */
92 public ActionBarDelegate getActionBarDelegate() { 99 public ActionBarDelegate getActionBarDelegate() {
93 return mActionBarDelegate; 100 return mActionBarDelegate;
94 } 101 }
95 102
96 /** 103 /**
97 * Sets the custom ActionMode.Callback 104 * Sets the custom ActionMode.Callback
98 * @param customSelectionActionModeCallback 105 * @param customSelectionActionModeCallback
99 */ 106 */
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after
181 public void onAnimationEnd(Animator animation) { 188 public void onAnimationEnd(Animator animation) {
182 mCurrentAnimation = null; 189 mCurrentAnimation = null;
183 mActionBarDelegate.setActionBarBackgroundVisibility(false); 190 mActionBarDelegate.setActionBarBackgroundVisibility(false);
184 } 191 }
185 }); 192 });
186 193
187 mCurrentAnimation.start(); 194 mCurrentAnimation.start();
188 mShowingContextualActionBar = false; 195 mShowingContextualActionBar = false;
189 } 196 }
190 } 197 }
OLDNEW
« no previous file with comments | « no previous file | chrome/android/java/src/org/chromium/chrome/browser/toolbar/CustomTabToolbar.java » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698