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

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

Issue 8587001: Have ExtensionHost use TabContents instead of RenderViewHost. Try #3. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 1 month 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 "base/bind.h" 5 #include "base/bind.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "chrome/browser/extensions/extension_process_manager.h" 7 #include "chrome/browser/extensions/extension_process_manager.h"
8 8
9 #include "chrome/browser/ui/browser_window.h" 9 #include "chrome/browser/ui/browser_window.h"
10 #include "content/browser/browsing_instance.h" 10 #include "content/browser/browsing_instance.h"
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after
193 193
194 ExtensionHost* host = 194 ExtensionHost* host =
195 #if defined(OS_MACOSX) 195 #if defined(OS_MACOSX)
196 new ExtensionHostMac(extension, GetSiteInstanceForURL(url), url, 196 new ExtensionHostMac(extension, GetSiteInstanceForURL(url), url,
197 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); 197 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE);
198 #else 198 #else
199 new ExtensionHost(extension, GetSiteInstanceForURL(url), url, 199 new ExtensionHost(extension, GetSiteInstanceForURL(url), url,
200 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); 200 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE);
201 #endif 201 #endif
202 202
203 host->CreateRenderViewSoon(NULL); // create a RenderViewHost with no view 203 host->CreateRenderViewSoon();
204 OnExtensionHostCreated(host, true); 204 OnExtensionHostCreated(host, true);
205 } 205 }
206 206
207 void ExtensionProcessManager::OpenOptionsPage(const Extension* extension, 207 void ExtensionProcessManager::OpenOptionsPage(const Extension* extension,
208 Browser* browser) { 208 Browser* browser) {
209 DCHECK(!extension->options_url().is_empty()); 209 DCHECK(!extension->options_url().is_empty());
210 210
211 // Force the options page to open in non-OTR window, because it won't be 211 // Force the options page to open in non-OTR window, because it won't be
212 // able to save settings from OTR. 212 // able to save settings from OTR.
213 if (!browser || browser->profile()->IsOffTheRecord()) { 213 if (!browser || browser->profile()->IsOffTheRecord()) {
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
490 if (service && service->is_ready()) 490 if (service && service->is_ready())
491 CreateBackgroundHostsForProfileStartup(this, service->extensions()); 491 CreateBackgroundHostsForProfileStartup(this, service->extensions());
492 } 492 }
493 break; 493 break;
494 } 494 }
495 default: 495 default:
496 ExtensionProcessManager::Observe(type, source, details); 496 ExtensionProcessManager::Observe(type, source, details);
497 break; 497 break;
498 } 498 }
499 } 499 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698