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.app.Activity; | 7 import android.app.Activity; |
| 8 import android.content.Context; | 8 import android.content.Context; |
| 9 import android.util.AttributeSet; | 9 import android.util.AttributeSet; |
| 10 import android.view.LayoutInflater; | 10 import android.view.LayoutInflater; |
| 11 import android.view.View; | 11 import android.view.View; |
| 12 import android.widget.FrameLayout; | 12 import android.widget.FrameLayout; |
| 13 | 13 |
| 14 import org.chromium.base.CalledByNative; | 14 import org.chromium.base.CalledByNative; |
| 15 import org.chromium.base.JNINamespace; | 15 import org.chromium.base.JNINamespace; |
| 16 import org.chromium.base.ThreadUtils; | 16 import org.chromium.base.ThreadUtils; |
| 17 import org.chromium.base.VisibleForTesting; | 17 import org.chromium.base.VisibleForTesting; |
| 18 import org.chromium.content.browser.ActivityContentVideoViewClient; | 18 import org.chromium.content.browser.ActivityContentVideoViewClient; |
| 19 import org.chromium.content.browser.ContentVideoViewClient; | 19 import org.chromium.content.browser.ContentVideoViewClient; |
| 20 import org.chromium.content.browser.ContentViewClient; | 20 import org.chromium.content.browser.ContentViewClient; |
| 21 import org.chromium.content.browser.ContentViewCore; | 21 import org.chromium.content.browser.ContentViewCore; |
| 22 import org.chromium.content.browser.ContentViewRenderView; | 22 import org.chromium.content.browser.ContentViewRenderView; |
| 23 import org.chromium.ui.base.WindowAndroid; | 23 import org.chromium.ui.base.WindowAndroid; |
| 24 | 24 |
| 25 /** | 25 /** |
| 26 * Container and generator of ShellViews. | 26 * Container and generator of ShellViews. |
| 27 */ | 27 */ |
| 28 @JNINamespace("content") | 28 @JNINamespace("content") |
| 29 public class ShellManager extends FrameLayout { | 29 public class ShellManager extends FrameLayout { |
| 30 | 30 public static final String DEFAULT_SHELL_URL = "http://jsbin.com/cikunu/2/qu iet"; |
|
jdduke (slow)
2015/04/24 16:57:23
Hmm, not sure about this change?
MuVen
2015/04/27 09:49:15
This is just for testing. Once feature is stabiliz
| |
| 31 public static final String DEFAULT_SHELL_URL = "http://www.google.com"; | |
| 32 private static boolean sStartup = true; | 31 private static boolean sStartup = true; |
| 33 private WindowAndroid mWindow; | 32 private WindowAndroid mWindow; |
| 34 private Shell mActiveShell; | 33 private Shell mActiveShell; |
| 35 | 34 |
| 36 private String mStartupUrl = DEFAULT_SHELL_URL; | 35 private String mStartupUrl = DEFAULT_SHELL_URL; |
| 37 | 36 |
| 38 // The target for all content rendering. | 37 // The target for all content rendering. |
| 39 private ContentViewRenderView mContentViewRenderView; | 38 private ContentViewRenderView mContentViewRenderView; |
| 40 private ContentViewClient mContentViewClient; | 39 private ContentViewClient mContentViewClient; |
| 41 | 40 |
| (...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 if (shellView.getParent() == null) return; | 173 if (shellView.getParent() == null) return; |
| 175 ContentViewCore contentViewCore = shellView.getContentViewCore(); | 174 ContentViewCore contentViewCore = shellView.getContentViewCore(); |
| 176 if (contentViewCore != null) contentViewCore.onHide(); | 175 if (contentViewCore != null) contentViewCore.onHide(); |
| 177 shellView.setContentViewRenderView(null); | 176 shellView.setContentViewRenderView(null); |
| 178 removeView(shellView); | 177 removeView(shellView); |
| 179 } | 178 } |
| 180 | 179 |
| 181 private static native void nativeInit(Object shellManagerInstance); | 180 private static native void nativeInit(Object shellManagerInstance); |
| 182 private static native void nativeLaunchShell(String url); | 181 private static native void nativeLaunchShell(String url); |
| 183 } | 182 } |
| OLD | NEW |