| 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 // This module implements Webview (<webview>) as a custom element that wraps a | 5 // This module implements Webview (<webview>) as a custom element that wraps a |
| 6 // BrowserPlugin object element. The object element is hidden within | 6 // BrowserPlugin object element. The object element is hidden within |
| 7 // the shadow DOM of the Webview element. | 7 // the shadow DOM of the Webview element. |
| 8 | 8 |
| 9 var DocumentNatives = requireNative('document_natives'); | 9 var DocumentNatives = requireNative('document_natives'); |
| 10 var EventBindings = require('event_bindings'); | 10 var EventBindings = require('event_bindings'); |
| (...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 308 if (!this.instanceId) { | 308 if (!this.instanceId) { |
| 309 throw new Error(ERROR_MSG_CANNOT_INJECT_SCRIPT); | 309 throw new Error(ERROR_MSG_CANNOT_INJECT_SCRIPT); |
| 310 } | 310 } |
| 311 }; | 311 }; |
| 312 | 312 |
| 313 /** | 313 /** |
| 314 * @private | 314 * @private |
| 315 */ | 315 */ |
| 316 WebViewInternal.prototype.executeScript = function(var_args) { | 316 WebViewInternal.prototype.executeScript = function(var_args) { |
| 317 this.validateExecuteCodeCall(); | 317 this.validateExecuteCodeCall(); |
| 318 var args = $Array.concat([this.instanceId], $Array.slice(arguments)); | 318 var args = $Array.concat([this.instanceId, this.src], |
| 319 $Array.slice(arguments)); |
| 319 $Function.apply(WebView.executeScript, null, args); | 320 $Function.apply(WebView.executeScript, null, args); |
| 320 }; | 321 }; |
| 321 | 322 |
| 322 /** | 323 /** |
| 323 * @private | 324 * @private |
| 324 */ | 325 */ |
| 325 WebViewInternal.prototype.insertCSS = function(var_args) { | 326 WebViewInternal.prototype.insertCSS = function(var_args) { |
| 326 this.validateExecuteCodeCall(); | 327 this.validateExecuteCodeCall(); |
| 327 var args = $Array.concat([this.instanceId], $Array.slice(arguments)); | 328 var args = $Array.concat([this.instanceId], $Array.slice(arguments)); |
| 328 $Function.apply(WebView.insertCSS, null, args); | 329 $Function.apply(WebView.insertCSS, null, args); |
| (...skipping 848 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1177 | 1178 |
| 1178 /** | 1179 /** |
| 1179 * Implemented when the experimental API is available. | 1180 * Implemented when the experimental API is available. |
| 1180 * @private | 1181 * @private |
| 1181 */ | 1182 */ |
| 1182 WebViewInternal.prototype.setupExperimentalContextMenus_ = function() {}; | 1183 WebViewInternal.prototype.setupExperimentalContextMenus_ = function() {}; |
| 1183 | 1184 |
| 1184 exports.WebView = WebView; | 1185 exports.WebView = WebView; |
| 1185 exports.WebViewInternal = WebViewInternal; | 1186 exports.WebViewInternal = WebViewInternal; |
| 1186 exports.CreateEvent = CreateEvent; | 1187 exports.CreateEvent = CreateEvent; |
| OLD | NEW |