OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_public.browser; | 5 package org.chromium.content_public.browser; |
6 | 6 |
| 7 import android.content.Context; |
| 8 |
7 /** | 9 /** |
8 * The WebContents Java wrapper to allow communicating with the native WebConten
ts object. | 10 * The WebContents Java wrapper to allow communicating with the native WebConten
ts object. |
9 */ | 11 */ |
10 public interface WebContents { | 12 public interface WebContents { |
11 /** | 13 /** |
12 * @return The navigation controller associated with this WebContents. | 14 * @return The navigation controller associated with this WebContents. |
13 */ | 15 */ |
14 NavigationController getNavigationController(); | 16 NavigationController getNavigationController(); |
15 | 17 |
16 /** | 18 /** |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 * If a result is required, pass in a callback. | 158 * If a result is required, pass in a callback. |
157 * | 159 * |
158 * @param script The Javascript to execute. | 160 * @param script The Javascript to execute. |
159 * @param callback The callback to be fired off when a result is ready. The
script's | 161 * @param callback The callback to be fired off when a result is ready. The
script's |
160 * result will be json encoded and passed as the parameter,
and the call | 162 * result will be json encoded and passed as the parameter,
and the call |
161 * will be made on the main thread. | 163 * will be made on the main thread. |
162 * If no result is required, pass null. | 164 * If no result is required, pass null. |
163 */ | 165 */ |
164 public void evaluateJavaScript(String script, JavaScriptCallback callback); | 166 public void evaluateJavaScript(String script, JavaScriptCallback callback); |
165 | 167 |
| 168 /** |
| 169 * Sets the Context for this WebContents |
| 170 * @param context The Context to be set in WebContents. |
| 171 */ |
| 172 public void setContext(Context context); |
| 173 |
| 174 /** |
| 175 * Gets the Context of this WebContents |
| 176 * @return The Context of this WebContents. |
| 177 */ |
| 178 public Context getContext(); |
166 } | 179 } |
OLD | NEW |