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

Side by Side Diff: chrome/android/shell/java/src/org/chromium/chrome/shell/TabManager.java

Issue 689583002: Tab manager view should hide on press of back key (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Removed null check as no crash is observed. Created 6 years, 1 month 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/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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.shell; 5 package org.chromium.chrome.shell;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.util.AttributeSet; 8 import android.util.AttributeSet;
9 import android.view.View; 9 import android.view.View;
10 import android.view.ViewGroup; 10 import android.view.ViewGroup;
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 contentViewCore.onShow(); 183 contentViewCore.onShow();
184 } 184 }
185 185
186 /** 186 /**
187 * Toggles the tab switcher visibility. 187 * Toggles the tab switcher visibility.
188 */ 188 */
189 public void toggleTabSwitcher() { 189 public void toggleTabSwitcher() {
190 mTabModelSelector.toggleTabSwitcher(); 190 mTabModelSelector.toggleTabSwitcher();
191 } 191 }
192 192
193 public boolean isTabSwitcherVisible() {
194 return mTabModelSelector.isTabSwitcherVisible();
195 }
196
197 public void hideTabSwitcher() {
198 mTabModelSelector.hideTabSwitcher();
199 }
200
193 /** 201 /**
194 * Opens a URL in the current tab if one exists, or in a new tab otherwise. 202 * Opens a URL in the current tab if one exists, or in a new tab otherwise.
195 * @param url The URL to open. 203 * @param url The URL to open.
196 * @return The tab used to open the provided URL. 204 * @return The tab used to open the provided URL.
197 */ 205 */
198 public Tab openUrl(String url) { 206 public Tab openUrl(String url) {
199 LoadUrlParams loadUrlParams = new LoadUrlParams(url); 207 LoadUrlParams loadUrlParams = new LoadUrlParams(url);
200 loadUrlParams.setTransitionType(PageTransition.TYPED | PageTransition.FR OM_ADDRESS_BAR); 208 loadUrlParams.setTransitionType(PageTransition.TYPED | PageTransition.FR OM_ADDRESS_BAR);
201 Tab tab = mTabModelSelector.getCurrentTab(); 209 Tab tab = mTabModelSelector.getCurrentTab();
202 if (tab != null) { 210 if (tab != null) {
203 tab.loadUrl(loadUrlParams); 211 tab.loadUrl(loadUrlParams);
204 return tab; 212 return tab;
205 } 213 }
206 return createTab(url, TabLaunchType.FROM_KEYBOARD); 214 return createTab(url, TabLaunchType.FROM_KEYBOARD);
207 } 215 }
208 } 216 }
OLDNEW
« no previous file with comments | « chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellTabModelSelector.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698