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

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

Issue 724683002: Keyboard should not be displayed in tab switcher mode. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review Comment Changes 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 | « no previous file | 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;
11 import android.view.ViewGroup; 11 import android.view.ViewGroup;
12 import android.view.ViewParent; 12 import android.view.ViewParent;
13 import android.view.inputmethod.InputMethodManager;
13 import android.widget.FrameLayout; 14 import android.widget.FrameLayout;
14 import android.widget.LinearLayout; 15 import android.widget.LinearLayout;
15 16
16 import org.chromium.chrome.browser.EmptyTabObserver; 17 import org.chromium.chrome.browser.EmptyTabObserver;
17 import org.chromium.chrome.browser.Tab; 18 import org.chromium.chrome.browser.Tab;
18 import org.chromium.chrome.browser.tabmodel.EmptyTabModelObserver; 19 import org.chromium.chrome.browser.tabmodel.EmptyTabModelObserver;
19 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType; 20 import org.chromium.chrome.browser.tabmodel.TabModel.TabLaunchType;
20 import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType; 21 import org.chromium.chrome.browser.tabmodel.TabModel.TabSelectionType;
21 import org.chromium.chrome.browser.widget.accessibility.AccessibilityTabModelWra pper; 22 import org.chromium.chrome.browser.widget.accessibility.AccessibilityTabModelWra pper;
22 import org.chromium.content.browser.ContentVideoViewClient; 23 import org.chromium.content.browser.ContentVideoViewClient;
(...skipping 186 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 mContentViewHolder.getContext()).inflate( 210 mContentViewHolder.getContext()).inflate(
210 R.layout.accessibility_tab_switcher, null); 211 R.layout.accessibility_tab_switcher, null);
211 mTabModelWrapper.setup(null); 212 mTabModelWrapper.setup(null);
212 mTabModelWrapper.setTabModelSelector(mTabModelSelector); 213 mTabModelWrapper.setTabModelSelector(mTabModelSelector);
213 } 214 }
214 215
215 if (mTabModelWrapper.getParent() == null) { 216 if (mTabModelWrapper.getParent() == null) {
216 mContentViewHolder.addView(mTabModelWrapper); 217 mContentViewHolder.addView(mTabModelWrapper);
217 } 218 }
218 mToolbar.showAddButton(true); 219 mToolbar.showAddButton(true);
220 InputMethodManager mImm = (InputMethodManager) getContext().getSystemSer vice(
221 Context.INPUT_METHOD_SERVICE);
222 mImm.hideSoftInputFromWindow(mContentViewHolder.getWindowToken(), 0);
219 } 223 }
220 224
221 /** 225 /**
222 * Returns the visibility status of the tab switcher. 226 * Returns the visibility status of the tab switcher.
223 */ 227 */
224 public boolean isTabSwitcherVisible() { 228 public boolean isTabSwitcherVisible() {
225 return mTabModelWrapper != null && mTabModelWrapper.getParent() == mCont entViewHolder; 229 return mTabModelWrapper != null && mTabModelWrapper.getParent() == mCont entViewHolder;
226 } 230 }
227 231
228 /** 232 /**
(...skipping 16 matching lines...) Expand all
245 LoadUrlParams loadUrlParams = new LoadUrlParams(url); 249 LoadUrlParams loadUrlParams = new LoadUrlParams(url);
246 loadUrlParams.setTransitionType(PageTransition.TYPED | PageTransition.FR OM_ADDRESS_BAR); 250 loadUrlParams.setTransitionType(PageTransition.TYPED | PageTransition.FR OM_ADDRESS_BAR);
247 Tab tab = mTabModelSelector.getCurrentTab(); 251 Tab tab = mTabModelSelector.getCurrentTab();
248 if (tab != null) { 252 if (tab != null) {
249 tab.loadUrl(loadUrlParams); 253 tab.loadUrl(loadUrlParams);
250 return tab; 254 return tab;
251 } 255 }
252 return createTab(url, TabLaunchType.FROM_KEYBOARD); 256 return createTab(url, TabLaunchType.FROM_KEYBOARD);
253 } 257 }
254 } 258 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698