| 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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 212 | 212 |
| 213 // Force the options page to open in non-OTR window, because it won't be | 213 // Force the options page to open in non-OTR window, because it won't be |
| 214 // able to save settings from OTR. | 214 // able to save settings from OTR. |
| 215 if (!browser || browser->profile()->IsOffTheRecord()) { | 215 if (!browser || browser->profile()->IsOffTheRecord()) { |
| 216 Profile* profile = | 216 Profile* profile = |
| 217 Profile::FromBrowserContext(browsing_instance_->browser_context()); | 217 Profile::FromBrowserContext(browsing_instance_->browser_context()); |
| 218 browser = Browser::GetOrCreateTabbedBrowser(profile->GetOriginalProfile()); | 218 browser = Browser::GetOrCreateTabbedBrowser(profile->GetOriginalProfile()); |
| 219 } | 219 } |
| 220 | 220 |
| 221 browser->OpenURL(extension->options_url(), GURL(), SINGLETON_TAB, | 221 browser->OpenURL(extension->options_url(), GURL(), SINGLETON_TAB, |
| 222 PageTransition::LINK); | 222 content::PAGE_TRANSITION_LINK); |
| 223 browser->window()->Show(); | 223 browser->window()->Show(); |
| 224 static_cast<RenderViewHostDelegate*>(browser->GetSelectedTabContents())-> | 224 static_cast<RenderViewHostDelegate*>(browser->GetSelectedTabContents())-> |
| 225 Activate(); | 225 Activate(); |
| 226 } | 226 } |
| 227 | 227 |
| 228 ExtensionHost* ExtensionProcessManager::GetBackgroundHostForExtension( | 228 ExtensionHost* ExtensionProcessManager::GetBackgroundHostForExtension( |
| 229 const Extension* extension) { | 229 const Extension* extension) { |
| 230 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); | 230 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); |
| 231 iter != background_hosts_.end(); ++iter) { | 231 iter != background_hosts_.end(); ++iter) { |
| 232 ExtensionHost* host = *iter; | 232 ExtensionHost* host = *iter; |
| (...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 591 if (service && service->is_ready()) | 591 if (service && service->is_ready()) |
| 592 CreateBackgroundHostsForProfileStartup(this, service->extensions()); | 592 CreateBackgroundHostsForProfileStartup(this, service->extensions()); |
| 593 } | 593 } |
| 594 break; | 594 break; |
| 595 } | 595 } |
| 596 default: | 596 default: |
| 597 ExtensionProcessManager::Observe(type, source, details); | 597 ExtensionProcessManager::Observe(type, source, details); |
| 598 break; | 598 break; |
| 599 } | 599 } |
| 600 } | 600 } |
| OLD | NEW |