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

Side by Side Diff: chrome/browser/extensions/extension_host.cc

Issue 1627024: Add ExtensionFunctionDispatcher::Delegate::GetAssociatedTabContents (Closed)
Patch Set: cr changes Created 10 years, 8 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
OLDNEW
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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 #include "chrome/browser/extensions/extension_host.h" 5 #include "chrome/browser/extensions/extension_host.h"
6 6
7 #include <list> 7 #include <list>
8 8
9 #include "app/l10n_util.h" 9 #include "app/l10n_util.h"
10 #include "app/resource_bundle.h" 10 #include "app/resource_bundle.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 //////////////// 119 ////////////////
120 // ExtensionHost 120 // ExtensionHost
121 121
122 ExtensionHost::ExtensionHost(Extension* extension, SiteInstance* site_instance, 122 ExtensionHost::ExtensionHost(Extension* extension, SiteInstance* site_instance,
123 const GURL& url, ViewType::Type host_type) 123 const GURL& url, ViewType::Type host_type)
124 : extension_(extension), 124 : extension_(extension),
125 profile_(site_instance->browsing_instance()->profile()), 125 profile_(site_instance->browsing_instance()->profile()),
126 did_stop_loading_(false), 126 did_stop_loading_(false),
127 document_element_available_(false), 127 document_element_available_(false),
128 url_(url), 128 url_(url),
129 extension_host_type_(host_type) { 129 extension_host_type_(host_type),
130 associated_tab_contents_(NULL) {
130 int64 session_storage_namespace_id = profile_->GetWebKitContext()-> 131 int64 session_storage_namespace_id = profile_->GetWebKitContext()->
131 dom_storage_context()->AllocateSessionStorageNamespaceId(); 132 dom_storage_context()->AllocateSessionStorageNamespaceId();
132 render_view_host_ = new RenderViewHost(site_instance, this, MSG_ROUTING_NONE, 133 render_view_host_ = new RenderViewHost(site_instance, this, MSG_ROUTING_NONE,
133 session_storage_namespace_id); 134 session_storage_namespace_id);
134 render_view_host_->AllowBindings(BindingsPolicy::EXTENSION); 135 render_view_host_->AllowBindings(BindingsPolicy::EXTENSION);
135 if (enable_dom_automation_) 136 if (enable_dom_automation_)
136 render_view_host_->AllowBindings(BindingsPolicy::DOM_AUTOMATION); 137 render_view_host_->AllowBindings(BindingsPolicy::DOM_AUTOMATION);
137 138
138 // Listen for when the render process' handle is available so we can add it 139 // Listen for when the render process' handle is available so we can add it
139 // to the task manager then. 140 // to the task manager then.
(...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after
715 // Extensions hosted in ExternalTabContainer objects may not have 716 // Extensions hosted in ExternalTabContainer objects may not have
716 // an associated browser. 717 // an associated browser.
717 Browser* browser = GetBrowser(); 718 Browser* browser = GetBrowser();
718 if (browser) 719 if (browser)
719 window_id = ExtensionTabUtil::GetWindowId(browser); 720 window_id = ExtensionTabUtil::GetWindowId(browser);
720 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) { 721 } else if (extension_host_type_ != ViewType::EXTENSION_BACKGROUND_PAGE) {
721 NOTREACHED(); 722 NOTREACHED();
722 } 723 }
723 return window_id; 724 return window_id;
724 } 725 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/extension_host.h ('k') | chrome/browser/extensions/extension_infobar_delegate.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698