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

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

Issue 6880089: Don't hold the installed app in BrowserProcessRenderHost, since that's in content layer now. Ext... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix browser tests Created 9 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/memory/singleton.h" 9 #include "base/memory/singleton.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 did_stop_loading_(false), 128 did_stop_loading_(false),
129 document_element_available_(false), 129 document_element_available_(false),
130 url_(url), 130 url_(url),
131 extension_host_type_(host_type), 131 extension_host_type_(host_type),
132 associated_tab_contents_(NULL), 132 associated_tab_contents_(NULL),
133 suppress_javascript_messages_(false) { 133 suppress_javascript_messages_(false) {
134 render_view_host_ = new RenderViewHost(site_instance, this, MSG_ROUTING_NONE, 134 render_view_host_ = new RenderViewHost(site_instance, this, MSG_ROUTING_NONE,
135 NULL); 135 NULL);
136 render_view_host_->set_is_extension_process(true); 136 render_view_host_->set_is_extension_process(true);
137 if (extension->is_app()) { 137 if (extension->is_app()) {
138 BrowserRenderProcessHost* process = static_cast<BrowserRenderProcessHost*>( 138 profile()->GetExtensionService()->SetInstalledAppForRenderer(
139 render_view_host_->process()); 139 render_view_host_->process()->id(), extension);
140 process->set_installed_app(extension);
141 } 140 }
142 render_view_host_->AllowBindings(BindingsPolicy::EXTENSION); 141 render_view_host_->AllowBindings(BindingsPolicy::EXTENSION);
143 if (enable_dom_automation_) 142 if (enable_dom_automation_)
144 render_view_host_->AllowBindings(BindingsPolicy::DOM_AUTOMATION); 143 render_view_host_->AllowBindings(BindingsPolicy::DOM_AUTOMATION);
145 144
146 // Listen for when the render process' handle is available so we can add it 145 // Listen for when the render process' handle is available so we can add it
147 // to the task manager then. 146 // to the task manager then.
148 registrar_.Add(this, NotificationType::RENDERER_PROCESS_CREATED, 147 registrar_.Add(this, NotificationType::RENDERER_PROCESS_CREATED,
149 Source<RenderProcessHost>(render_process_host())); 148 Source<RenderProcessHost>(render_process_host()));
150 // Listen for when an extension is unloaded from the same profile, as it may 149 // Listen for when an extension is unloaded from the same profile, as it may
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after
833 return window_id; 832 return window_id;
834 } 833 }
835 834
836 void ExtensionHost::OnRunFileChooser( 835 void ExtensionHost::OnRunFileChooser(
837 const ViewHostMsg_RunFileChooser_Params& params) { 836 const ViewHostMsg_RunFileChooser_Params& params) {
838 if (file_select_helper_.get() == NULL) 837 if (file_select_helper_.get() == NULL)
839 file_select_helper_.reset(new FileSelectHelper(profile())); 838 file_select_helper_.reset(new FileSelectHelper(profile()));
840 file_select_helper_->RunFileChooser(render_view_host_, 839 file_select_helper_->RunFileChooser(render_view_host_,
841 associated_tab_contents(), params); 840 associated_tab_contents(), params);
842 } 841 }
OLDNEW
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/extensions/extension_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698