| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 // Shim extension to provide permission request API (and possibly other future | 5 // Shim extension to provide permission request API (and possibly other future |
| 6 // experimental APIs) for <webview> tag. | 6 // experimental APIs) for <webview> tag. |
| 7 // See web_view.js for details. | 7 // See web_view.js for details. |
| 8 // | 8 // |
| 9 // We want to control the permission API feature in <webview> separately from | 9 // We want to control the permission API feature in <webview> separately from |
| 10 // the <webview> feature itself. <webview> is available in stable channel, but | 10 // the <webview> feature itself. <webview> is available in stable channel, but |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 webViewInternal.handleDialogEvent_(event, webViewEvent); | 23 webViewInternal.handleDialogEvent_(event, webViewEvent); |
| 24 }, | 24 }, |
| 25 evt: CreateEvent('webview.onDialog'), | 25 evt: CreateEvent('webview.onDialog'), |
| 26 fields: ['defaultPromptText', 'messageText', 'messageType', 'url'] | 26 fields: ['defaultPromptText', 'messageText', 'messageType', 'url'] |
| 27 } | 27 } |
| 28 }; | 28 }; |
| 29 | 29 |
| 30 /** | 30 /** |
| 31 * @private | 31 * @private |
| 32 */ | 32 */ |
| 33 WebViewInternal.prototype.maybeAttachWebRequestEventToWebview_ = | 33 WebViewInternal.prototype.maybeAttachWebRequestEventToObject_ = |
| 34 function(eventName, webRequestEvent) { | 34 function(obj, eventName, webRequestEvent) { |
| 35 Object.defineProperty( | 35 Object.defineProperty( |
| 36 this.webviewNode_, | 36 obj, |
| 37 eventName, | 37 eventName, |
| 38 { | 38 { |
| 39 get: webRequestEvent, | 39 get: webRequestEvent, |
| 40 enumerable: true | 40 enumerable: true |
| 41 } | 41 } |
| 42 ); | 42 ); |
| 43 }; | 43 }; |
| 44 | 44 |
| 45 /** | 45 /** |
| 46 * @private | 46 * @private |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 }; | 171 }; |
| 172 | 172 |
| 173 proto.isUserAgentOverridden = function() { | 173 proto.isUserAgentOverridden = function() { |
| 174 return this.internal_(secret).isUserAgentOverridden_(); | 174 return this.internal_(secret).isUserAgentOverridden_(); |
| 175 }; | 175 }; |
| 176 | 176 |
| 177 proto.setUserAgentOverride = function(userAgentOverride) { | 177 proto.setUserAgentOverride = function(userAgentOverride) { |
| 178 this.internal_(secret).setUserAgentOverride_(userAgentOverride); | 178 this.internal_(secret).setUserAgentOverride_(userAgentOverride); |
| 179 }; | 179 }; |
| 180 }; | 180 }; |
| OLD | NEW |