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

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

Issue 2087543002: Changed NavigationController access to through tab in Java code (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Renamed interface to NavigationHandler Created 4 years, 5 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 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 // Ensure the the popup is not shown after resuming activity from backgr ound. 255 // Ensure the the popup is not shown after resuming activity from backgr ound.
256 if (hasWindowFocus && mNavigationPopup != null) { 256 if (hasWindowFocus && mNavigationPopup != null) {
257 mNavigationPopup.dismiss(); 257 mNavigationPopup.dismiss();
258 mNavigationPopup = null; 258 mNavigationPopup = null;
259 } 259 }
260 super.onWindowFocusChanged(hasWindowFocus); 260 super.onWindowFocusChanged(hasWindowFocus);
261 } 261 }
262 262
263 private void displayNavigationPopup(boolean isForward, View anchorView) { 263 private void displayNavigationPopup(boolean isForward, View anchorView) {
264 Tab tab = getToolbarDataProvider().getTab(); 264 Tab tab = getToolbarDataProvider().getTab();
265 if (tab == null || tab.getWebContents() == null) return; 265 if (tab == null || tab.getNavigationHandler() == null) return;
266 mNavigationPopup = new NavigationPopup(tab.getProfile(), getContext(), 266 mNavigationPopup = new NavigationPopup(
267 tab.getWebContents().getNavigationController(), isForward); 267 tab.getProfile(), getContext(), tab.getNavigationHandler(), isFo rward);
268 268
269 mNavigationPopup.setAnchorView(anchorView); 269 mNavigationPopup.setAnchorView(anchorView);
270 270
271 int menuWidth = getResources().getDimensionPixelSize(R.dimen.menu_width) ; 271 int menuWidth = getResources().getDimensionPixelSize(R.dimen.menu_width) ;
272 mNavigationPopup.setWidth(menuWidth); 272 mNavigationPopup.setWidth(menuWidth);
273 273
274 if (mNavigationPopup.shouldBeShown()) mNavigationPopup.show(); 274 if (mNavigationPopup.shouldBeShown()) mNavigationPopup.show();
275 } 275 }
276 276
277 @Override 277 @Override
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 } 589 }
590 590
591 mButtonVisibilityAnimators = null; 591 mButtonVisibilityAnimators = null;
592 } 592 }
593 }); 593 });
594 594
595 return set; 595 return set;
596 } 596 }
597 597
598 } 598 }
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