diff options
Diffstat (limited to 'chrome/browser/sidebar/sidebar_container.cc')
-rw-r--r-- | chrome/browser/sidebar/sidebar_container.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/chrome/browser/sidebar/sidebar_container.cc b/chrome/browser/sidebar/sidebar_container.cc index d1e4a33..99c69a5 100644 --- a/chrome/browser/sidebar/sidebar_container.cc +++ b/chrome/browser/sidebar/sidebar_container.cc @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 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,6 +16,7 @@ #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" @@ -31,6 +32,17 @@ 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); } |