Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: chrome/browser/resources/file_manager/js/share_dialog.js

Issue 22828010: Migrate from using deprecated api in webview in Files.app. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 'use strict'; 5 'use strict';
6 6
7 /** 7 /**
8 * @param {HTMLElement} parentNode Node to be parent for this dialog. 8 * @param {HTMLElement} parentNode Node to be parent for this dialog.
9 * @constructor 9 * @constructor
10 * @extends {cr.ui.dialogs.BaseDialog} 10 * @extends {cr.ui.dialogs.BaseDialog}
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 * @param {function()} callback Completion callback. 49 * @param {function()} callback Completion callback.
50 */ 50 */
51 ShareDialog.WebViewAuthorizer.prototype.initialize = function(callback) { 51 ShareDialog.WebViewAuthorizer.prototype.initialize = function(callback) {
52 if (this.initialized_) { 52 if (this.initialized_) {
53 callback(); 53 callback();
54 return; 54 return;
55 } 55 }
56 56
57 var registerInjectionHooks = function() { 57 var registerInjectionHooks = function() {
58 this.webView_.removeEventListener('loadstop', registerInjectionHooks); 58 this.webView_.removeEventListener('loadstop', registerInjectionHooks);
59 this.webView_.onBeforeSendHeaders.addListener( 59 this.webView_.request.onBeforeSendHeaders.addListener(
60 this.authorizeRequest_.bind(this), 60 this.authorizeRequest_.bind(this),
61 {urls: [this.urlPattern_]}, 61 {urls: [this.urlPattern_]},
62 ['blocking', 'requestHeaders']); 62 ['blocking', 'requestHeaders']);
63 this.initialized_ = true; 63 this.initialized_ = true;
64 callback(); 64 callback();
65 }.bind(this); 65 }.bind(this);
66 66
67 this.webView_.addEventListener('loadstop', registerInjectionHooks); 67 this.webView_.addEventListener('loadstop', registerInjectionHooks);
68 this.webView_.setAttribute('src', 'data:text/html,'); 68 this.webView_.setAttribute('src', 'data:text/html,');
69 }; 69 };
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 }.bind(this)); 264 }.bind(this));
265 }; 265 };
266 266
267 /** 267 /**
268 * Tells whether the share dialog is being shown or not. 268 * Tells whether the share dialog is being shown or not.
269 * @return {boolean} True if shown, false otherwise. 269 * @return {boolean} True if shown, false otherwise.
270 */ 270 */
271 ShareDialog.prototype.isShowing = function() { 271 ShareDialog.prototype.isShowing = function() {
272 return this.container_.classList.contains('shown'); 272 return this.container_.classList.contains('shown');
273 }; 273 };
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698