Chromium Code Reviews| 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 15 matching lines...) Expand all Loading... | |
| 26 webViewInternal.handleDialogEvent_(event, webViewEvent); | 26 webViewInternal.handleDialogEvent_(event, webViewEvent); |
| 27 }, | 27 }, |
| 28 evt: CreateEvent('webview.onDialog'), | 28 evt: CreateEvent('webview.onDialog'), |
| 29 fields: ['defaultPromptText', 'messageText', 'messageType', 'url'] | 29 fields: ['defaultPromptText', 'messageText', 'messageType', 'url'] |
| 30 } | 30 } |
| 31 }; | 31 }; |
| 32 | 32 |
| 33 /** | 33 /** |
| 34 * @private | 34 * @private |
| 35 */ | 35 */ |
| 36 WebViewInternal.prototype.maybeAttachWebRequestEventToWebview_ = | 36 WebViewInternal.prototype.maybeAttachWebRequestEventToWebview_ = |
|
lazyboy
2013/11/04 23:16:01
The function name should be changed to maybeAttach
Fady Samuel
2013/11/05 19:53:01
Done.
| |
| 37 function(eventName, webRequestEvent) { | 37 function(obj, eventName, webRequestEvent) { |
| 38 Object.defineProperty( | 38 Object.defineProperty( |
| 39 this.webviewNode_, | 39 obj, |
| 40 eventName, | 40 eventName, |
| 41 { | 41 { |
| 42 get: webRequestEvent, | 42 get: webRequestEvent, |
| 43 enumerable: true | 43 enumerable: true |
| 44 } | 44 } |
| 45 ); | 45 ); |
| 46 }; | 46 }; |
| 47 | 47 |
| 48 /** | 48 /** |
| 49 * @private | 49 * @private |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 174 }; | 174 }; |
| 175 | 175 |
| 176 proto.isUserAgentOverridden = function() { | 176 proto.isUserAgentOverridden = function() { |
| 177 return this.internal_(secret).isUserAgentOverridden_(); | 177 return this.internal_(secret).isUserAgentOverridden_(); |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 proto.setUserAgentOverride = function(userAgentOverride) { | 180 proto.setUserAgentOverride = function(userAgentOverride) { |
| 181 this.internal_(secret).setUserAgentOverride_(userAgentOverride); | 181 this.internal_(secret).setUserAgentOverride_(userAgentOverride); |
| 182 }; | 182 }; |
| 183 }; | 183 }; |
| OLD | NEW |