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 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
332 | 332 |
333 return result; | 333 return result; |
334 } | 334 } |
335 | 335 |
336 const Extension* ExtensionProcessManager::GetExtensionForRenderViewHost( | 336 const Extension* ExtensionProcessManager::GetExtensionForRenderViewHost( |
337 content::RenderViewHost* render_view_host) { | 337 content::RenderViewHost* render_view_host) { |
338 if (!render_view_host->GetSiteInstance()) | 338 if (!render_view_host->GetSiteInstance()) |
339 return NULL; | 339 return NULL; |
340 | 340 |
341 ExtensionService* service = | 341 ExtensionService* service = |
342 ExtensionSystem::Get(GetProfile())->extension_service(); | 342 extensions::ExtensionSystem::Get(GetProfile())->extension_service(); |
343 return service->extensions()->GetByID(GetExtensionID(render_view_host)); | 343 return service->extensions()->GetByID(GetExtensionID(render_view_host)); |
344 } | 344 } |
345 | 345 |
346 void ExtensionProcessManager::RegisterRenderViewHost( | 346 void ExtensionProcessManager::RegisterRenderViewHost( |
347 RenderViewHost* render_view_host, | 347 RenderViewHost* render_view_host, |
348 const Extension* extension) { | 348 const Extension* extension) { |
349 all_extension_views_[render_view_host] = chrome::VIEW_TYPE_INVALID; | 349 all_extension_views_[render_view_host] = chrome::VIEW_TYPE_INVALID; |
350 } | 350 } |
351 | 351 |
352 void ExtensionProcessManager::UnregisterRenderViewHost( | 352 void ExtensionProcessManager::UnregisterRenderViewHost( |
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
779 if (service && service->is_ready()) | 779 if (service && service->is_ready()) |
780 CreateBackgroundHostsForProfileStartup(this, service->extensions()); | 780 CreateBackgroundHostsForProfileStartup(this, service->extensions()); |
781 } | 781 } |
782 break; | 782 break; |
783 } | 783 } |
784 default: | 784 default: |
785 ExtensionProcessManager::Observe(type, source, details); | 785 ExtensionProcessManager::Observe(type, source, details); |
786 break; | 786 break; |
787 } | 787 } |
788 } | 788 } |
OLD | NEW |