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

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

Issue 914083003: Hide Url bar in tab switcher mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review changes Created 5 years, 10 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/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.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.LayoutInflater; 9 import android.view.LayoutInflater;
10 import android.view.View; 10 import android.view.View;
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 * Hide the tab switcher. 220 * Hide the tab switcher.
221 */ 221 */
222 public void hideTabSwitcher() { 222 public void hideTabSwitcher() {
223 if (mTabModelWrapper == null) return; 223 if (mTabModelWrapper == null) return;
224 if (!isTabSwitcherVisible()) return; 224 if (!isTabSwitcherVisible()) return;
225 ViewParent parent = mTabModelWrapper.getParent(); 225 ViewParent parent = mTabModelWrapper.getParent();
226 if (parent != null) { 226 if (parent != null) {
227 assert parent == mContentViewHolder; 227 assert parent == mContentViewHolder;
228 mContentViewHolder.removeView(mTabModelWrapper); 228 mContentViewHolder.removeView(mTabModelWrapper);
229 } 229 }
230 mToolbar.updateToolBarButtonState(); 230 mToolbar.updateToolbarState();
231 } 231 }
232 232
233 /** 233 /**
234 * Shows the tab switcher. 234 * Shows the tab switcher.
235 */ 235 */
236 private void showTabSwitcher() { 236 private void showTabSwitcher() {
237 if (mTabModelWrapper == null) { 237 if (mTabModelWrapper == null) {
238 mTabModelWrapper = (AccessibilityTabModelWrapper) LayoutInflater.fro m( 238 mTabModelWrapper = (AccessibilityTabModelWrapper) LayoutInflater.fro m(
239 mContentViewHolder.getContext()).inflate( 239 mContentViewHolder.getContext()).inflate(
240 R.layout.accessibility_tab_switcher, null); 240 R.layout.accessibility_tab_switcher, null);
241 mTabModelWrapper.setup(null); 241 mTabModelWrapper.setup(null);
242 mTabModelWrapper.setTabModelSelector(mTabModelSelector); 242 mTabModelWrapper.setTabModelSelector(mTabModelSelector);
243 } 243 }
244 244
245 if (mTabModelWrapper.getParent() == null) { 245 if (mTabModelWrapper.getParent() == null) {
246 mContentViewHolder.addView(mTabModelWrapper); 246 mContentViewHolder.addView(mTabModelWrapper);
247 } 247 }
248 mToolbar.updateToolBarButtonState(); 248 mToolbar.updateToolbarState();
249 InputMethodManager mImm = (InputMethodManager) getContext().getSystemSer vice( 249 InputMethodManager mImm = (InputMethodManager) getContext().getSystemSer vice(
Bernhard Bauer 2015/02/13 10:03:51 And remove this code now.
250 Context.INPUT_METHOD_SERVICE); 250 Context.INPUT_METHOD_SERVICE);
251 mImm.hideSoftInputFromWindow(mContentViewHolder.getWindowToken(), 0); 251 mImm.hideSoftInputFromWindow(mContentViewHolder.getWindowToken(), 0);
252 } 252 }
253 253
254 /** 254 /**
255 * Returns the visibility status of the tab switcher. 255 * Returns the visibility status of the tab switcher.
256 */ 256 */
257 public boolean isTabSwitcherVisible() { 257 public boolean isTabSwitcherVisible() {
258 return mTabModelWrapper != null && mTabModelWrapper.getParent() == mCont entViewHolder; 258 return mTabModelWrapper != null && mTabModelWrapper.getParent() == mCont entViewHolder;
259 } 259 }
(...skipping 25 matching lines...) Expand all
285 return createTab(url, TabLaunchType.FROM_KEYBOARD); 285 return createTab(url, TabLaunchType.FROM_KEYBOARD);
286 } 286 }
287 287
288 /** 288 /**
289 * Returns the TabModelSelector containing the tabs. 289 * Returns the TabModelSelector containing the tabs.
290 */ 290 */
291 public TabModelSelector getTabModelSelector() { 291 public TabModelSelector getTabModelSelector() {
292 return mTabModelSelector; 292 return mTabModelSelector;
293 } 293 }
294 } 294 }
OLDNEW
« no previous file with comments | « chrome/android/shell/java/src/org/chromium/chrome/shell/ChromeShellToolbar.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698