| 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 878 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 889 ); | 889 ); |
| 890 this.maybeAttachWebRequestEventToObject(this.webviewNode, | 890 this.maybeAttachWebRequestEventToObject(this.webviewNode, |
| 891 WebRequestSchema.events[i].name, | 891 WebRequestSchema.events[i].name, |
| 892 webRequestEvent); | 892 webRequestEvent); |
| 893 } | 893 } |
| 894 Object.defineProperty( | 894 Object.defineProperty( |
| 895 this.webviewNode, | 895 this.webviewNode, |
| 896 'request', | 896 'request', |
| 897 { | 897 { |
| 898 value: request, | 898 value: request, |
| 899 enumerable: true, | 899 enumerable: true |
| 900 writable: false | |
| 901 } | 900 } |
| 902 ); | 901 ); |
| 903 }; | 902 }; |
| 904 | 903 |
| 905 /** @private */ | 904 /** @private */ |
| 906 WebViewInternal.prototype.getUserAgent = function() { | 905 WebViewInternal.prototype.getUserAgent = function() { |
| 907 return this.userAgentOverride || navigator.userAgent; | 906 return this.userAgentOverride || navigator.userAgent; |
| 908 }; | 907 }; |
| 909 | 908 |
| 910 /** @private */ | 909 /** @private */ |
| (...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1076 | 1075 |
| 1077 /** | 1076 /** |
| 1078 * Implemented when the experimental API is available. | 1077 * Implemented when the experimental API is available. |
| 1079 * @private | 1078 * @private |
| 1080 */ | 1079 */ |
| 1081 WebViewInternal.prototype.setupExperimentalContextMenus_ = function() {}; | 1080 WebViewInternal.prototype.setupExperimentalContextMenus_ = function() {}; |
| 1082 | 1081 |
| 1083 exports.WebView = WebView; | 1082 exports.WebView = WebView; |
| 1084 exports.WebViewInternal = WebViewInternal; | 1083 exports.WebViewInternal = WebViewInternal; |
| 1085 exports.CreateEvent = CreateEvent; | 1084 exports.CreateEvent = CreateEvent; |
| OLD | NEW |