summaryrefslogtreecommitdiffstats
path: root/chrome/browser/extensions
diff options
context:
space:
mode:
authorcindylau@google.com <cindylau@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-25 23:32:23 +0000
committercindylau@google.com <cindylau@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2010-08-25 23:32:23 +0000
commit4528428b696fac9d394843801a49a47dd5d83ed8 (patch)
tree7fdf745095df13db956b1c0c0196a71ee405878b /chrome/browser/extensions
parentd6bb25638cf9f841b00f627460101044fed63c50 (diff)
downloadchromium_src-4528428b696fac9d394843801a49a47dd5d83ed8.zip
chromium_src-4528428b696fac9d394843801a49a47dd5d83ed8.tar.gz
chromium_src-4528428b696fac9d394843801a49a47dd5d83ed8.tar.bz2
Add external host binding permission for Extension DOMUI.
Committing for skare@google.com, original change at http://codereview.chromium.org/3074002/show . BUG=none TEST=none Review URL: http://codereview.chromium.org/3189022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@57417 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/extensions')
-rw-r--r--chrome/browser/extensions/extension_dom_ui.cc6
1 files changed, 5 insertions, 1 deletions
diff --git a/chrome/browser/extensions/extension_dom_ui.cc b/chrome/browser/extensions/extension_dom_ui.cc
index a91933f..fe9df6e 100644
--- a/chrome/browser/extensions/extension_dom_ui.cc
+++ b/chrome/browser/extensions/extension_dom_ui.cc
@@ -20,6 +20,7 @@
#include "chrome/browser/renderer_host/render_widget_host_view.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/common/bindings_policy.h"
+#include "chrome/common/chrome_switches.h"
#include "chrome/common/page_transition_types.h"
#include "chrome/common/extensions/extension.h"
#include "chrome/common/extensions/extension_constants.h"
@@ -123,7 +124,10 @@ ExtensionDOMUI::ExtensionDOMUI(TabContents* tab_contents)
: DOMUI(tab_contents) {
should_hide_url_ = true;
bindings_ = BindingsPolicy::EXTENSION;
-
+ // Bind externalHost to Extension DOMUI loaded in Chrome Frame.
+ const CommandLine& browser_command_line = *CommandLine::ForCurrentProcess();
+ if (browser_command_line.HasSwitch(switches::kChromeFrame))
+ bindings_ |= BindingsPolicy::EXTERNAL_HOST;
// For chrome:// overrides, some of the defaults are a little different.
GURL url = tab_contents->GetURL();
if (url.SchemeIs(chrome::kChromeUIScheme) &&