| 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; |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 } | 92 } |
| 93 | 93 |
| 94 /** | 94 /** |
| 95 * @return The window used to generate all shells. | 95 * @return The window used to generate all shells. |
| 96 */ | 96 */ |
| 97 public WindowAndroid getWindow() { | 97 public WindowAndroid getWindow() { |
| 98 return mWindow; | 98 return mWindow; |
| 99 } | 99 } |
| 100 | 100 |
| 101 /** | 101 /** |
| 102 * Get the ContentViewRenderView. |
| 103 */ |
| 104 public ContentViewRenderView getContentViewRenderView() { |
| 105 return mContentViewRenderView; |
| 106 } |
| 107 |
| 108 /** |
| 102 * Sets the startup URL for new shell windows. | 109 * Sets the startup URL for new shell windows. |
| 103 */ | 110 */ |
| 104 public void setStartupUrl(String url) { | 111 public void setStartupUrl(String url) { |
| 105 mStartupUrl = url; | 112 mStartupUrl = url; |
| 106 } | 113 } |
| 107 | 114 |
| 108 /** | 115 /** |
| 109 * @return The currently visible shell view or null if one is not showing. | 116 * @return The currently visible shell view or null if one is not showing. |
| 110 */ | 117 */ |
| 111 public Shell getActiveShell() { | 118 public Shell getActiveShell() { |
| (...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 if (shellView.getParent() == null) return; | 173 if (shellView.getParent() == null) return; |
| 167 ContentViewCore contentViewCore = shellView.getContentViewCore(); | 174 ContentViewCore contentViewCore = shellView.getContentViewCore(); |
| 168 if (contentViewCore != null) contentViewCore.onHide(); | 175 if (contentViewCore != null) contentViewCore.onHide(); |
| 169 shellView.setContentViewRenderView(null); | 176 shellView.setContentViewRenderView(null); |
| 170 removeView(shellView); | 177 removeView(shellView); |
| 171 } | 178 } |
| 172 | 179 |
| 173 private static native void nativeInit(Object shellManagerInstance); | 180 private static native void nativeInit(Object shellManagerInstance); |
| 174 private static native void nativeLaunchShell(String url); | 181 private static native void nativeLaunchShell(String url); |
| 175 } | 182 } |
| OLD | NEW |