| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "base/metrics/histogram.h" | 9 #include "base/metrics/histogram.h" |
| 10 #include "base/string_number_conversions.h" | 10 #include "base/string_number_conversions.h" |
| (...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 287 // able to save settings from OTR. | 287 // able to save settings from OTR. |
| 288 if (!browser || browser->profile()->IsOffTheRecord()) { | 288 if (!browser || browser->profile()->IsOffTheRecord()) { |
| 289 Profile* profile = GetProfile(); | 289 Profile* profile = GetProfile(); |
| 290 browser = browser::FindOrCreateTabbedBrowser(profile->GetOriginalProfile()); | 290 browser = browser::FindOrCreateTabbedBrowser(profile->GetOriginalProfile()); |
| 291 } | 291 } |
| 292 | 292 |
| 293 OpenURLParams params(extension->options_url(), Referrer(), SINGLETON_TAB, | 293 OpenURLParams params(extension->options_url(), Referrer(), SINGLETON_TAB, |
| 294 content::PAGE_TRANSITION_LINK, false); | 294 content::PAGE_TRANSITION_LINK, false); |
| 295 browser->OpenURL(params); | 295 browser->OpenURL(params); |
| 296 browser->window()->Show(); | 296 browser->window()->Show(); |
| 297 WebContents* web_contents = browser->GetSelectedWebContents(); | 297 WebContents* web_contents = browser->GetActiveWebContents(); |
| 298 web_contents->GetDelegate()->ActivateContents(web_contents); | 298 web_contents->GetDelegate()->ActivateContents(web_contents); |
| 299 } | 299 } |
| 300 | 300 |
| 301 ExtensionHost* ExtensionProcessManager::GetBackgroundHostForExtension( | 301 ExtensionHost* ExtensionProcessManager::GetBackgroundHostForExtension( |
| 302 const std::string& extension_id) { | 302 const std::string& extension_id) { |
| 303 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); | 303 for (ExtensionHostSet::iterator iter = background_hosts_.begin(); |
| 304 iter != background_hosts_.end(); ++iter) { | 304 iter != background_hosts_.end(); ++iter) { |
| 305 ExtensionHost* host = *iter; | 305 ExtensionHost* host = *iter; |
| 306 if (host->extension_id() == extension_id) | 306 if (host->extension_id() == extension_id) |
| 307 return host; | 307 return host; |
| (...skipping 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 775 if (service && service->is_ready()) | 775 if (service && service->is_ready()) |
| 776 CreateBackgroundHostsForProfileStartup(this, service->extensions()); | 776 CreateBackgroundHostsForProfileStartup(this, service->extensions()); |
| 777 } | 777 } |
| 778 break; | 778 break; |
| 779 } | 779 } |
| 780 default: | 780 default: |
| 781 ExtensionProcessManager::Observe(type, source, details); | 781 ExtensionProcessManager::Observe(type, source, details); |
| 782 break; | 782 break; |
| 783 } | 783 } |
| 784 } | 784 } |
| OLD | NEW |