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 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 // Implemented when the experimental API is available. | 159 // Implemented when the experimental API is available. |
160 WebViewInternal.maybeRegisterExperimentalAPIs = function(proto) {} | 160 WebViewInternal.maybeRegisterExperimentalAPIs = function(proto) {} |
161 | 161 |
162 /** | 162 /** |
163 * @constructor | 163 * @constructor |
164 */ | 164 */ |
165 function WebViewInternal(webviewNode) { | 165 function WebViewInternal(webviewNode) { |
166 privates(webviewNode).internal = this; | 166 privates(webviewNode).internal = this; |
167 this.webviewNode = webviewNode; | 167 this.webviewNode = webviewNode; |
168 this.browserPluginNode = this.createBrowserPluginNode(); | 168 this.browserPluginNode = this.createBrowserPluginNode(); |
169 var shadowRoot = this.webviewNode.webkitCreateShadowRoot(); | 169 var shadowRoot = this.webviewNode.createShadowRoot(); |
170 shadowRoot.appendChild(this.browserPluginNode); | 170 shadowRoot.appendChild(this.browserPluginNode); |
171 | 171 |
172 this.setupWebviewNodeAttributes(); | 172 this.setupWebviewNodeAttributes(); |
173 this.setupFocusPropagation(); | 173 this.setupFocusPropagation(); |
174 this.setupWebviewNodeProperties(); | 174 this.setupWebviewNodeProperties(); |
175 this.setupWebviewNodeEvents(); | 175 this.setupWebviewNodeEvents(); |
176 } | 176 } |
177 | 177 |
178 /** | 178 /** |
179 * @private | 179 * @private |
(...skipping 981 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1161 | 1161 |
1162 /** | 1162 /** |
1163 * Implemented when the experimental API is available. | 1163 * Implemented when the experimental API is available. |
1164 * @private | 1164 * @private |
1165 */ | 1165 */ |
1166 WebViewInternal.prototype.setupExperimentalContextMenus_ = function() {}; | 1166 WebViewInternal.prototype.setupExperimentalContextMenus_ = function() {}; |
1167 | 1167 |
1168 exports.WebView = WebView; | 1168 exports.WebView = WebView; |
1169 exports.WebViewInternal = WebViewInternal; | 1169 exports.WebViewInternal = WebViewInternal; |
1170 exports.CreateEvent = CreateEvent; | 1170 exports.CreateEvent = CreateEvent; |
OLD | NEW |