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 /** | 5 /** |
6 * @param {WebView} webView Web View tag. | 6 * @param {WebView} webView Web View tag. |
7 * @param {number} width Width of the CWS widget. | 7 * @param {number} width Width of the CWS widget. |
8 * @param {number} height Height of the CWS widget. | 8 * @param {number} height Height of the CWS widget. |
9 * @param {string} url Share Url for an entry. | 9 * @param {string} url Share Url for an entry. |
10 * @param {string} target Target (scheme + host + port) of the widget. | 10 * @param {string} target Target (scheme + host + port) of the widget. |
11 * @param {Object<*>} options Options to be sent to the dialog host. | 11 * @param {Object<*>} options Options to be sent to the dialog host. |
12 * @param {!CWSWidgetContainer.PlatformDelegate} delegate Delegate for accessing | 12 * @param {!CWSWidgetContainerPlatformDelegate} delegate Delegate for accessing |
13 * Chrome platform APIs. | 13 * Chrome platform APIs. |
14 * @constructor | 14 * @constructor |
15 * @extends {cr.EventTarget} | 15 * @extends {cr.EventTarget} |
16 */ | 16 */ |
17 function CWSContainerClient(webView, width, height, url, target, options, | 17 function CWSContainerClient(webView, width, height, url, target, options, |
18 delegate) { | 18 delegate) { |
19 /** @private {!CWSWidgetContainer.PlatformDelegate} */ | 19 /** @private {!CWSWidgetContainerPlatformDelegate} */ |
20 this.delegate_ = delegate; | 20 this.delegate_ = delegate; |
21 this.webView_ = webView; | 21 this.webView_ = webView; |
22 this.width_ = width; | 22 this.width_ = width; |
23 this.height_ = height; | 23 this.height_ = height; |
24 this.url_ = url; | 24 this.url_ = url; |
25 this.target_ = target; | 25 this.target_ = target; |
26 this.options_ = options; | 26 this.options_ = options; |
27 | 27 |
28 this.loaded_ = false; | 28 this.loaded_ = false; |
29 this.loading_ = false; | 29 this.loading_ = false; |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 'loadabort', this.onLoadAbortBound_); | 274 'loadabort', this.onLoadAbortBound_); |
275 this.webView_.stop(); | 275 this.webView_.stop(); |
276 }; | 276 }; |
277 | 277 |
278 /** | 278 /** |
279 * Cleans the dialog by removing all handlers. | 279 * Cleans the dialog by removing all handlers. |
280 */ | 280 */ |
281 CWSContainerClient.prototype.dispose = function() { | 281 CWSContainerClient.prototype.dispose = function() { |
282 this.abort(); | 282 this.abort(); |
283 }; | 283 }; |
OLD | NEW |