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

Side by Side Diff: content/shell/android/java/src/org/chromium/content_shell/Shell.java

Issue 14821004: [Android] Remove "Chrome" and "View" personalities (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Update findbugs Created 7 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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.content_shell; 5 package org.chromium.content_shell;
6 6
7 import android.content.Context; 7 import android.content.Context;
8 import android.graphics.drawable.ClipDrawable; 8 import android.graphics.drawable.ClipDrawable;
9 import android.text.TextUtils; 9 import android.text.TextUtils;
10 import android.util.AttributeSet; 10 import android.util.AttributeSet;
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 mLoading = loading; 209 mLoading = loading;
210 } 210 }
211 211
212 /** 212 /**
213 * Initializes the ContentView based on the native tab contents pointer pass ed in. 213 * Initializes the ContentView based on the native tab contents pointer pass ed in.
214 * @param nativeTabContents The pointer to the native tab contents object. 214 * @param nativeTabContents The pointer to the native tab contents object.
215 */ 215 */
216 @SuppressWarnings("unused") 216 @SuppressWarnings("unused")
217 @CalledByNative 217 @CalledByNative
218 private void initFromNativeTabContents(int nativeTabContents) { 218 private void initFromNativeTabContents(int nativeTabContents) {
219 mContentView = ContentView.newInstance( 219 mContentView = ContentView.newInstance(getContext(), nativeTabContents, mWindow);
220 getContext(), nativeTabContents, mWindow, ContentView.PERSONALIT Y_CHROME);
221 if (mContentView.getUrl() != null) mUrlTextView.setText(mContentView.get Url()); 220 if (mContentView.getUrl() != null) mUrlTextView.setText(mContentView.get Url());
222 ((FrameLayout) findViewById(R.id.contentview_holder)).addView(mContentVi ew, 221 ((FrameLayout) findViewById(R.id.contentview_holder)).addView(mContentVi ew,
223 new FrameLayout.LayoutParams( 222 new FrameLayout.LayoutParams(
224 FrameLayout.LayoutParams.MATCH_PARENT, 223 FrameLayout.LayoutParams.MATCH_PARENT,
225 FrameLayout.LayoutParams.MATCH_PARENT)); 224 FrameLayout.LayoutParams.MATCH_PARENT));
226 mContentView.requestFocus(); 225 mContentView.requestFocus();
227 mContentViewRenderView.setCurrentContentView(mContentView); 226 mContentViewRenderView.setCurrentContentView(mContentView);
228 } 227 }
229 228
230 /** 229 /**
231 * @return The {@link ContentView} currently shown by this Shell. 230 * @return The {@link ContentView} currently shown by this Shell.
232 */ 231 */
233 public ContentView getContentView() { 232 public ContentView getContentView() {
234 return mContentView; 233 return mContentView;
235 } 234 }
236 235
237 private void setKeyboardVisibilityForUrl(boolean visible) { 236 private void setKeyboardVisibilityForUrl(boolean visible) {
238 InputMethodManager imm = (InputMethodManager) getContext().getSystemServ ice( 237 InputMethodManager imm = (InputMethodManager) getContext().getSystemServ ice(
239 Context.INPUT_METHOD_SERVICE); 238 Context.INPUT_METHOD_SERVICE);
240 if (visible) { 239 if (visible) {
241 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT); 240 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT);
242 } else { 241 } else {
243 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0); 242 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0);
244 } 243 }
245 } 244 }
246 } 245 }
OLDNEW
« no previous file with comments | « content/public/android/java/src/org/chromium/content/browser/JellyBeanContentView.java ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698