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

Unified Diff: chrome/renderer/resources/extensions/extension_options.js

Issue 453613002: Implement support for <extensionoptions> embedding in WebUI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 side-by-side diff with in-line comments
Download patch
Index: chrome/renderer/resources/extensions/extension_options.js
diff --git a/chrome/renderer/resources/extensions/extension_options.js b/chrome/renderer/resources/extensions/extension_options.js
index b459db7c136663deaba18a4427ad5c8edec157db..2d992da1865b3b18ac620fd9efd7f03e4c4024af 100644
--- a/chrome/renderer/resources/extensions/extension_options.js
+++ b/chrome/renderer/resources/extensions/extension_options.js
@@ -57,6 +57,7 @@ ExtensionOptionsInternal.prototype.createGuest = function() {
var params = {
'extensionId': this.extensionId,
};
+
GuestViewInternal.createGuest(
'extensionoptions',
params,
@@ -129,7 +130,9 @@ ExtensionOptionsInternal.prototype.init = function() {
return;
this.initCalled = true;
+
this.browserPluginNode = this.createBrowserPluginNode();
+
var shadowRoot = this.extensionoptionsNode.createShadowRoot();
shadowRoot.appendChild(this.browserPluginNode);
this.createGuest();
@@ -142,13 +145,8 @@ ExtensionOptionsInternal.prototype.onSizeChanged = function(width, height) {
ExtensionOptionsInternal.prototype.parseExtensionAttribute = function() {
if (this.extensionoptionsNode.hasAttribute('extension')) {
- var extensionId = this.extensionoptionsNode.getAttribute('extension');
- // Only allow extensions to embed their own options page (if it has one).
not at google - send to devlin 2014/08/07 23:06:03 was this security check important? because now the
ericzeng 2014/08/08 00:23:47 No, the checks will be unnecessary when I rebase o
- if (chrome.runtime.id == extensionId &&
- chrome.runtime.getManifest().hasOwnProperty('options_page')) {
- this.extensionId = extensionId;
- return true;
- }
+ this.extensionId = this.extensionoptionsNode.getAttribute('extension');
+ return true;
}
return false;
};

Powered by Google App Engine
This is Rietveld 408576698