summaryrefslogtreecommitdiffstats
path: root/chrome/browser/sidebar
diff options
context:
space:
mode:
authoraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-11 04:32:28 +0000
committeraa@chromium.org <aa@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-05-11 04:32:28 +0000
commit52836b694190e9deae90e4bfce2cced4545849f4 (patch)
tree48bbaa88a7533bd0d1c4699c92dec918a545a70b /chrome/browser/sidebar
parent8164ae1c8061f04a3da53ee01e7134ab540db66a (diff)
downloadchromium_src-52836b694190e9deae90e4bfce2cced4545849f4.zip
chromium_src-52836b694190e9deae90e4bfce2cced4545849f4.tar.gz
chromium_src-52836b694190e9deae90e4bfce2cced4545849f4.tar.bz2
Move ExtensionFunctionDispatcher to ExtensionTabHelper. This
sets the stage for us to expose certain extension functions to content scripts and normal web pages. This required two major structural changes: 1. Made EFD stateless, except for the pointer to its delegate. This is important to gracefully handle the case of a RVH navigating between different extensions or even to normal web content. Especially in the case of TabContents, where the entire RVH can be torn down and replaced during navigation. 2. Centralize all per-(extension, RVH) setup in ChromeContentBrowserClient::RenderViewCreated(). In particular, responsibility for enabling extension bindings was very spread out before, making it hard to follow when exactly they were enabled. BUG=80308 Review URL: http://codereview.chromium.org/6927076 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@84928 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/sidebar')
-rw-r--r--chrome/browser/sidebar/sidebar_container.cc14
1 files changed, 1 insertions, 13 deletions
diff --git a/chrome/browser/sidebar/sidebar_container.cc b/chrome/browser/sidebar/sidebar_container.cc
index 99c69a5..d1e4a33 100644
--- a/chrome/browser/sidebar/sidebar_container.cc
+++ b/chrome/browser/sidebar/sidebar_container.cc
@@ -1,4 +1,4 @@
-// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
@@ -16,7 +16,6 @@
#include "content/browser/tab_contents/navigation_entry.h"
#include "content/browser/tab_contents/tab_contents.h"
#include "content/browser/tab_contents/tab_contents_view.h"
-#include "content/common/bindings_policy.h"
#include "googleurl/src/gurl.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -32,17 +31,6 @@ SidebarContainer::SidebarContainer(TabContents* tab,
// Create TabContents for sidebar.
sidebar_contents_.reset(
new TabContents(tab->profile(), NULL, MSG_ROUTING_NONE, NULL, NULL));
- sidebar_contents_->render_view_host()->set_is_extension_process(true);
- const Extension* extension = GetExtension();
- if (extension && extension->is_app()) {
- ExtensionService* service = tab->profile()->GetExtensionService();
- if (service) {
- service->SetInstalledAppForRenderer(
- sidebar_contents_->render_view_host()->process()->id(), extension);
- }
- }
- sidebar_contents_->render_view_host()->AllowBindings(
- BindingsPolicy::EXTENSION);
sidebar_contents_->set_delegate(this);
}