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 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
199 | 199 |
200 ExtensionHost* host = | 200 ExtensionHost* host = |
201 #if defined(OS_MACOSX) | 201 #if defined(OS_MACOSX) |
202 new ExtensionHostMac(extension, GetSiteInstanceForURL(url), url, | 202 new ExtensionHostMac(extension, GetSiteInstanceForURL(url), url, |
203 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); | 203 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); |
204 #else | 204 #else |
205 new ExtensionHost(extension, GetSiteInstanceForURL(url), url, | 205 new ExtensionHost(extension, GetSiteInstanceForURL(url), url, |
206 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); | 206 chrome::VIEW_TYPE_EXTENSION_BACKGROUND_PAGE); |
207 #endif | 207 #endif |
208 | 208 |
209 host->CreateRenderViewSoon(NULL); // create a RenderViewHost with no view | 209 host->CreateRenderViewSoon(); |
210 OnExtensionHostCreated(host, true); | 210 OnExtensionHostCreated(host, true); |
211 } | 211 } |
212 | 212 |
213 void ExtensionProcessManager::OpenOptionsPage(const Extension* extension, | 213 void ExtensionProcessManager::OpenOptionsPage(const Extension* extension, |
214 Browser* browser) { | 214 Browser* browser) { |
215 DCHECK(!extension->options_url().is_empty()); | 215 DCHECK(!extension->options_url().is_empty()); |
216 | 216 |
217 // Force the options page to open in non-OTR window, because it won't be | 217 // Force the options page to open in non-OTR window, because it won't be |
218 // able to save settings from OTR. | 218 // able to save settings from OTR. |
219 if (!browser || browser->profile()->IsOffTheRecord()) { | 219 if (!browser || browser->profile()->IsOffTheRecord()) { |
(...skipping 457 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
677 if (service && service->is_ready()) | 677 if (service && service->is_ready()) |
678 CreateBackgroundHostsForProfileStartup(this, service->extensions()); | 678 CreateBackgroundHostsForProfileStartup(this, service->extensions()); |
679 } | 679 } |
680 break; | 680 break; |
681 } | 681 } |
682 default: | 682 default: |
683 ExtensionProcessManager::Observe(type, source, details); | 683 ExtensionProcessManager::Observe(type, source, details); |
684 break; | 684 break; |
685 } | 685 } |
686 } | 686 } |
OLD | NEW |