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

Side by Side Diff: chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/contextualsearch/ContextualSearchPanel.java

Issue 2818033003: [Contextual Search] Disable narrow panel when Chrome Home is enabled (Closed)
Patch Set: Created 3 years, 8 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/bottombar/OverlayPanelBase.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.compositor.bottombar.contextualsearch; 5 package org.chromium.chrome.browser.compositor.bottombar.contextualsearch;
6 6
7 import android.app.Activity; 7 import android.app.Activity;
8 import android.content.Context; 8 import android.content.Context;
9 import android.graphics.RectF; 9 import android.graphics.RectF;
10 import android.os.Handler; 10 import android.os.Handler;
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 408
409 @Override 409 @Override
410 public void setChromeActivity(ChromeActivity activity) { 410 public void setChromeActivity(ChromeActivity activity) {
411 super.setChromeActivity(activity); 411 super.setChromeActivity(activity);
412 412
413 if (mActivity.getBottomSheet() == null) return; 413 if (mActivity.getBottomSheet() == null) return;
414 414
415 addBarHandle(mActivity.getToolbarManager().getToolbar().getHeight()); 415 addBarHandle(mActivity.getToolbarManager().getToolbar().getHeight());
416 } 416 }
417 417
418 @Override
419 protected boolean doesMatchFullWidthCriteria(float containerWidth) {
420 if (!mOverrideIsFullWidthSizePanelForTesting && mActivity.getBottomSheet () != null) {
Theresa 2017/04/15 00:24:02 I need to add an mActivity != null check for the t
421 return true;
422 }
423 return super.doesMatchFullWidthCriteria(containerWidth);
424 }
425
418 // ========================================================================= =================== 426 // ========================================================================= ===================
419 // Animation Handling 427 // Animation Handling
420 // ========================================================================= =================== 428 // ========================================================================= ===================
421 429
422 @Override 430 @Override
423 protected void onAnimationFinished() { 431 protected void onAnimationFinished() {
424 super.onAnimationFinished(); 432 super.onAnimationFinished();
425 433
426 if (mShouldPromoteToTabAfterMaximizing && getPanelState() == PanelState. MAXIMIZED) { 434 if (mShouldPromoteToTabAfterMaximizing && getPanelState() == PanelState. MAXIMIZED) {
427 mShouldPromoteToTabAfterMaximizing = false; 435 mShouldPromoteToTabAfterMaximizing = false;
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
877 xPosition = getContentX() + getWidth() - (mEndButtonWidthDp / 2); 885 xPosition = getContentX() + getWidth() - (mEndButtonWidthDp / 2);
878 } 886 }
879 887
880 // Determine the y-position for the simulated tap. 888 // Determine the y-position for the simulated tap.
881 float yPosition = getOffsetY() + (getHeight() / 2); 889 float yPosition = getOffsetY() + (getHeight() / 2);
882 890
883 // Simulate the tap. 891 // Simulate the tap.
884 handleClick(System.currentTimeMillis(), xPosition, yPosition); 892 handleClick(System.currentTimeMillis(), xPosition, yPosition);
885 } 893 }
886 } 894 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/compositor/bottombar/OverlayPanelBase.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698