| OLD | NEW |
| 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 Loading... |
| 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(); | 203 host->CreateRenderViewSoon(NULL); // create a RenderViewHost with no view |
| 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 Loading... |
| 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 } |
| OLD | NEW |