OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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.util.AttributeSet; | 8 import android.util.AttributeSet; |
9 import android.view.LayoutInflater; | 9 import android.view.LayoutInflater; |
10 import android.view.Surface; | 10 import android.view.Surface; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 } | 58 } |
59 | 59 |
60 /** | 60 /** |
61 * @param window The window used to generate all shells. | 61 * @param window The window used to generate all shells. |
62 */ | 62 */ |
63 public void setWindow(NativeWindow window) { | 63 public void setWindow(NativeWindow window) { |
64 mWindow = window; | 64 mWindow = window; |
65 } | 65 } |
66 | 66 |
67 /** | 67 /** |
| 68 * @return The window used to generate all shells. |
| 69 */ |
| 70 public NativeWindow getWindow() { |
| 71 return mWindow; |
| 72 } |
| 73 |
| 74 /** |
68 * Sets the startup URL for new shell windows. | 75 * Sets the startup URL for new shell windows. |
69 */ | 76 */ |
70 public void setStartupUrl(String url) { | 77 public void setStartupUrl(String url) { |
71 mStartupUrl = url; | 78 mStartupUrl = url; |
72 } | 79 } |
73 | 80 |
74 /** | 81 /** |
75 * @return The currently visible shell view or null if one is not showing. | 82 * @return The currently visible shell view or null if one is not showing. |
76 */ | 83 */ |
77 protected Shell getActiveShell() { | 84 protected Shell getActiveShell() { |
(...skipping 29 matching lines...) Expand all Loading... |
107 | 114 |
108 return shellView; | 115 return shellView; |
109 } | 116 } |
110 | 117 |
111 private static native void nativeInit(Object shellManagerInstance); | 118 private static native void nativeInit(Object shellManagerInstance); |
112 private static native void nativeLaunchShell(String url); | 119 private static native void nativeLaunchShell(String url); |
113 private static native void nativeSurfaceCreated(Surface surface); | 120 private static native void nativeSurfaceCreated(Surface surface); |
114 private static native void nativeSurfaceDestroyed(); | 121 private static native void nativeSurfaceDestroyed(); |
115 private static native void nativeSurfaceSetSize(int width, int height); | 122 private static native void nativeSurfaceSetSize(int width, int height); |
116 } | 123 } |
OLD | NEW |