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

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

Issue 130893004: [Android] Remove assert as it uses a non-API backwards compatible function. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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 | « 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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
97 */ 97 */
98 public void close() { 98 public void close() {
99 if (mNativeShell == 0) return; 99 if (mNativeShell == 0) return;
100 nativeCloseShell(mNativeShell); 100 nativeCloseShell(mNativeShell);
101 } 101 }
102 102
103 @CalledByNative 103 @CalledByNative
104 private void onNativeDestroyed() { 104 private void onNativeDestroyed() {
105 mWindow = null; 105 mWindow = null;
106 mNativeShell = 0; 106 mNativeShell = 0;
107 assert !mContentView.isAttachedToWindow()
108 : "Attempting to destroy the content view while attached to the view hierarchy.";
109 mContentView.destroy(); 107 mContentView.destroy();
110 } 108 }
111 109
112 /** 110 /**
113 * @return Whether the Shell has been destroyed. 111 * @return Whether the Shell has been destroyed.
114 * @see #onNativeDestroyed() 112 * @see #onNativeDestroyed()
115 */ 113 */
116 public boolean isDestroyed() { 114 public boolean isDestroyed() {
117 return mNativeShell == 0; 115 return mNativeShell == 0;
118 } 116 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
269 Context.INPUT_METHOD_SERVICE); 267 Context.INPUT_METHOD_SERVICE);
270 if (visible) { 268 if (visible) {
271 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT); 269 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT);
272 } else { 270 } else {
273 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0); 271 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0);
274 } 272 }
275 } 273 }
276 274
277 private static native void nativeCloseShell(long shellPtr); 275 private static native void nativeCloseShell(long shellPtr);
278 } 276 }
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