Chromium Code Reviews| 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; |
| 11 import android.view.KeyEvent; | 11 import android.view.KeyEvent; |
| 12 import android.view.View; | 12 import android.view.View; |
| 13 import android.view.ViewGroup; | 13 import android.view.ViewGroup; |
| 14 import android.view.inputmethod.EditorInfo; | 14 import android.view.inputmethod.EditorInfo; |
| 15 import android.view.inputmethod.InputMethodManager; | 15 import android.view.inputmethod.InputMethodManager; |
| 16 import android.widget.EditText; | 16 import android.widget.EditText; |
| 17 import android.widget.FrameLayout; | 17 import android.widget.FrameLayout; |
| 18 import android.widget.ImageButton; | 18 import android.widget.ImageButton; |
| 19 import android.widget.LinearLayout; | 19 import android.widget.LinearLayout; |
| 20 import android.widget.TextView; | 20 import android.widget.TextView; |
| 21 import android.widget.TextView.OnEditorActionListener; | 21 import android.widget.TextView.OnEditorActionListener; |
| 22 | 22 |
| 23 import org.chromium.base.CalledByNative; | 23 import org.chromium.base.CalledByNative; |
| 24 import org.chromium.base.JNINamespace; | 24 import org.chromium.base.JNINamespace; |
| 25 import org.chromium.content.browser.ContentVideoView; | |
| 26 import org.chromium.content.browser.ContentView; | 25 import org.chromium.content.browser.ContentView; |
| 27 import org.chromium.content.browser.ContentViewClient; | 26 import org.chromium.content.browser.ContentViewClient; |
| 28 import org.chromium.content.browser.ContentViewCore; | 27 import org.chromium.content.browser.ContentViewCore; |
| 29 import org.chromium.content.browser.ContentViewRenderView; | 28 import org.chromium.content.browser.ContentViewRenderView; |
| 30 import org.chromium.content_public.browser.LoadUrlParams; | 29 import org.chromium.content_public.browser.LoadUrlParams; |
| 31 import org.chromium.content_public.browser.NavigationController; | 30 import org.chromium.content_public.browser.NavigationController; |
| 32 import org.chromium.content_public.browser.WebContents; | 31 import org.chromium.content_public.browser.WebContents; |
| 33 import org.chromium.ui.base.WindowAndroid; | 32 import org.chromium.ui.base.WindowAndroid; |
| 34 | 33 |
| 35 /** | 34 /** |
| (...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 removeCallbacks(mClearProgressRunnable); | 252 removeCallbacks(mClearProgressRunnable); |
| 254 mProgressDrawable.setLevel((int) (10000.0 * progress)); | 253 mProgressDrawable.setLevel((int) (10000.0 * progress)); |
| 255 if (progress == 1.0) postDelayed(mClearProgressRunnable, COMPLETED_PROGR ESS_TIMEOUT_MS); | 254 if (progress == 1.0) postDelayed(mClearProgressRunnable, COMPLETED_PROGR ESS_TIMEOUT_MS); |
| 256 } | 255 } |
| 257 | 256 |
| 258 @CalledByNative | 257 @CalledByNative |
| 259 private void toggleFullscreenModeForTab(boolean enterFullscreen) { | 258 private void toggleFullscreenModeForTab(boolean enterFullscreen) { |
| 260 mIsFullscreen = enterFullscreen; | 259 mIsFullscreen = enterFullscreen; |
| 261 LinearLayout toolBar = (LinearLayout) findViewById(R.id.toolbar); | 260 LinearLayout toolBar = (LinearLayout) findViewById(R.id.toolbar); |
| 262 toolBar.setVisibility(enterFullscreen ? GONE : VISIBLE); | 261 toolBar.setVisibility(enterFullscreen ? GONE : VISIBLE); |
| 263 | |
| 264 if (!mIsFullscreen) { | |
|
Ignacio Solla
2015/01/26 10:02:07
I think that org/chromium/chrome/browser/fullscree
Hugo Holgersson
2015/01/26 10:28:58
Done.
| |
| 265 ContentVideoView videoView = ContentVideoView.getContentVideoView(); | |
| 266 if (videoView != null) videoView.exitFullscreen(false); | |
| 267 } | |
| 268 } | 262 } |
| 269 | 263 |
| 270 @CalledByNative | 264 @CalledByNative |
| 271 private boolean isFullscreenForTabOrPending() { | 265 private boolean isFullscreenForTabOrPending() { |
| 272 return mIsFullscreen; | 266 return mIsFullscreen; |
| 273 } | 267 } |
| 274 | 268 |
| 275 @SuppressWarnings("unused") | 269 @SuppressWarnings("unused") |
| 276 @CalledByNative | 270 @CalledByNative |
| 277 private void setIsLoading(boolean loading) { | 271 private void setIsLoading(boolean loading) { |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 348 Context.INPUT_METHOD_SERVICE); | 342 Context.INPUT_METHOD_SERVICE); |
| 349 if (visible) { | 343 if (visible) { |
| 350 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT); | 344 imm.showSoftInput(mUrlTextView, InputMethodManager.SHOW_IMPLICIT); |
| 351 } else { | 345 } else { |
| 352 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0); | 346 imm.hideSoftInputFromWindow(mUrlTextView.getWindowToken(), 0); |
| 353 } | 347 } |
| 354 } | 348 } |
| 355 | 349 |
| 356 private static native void nativeCloseShell(long shellPtr); | 350 private static native void nativeCloseShell(long shellPtr); |
| 357 } | 351 } |
| OLD | NEW |