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

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

Issue 59673007: Android: moves content/ to use long for JNI. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 | Annotate | Revision Log
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 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
208 private void setIsLoading(boolean loading) { 208 private void setIsLoading(boolean loading) {
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(long nativeTabContents) {
219 mContentView = ContentView.newInstance(getContext(), nativeTabContents, mWindow); 219 mContentView = ContentView.newInstance(getContext(), nativeTabContents, mWindow);
220 if (mContentView.getUrl() != null) mUrlTextView.setText(mContentView.get Url()); 220 if (mContentView.getUrl() != null) mUrlTextView.setText(mContentView.get Url());
221 ((FrameLayout) findViewById(R.id.contentview_holder)).addView(mContentVi ew, 221 ((FrameLayout) findViewById(R.id.contentview_holder)).addView(mContentVi ew,
222 new FrameLayout.LayoutParams( 222 new FrameLayout.LayoutParams(
223 FrameLayout.LayoutParams.MATCH_PARENT, 223 FrameLayout.LayoutParams.MATCH_PARENT,
224 FrameLayout.LayoutParams.MATCH_PARENT)); 224 FrameLayout.LayoutParams.MATCH_PARENT));
225 mContentView.requestFocus(); 225 mContentView.requestFocus();
226 mContentViewRenderView.setCurrentContentView(mContentView); 226 mContentViewRenderView.setCurrentContentView(mContentView);
227 } 227 }
228 228
229 /** 229 /**
230 * @return The {@link ContentView} currently shown by this Shell. 230 * @return The {@link ContentView} currently shown by this Shell.
231 */ 231 */
232 public ContentView getContentView() { 232 public ContentView getContentView() {
233 return mContentView; 233 return mContentView;
234 } 234 }
235 235
236 private void setKeyboardVisibilityForUrl(boolean visible) { 236 private void setKeyboardVisibilityForUrl(boolean visible) {
237 InputMethodManager imm = (InputMethodManager) getContext().getSystemServ ice( 237 InputMethodManager imm = (InputMethodManager) getContext().getSystemServ ice(
238 Context.INPUT_METHOD_SERVICE); 238 Context.INPUT_METHOD_SERVICE);
239 if (visible) { 239 if (visible) {
240 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT); 240 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT);
241 } else { 241 } else {
242 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0); 242 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0);
243 } 243 }
244 } 244 }
245 } 245 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698