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

Side by Side Diff: extensions/renderer/resources/guest_view/extension_options/extension_options.js

Issue 1165773004: Extract the element implementation logic to function mods in <webview>. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@qui
Patch Set: fix comments Created 5 years, 6 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
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 var ExtensionOptionsConstants = 5 var ExtensionOptionsConstants =
6 require('extensionOptionsConstants').ExtensionOptionsConstants; 6 require('extensionOptionsConstants').ExtensionOptionsConstants;
7 var ExtensionOptionsEvents = 7 var ExtensionOptionsEvents =
8 require('extensionOptionsEvents').ExtensionOptionsEvents; 8 require('extensionOptionsEvents').ExtensionOptionsEvents;
9 var GuestViewContainer = require('guestViewContainer').GuestViewContainer; 9 var GuestViewContainer = require('guestViewContainer').GuestViewContainer;
10 10
(...skipping 23 matching lines...) Expand all
34 // Destroy the old guest if one exists. 34 // Destroy the old guest if one exists.
35 this.guest.destroy(); 35 this.guest.destroy();
36 36
37 this.guest.create(this.buildParams(), function() { 37 this.guest.create(this.buildParams(), function() {
38 if (!this.guest.getId()) { 38 if (!this.guest.getId()) {
39 // Fire a createfailed event here rather than in ExtensionOptionsGuest 39 // Fire a createfailed event here rather than in ExtensionOptionsGuest
40 // because the guest will not be created, and cannot fire an event. 40 // because the guest will not be created, and cannot fire an event.
41 var createFailedEvent = new Event('createfailed', { bubbles: true }); 41 var createFailedEvent = new Event('createfailed', { bubbles: true });
42 this.dispatchEvent(createFailedEvent); 42 this.dispatchEvent(createFailedEvent);
43 } else { 43 } else {
44 this.attachWindow(); 44 this.attachWindow$();
45 } 45 }
46 }.bind(this)); 46 }.bind(this));
47 }; 47 };
48 48
49 GuestViewContainer.registerElement(ExtensionOptionsImpl); 49 GuestViewContainer.registerElement(ExtensionOptionsImpl);
50 50
51 // Exports. 51 // Exports.
52 exports.ExtensionOptionsImpl = ExtensionOptionsImpl; 52 exports.ExtensionOptionsImpl = ExtensionOptionsImpl;
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698