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

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

Issue 929453002: <webview> + <extensionview>: Create a maybeHandleMutation call into attributes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « no previous file | extensions/renderer/resources/guest_view/extension_view_attributes.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 the ExtensionView <extensionview>. 5 // This module implements the ExtensionView <extensionview>.
6 6
7 var GuestViewContainer = require('guestViewContainer').GuestViewContainer; 7 var GuestViewContainer = require('guestViewContainer').GuestViewContainer;
8 var ExtensionViewConstants = 8 var ExtensionViewConstants =
9 require('extensionViewConstants').ExtensionViewConstants; 9 require('extensionViewConstants').ExtensionViewConstants;
10 var ExtensionViewInternal = 10 var ExtensionViewInternal =
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 return params; 45 return params;
46 }; 46 };
47 47
48 // This observer monitors mutations to attributes of the <extensionview>. 48 // This observer monitors mutations to attributes of the <extensionview>.
49 ExtensionViewImpl.prototype.handleAttributeMutation = function( 49 ExtensionViewImpl.prototype.handleAttributeMutation = function(
50 attributeName, oldValue, newValue) { 50 attributeName, oldValue, newValue) {
51 if (!this.attributes[attributeName]) 51 if (!this.attributes[attributeName])
52 return; 52 return;
53 53
54 // Let the changed attribute handle its own mutation; 54 // Let the changed attribute handle its own mutation;
55 this.attributes[attributeName].handleMutation(oldValue, newValue); 55 this.attributes[attributeName].maybeHandleMutation(oldValue, newValue);
56 }; 56 };
57 57
58 ExtensionViewImpl.prototype.onElementDetached = function() { 58 ExtensionViewImpl.prototype.onElementDetached = function() {
59 this.guest.destroy(); 59 this.guest.destroy();
60 this.attributes[ExtensionViewConstants.ATTRIBUTE_SRC].reset(); 60 this.attributes[ExtensionViewConstants.ATTRIBUTE_SRC].reset();
61 }; 61 };
62 62
63 GuestViewContainer.registerElement(ExtensionViewImpl); 63 GuestViewContainer.registerElement(ExtensionViewImpl);
64 64
65 // Exports. 65 // Exports.
66 exports.ExtensionViewImpl = ExtensionViewImpl; 66 exports.ExtensionViewImpl = ExtensionViewImpl;
OLDNEW
« no previous file with comments | « no previous file | extensions/renderer/resources/guest_view/extension_view_attributes.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698