| OLD | NEW |
| 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 316 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 327 return mContentViewCore.getContainerView(); | 327 return mContentViewCore.getContainerView(); |
| 328 } | 328 } |
| 329 | 329 |
| 330 /** | 330 /** |
| 331 * @return The {@link ContentViewCore} currently managing the view shown by
this Shell. | 331 * @return The {@link ContentViewCore} currently managing the view shown by
this Shell. |
| 332 */ | 332 */ |
| 333 public ContentViewCore getContentViewCore() { | 333 public ContentViewCore getContentViewCore() { |
| 334 return mContentViewCore; | 334 return mContentViewCore; |
| 335 } | 335 } |
| 336 | 336 |
| 337 /** |
| 338 * @return The {@link WebContents} currently managing the content shown by t
his Shell. |
| 339 */ |
| 340 public WebContents getWebContents() { |
| 341 return mWebContents; |
| 342 } |
| 343 |
| 337 private void setKeyboardVisibilityForUrl(boolean visible) { | 344 private void setKeyboardVisibilityForUrl(boolean visible) { |
| 338 InputMethodManager imm = (InputMethodManager) getContext().getSystemServ
ice( | 345 InputMethodManager imm = (InputMethodManager) getContext().getSystemServ
ice( |
| 339 Context.INPUT_METHOD_SERVICE); | 346 Context.INPUT_METHOD_SERVICE); |
| 340 if (visible) { | 347 if (visible) { |
| 341 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT); | 348 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT); |
| 342 } else { | 349 } else { |
| 343 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0); | 350 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0); |
| 344 } | 351 } |
| 345 } | 352 } |
| 346 | 353 |
| 347 private static native void nativeCloseShell(long shellPtr); | 354 private static native void nativeCloseShell(long shellPtr); |
| 348 } | 355 } |
| OLD | NEW |