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

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

Issue 2235533002: Revert "Changed NavigationController access to through tab in Java code" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 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
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.toolbar; 5 package org.chromium.chrome.browser.toolbar;
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.AnimatorSet; 9 import android.animation.AnimatorSet;
10 import android.annotation.SuppressLint; 10 import android.annotation.SuppressLint;
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 // Ensure the the popup is not shown after resuming activity from backgr ound. 258 // Ensure the the popup is not shown after resuming activity from backgr ound.
259 if (hasWindowFocus && mNavigationPopup != null) { 259 if (hasWindowFocus && mNavigationPopup != null) {
260 mNavigationPopup.dismiss(); 260 mNavigationPopup.dismiss();
261 mNavigationPopup = null; 261 mNavigationPopup = null;
262 } 262 }
263 super.onWindowFocusChanged(hasWindowFocus); 263 super.onWindowFocusChanged(hasWindowFocus);
264 } 264 }
265 265
266 private void displayNavigationPopup(boolean isForward, View anchorView) { 266 private void displayNavigationPopup(boolean isForward, View anchorView) {
267 Tab tab = getToolbarDataProvider().getTab(); 267 Tab tab = getToolbarDataProvider().getTab();
268 if (tab == null || tab.getNavigationHandler() == null) return; 268 if (tab == null || tab.getWebContents() == null) return;
269 mNavigationPopup = new NavigationPopup( 269 mNavigationPopup = new NavigationPopup(tab.getProfile(), getContext(),
270 tab.getProfile(), getContext(), tab.getNavigationHandler(), isFo rward); 270 tab.getWebContents().getNavigationController(), isForward);
271 271
272 mNavigationPopup.setAnchorView(anchorView); 272 mNavigationPopup.setAnchorView(anchorView);
273 273
274 int menuWidth = getResources().getDimensionPixelSize(R.dimen.menu_width) ; 274 int menuWidth = getResources().getDimensionPixelSize(R.dimen.menu_width) ;
275 mNavigationPopup.setWidth(menuWidth); 275 mNavigationPopup.setWidth(menuWidth);
276 276
277 if (mNavigationPopup.shouldBeShown()) mNavigationPopup.show(); 277 if (mNavigationPopup.shouldBeShown()) mNavigationPopup.show();
278 } 278 }
279 279
280 @Override 280 @Override
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 } 628 }
629 629
630 mButtonVisibilityAnimators = null; 630 mButtonVisibilityAnimators = null;
631 } 631 }
632 }); 632 });
633 633
634 return set; 634 return set;
635 } 635 }
636 636
637 } 637 }
OLDNEW
« no previous file with comments | « chrome/android/java/src/org/chromium/chrome/browser/toolbar/ToolbarManager.java ('k') | chrome/android/java_sources.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698