| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 "chrome/browser/extensions/extension_service.h" | 5 #include "chrome/browser/extensions/extension_service.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <iterator> | 8 #include <iterator> |
| 9 #include <set> | 9 #include <set> |
| 10 | 10 |
| (...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 #include "chrome/common/child_process_logging.h" | 73 #include "chrome/common/child_process_logging.h" |
| 74 #include "chrome/common/chrome_switches.h" | 74 #include "chrome/common/chrome_switches.h" |
| 75 #include "chrome/common/chrome_version_info.h" | 75 #include "chrome/common/chrome_version_info.h" |
| 76 #include "chrome/common/extensions/background_info.h" | 76 #include "chrome/common/extensions/background_info.h" |
| 77 #include "chrome/common/extensions/extension.h" | 77 #include "chrome/common/extensions/extension.h" |
| 78 #include "chrome/common/extensions/extension_constants.h" | 78 #include "chrome/common/extensions/extension_constants.h" |
| 79 #include "chrome/common/extensions/extension_file_util.h" | 79 #include "chrome/common/extensions/extension_file_util.h" |
| 80 #include "chrome/common/extensions/extension_manifest_constants.h" | 80 #include "chrome/common/extensions/extension_manifest_constants.h" |
| 81 #include "chrome/common/extensions/extension_messages.h" | 81 #include "chrome/common/extensions/extension_messages.h" |
| 82 #include "chrome/common/extensions/feature_switch.h" | 82 #include "chrome/common/extensions/feature_switch.h" |
| 83 #include "chrome/common/extensions/features/feature.h" | 83 #include "chrome/common/extensions/features/feature_channel.h" |
| 84 #include "chrome/common/extensions/incognito_handler.h" | 84 #include "chrome/common/extensions/incognito_handler.h" |
| 85 #include "chrome/common/extensions/manifest.h" | 85 #include "chrome/common/extensions/manifest.h" |
| 86 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" | 86 #include "chrome/common/extensions/manifest_handlers/app_isolation_info.h" |
| 87 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" | 87 #include "chrome/common/extensions/manifest_handlers/app_launch_info.h" |
| 88 #include "chrome/common/extensions/manifest_handlers/shared_module_info.h" | 88 #include "chrome/common/extensions/manifest_handlers/shared_module_info.h" |
| 89 #include "chrome/common/extensions/manifest_url_handler.h" | 89 #include "chrome/common/extensions/manifest_url_handler.h" |
| 90 #include "chrome/common/extensions/permissions/permissions_data.h" | 90 #include "chrome/common/extensions/permissions/permissions_data.h" |
| 91 #include "chrome/common/extensions/sync_helper.h" | 91 #include "chrome/common/extensions/sync_helper.h" |
| 92 #include "chrome/common/pref_names.h" | 92 #include "chrome/common/pref_names.h" |
| 93 #include "chrome/common/startup_metric_utils.h" | 93 #include "chrome/common/startup_metric_utils.h" |
| (...skipping 2714 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2808 case content::NOTIFICATION_RENDERER_PROCESS_CREATED: { | 2808 case content::NOTIFICATION_RENDERER_PROCESS_CREATED: { |
| 2809 content::RenderProcessHost* process = | 2809 content::RenderProcessHost* process = |
| 2810 content::Source<content::RenderProcessHost>(source).ptr(); | 2810 content::Source<content::RenderProcessHost>(source).ptr(); |
| 2811 Profile* host_profile = | 2811 Profile* host_profile = |
| 2812 Profile::FromBrowserContext(process->GetBrowserContext()); | 2812 Profile::FromBrowserContext(process->GetBrowserContext()); |
| 2813 if (!profile_->IsSameProfile(host_profile->GetOriginalProfile())) | 2813 if (!profile_->IsSameProfile(host_profile->GetOriginalProfile())) |
| 2814 break; | 2814 break; |
| 2815 | 2815 |
| 2816 // Extensions need to know the channel for API restrictions. | 2816 // Extensions need to know the channel for API restrictions. |
| 2817 process->Send(new ExtensionMsg_SetChannel( | 2817 process->Send(new ExtensionMsg_SetChannel( |
| 2818 extensions::Feature::GetCurrentChannel())); | 2818 extensions::GetCurrentChannel())); |
| 2819 | 2819 |
| 2820 // Platform apps need to know the system font. | 2820 // Platform apps need to know the system font. |
| 2821 scoped_ptr<base::DictionaryValue> fonts(new base::DictionaryValue); | 2821 scoped_ptr<base::DictionaryValue> fonts(new base::DictionaryValue); |
| 2822 webui::SetFontAndTextDirection(fonts.get()); | 2822 webui::SetFontAndTextDirection(fonts.get()); |
| 2823 std::string font_family, font_size; | 2823 std::string font_family, font_size; |
| 2824 fonts->GetString("fontfamily", &font_family); | 2824 fonts->GetString("fontfamily", &font_family); |
| 2825 fonts->GetString("fontsize", &font_size); | 2825 fonts->GetString("fontsize", &font_size); |
| 2826 process->Send(new ExtensionMsg_SetSystemFont( | 2826 process->Send(new ExtensionMsg_SetSystemFont( |
| 2827 font_family, font_size)); | 2827 font_family, font_size)); |
| 2828 | 2828 |
| (...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3151 } | 3151 } |
| 3152 | 3152 |
| 3153 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { | 3153 void ExtensionService::AddUpdateObserver(extensions::UpdateObserver* observer) { |
| 3154 update_observers_.AddObserver(observer); | 3154 update_observers_.AddObserver(observer); |
| 3155 } | 3155 } |
| 3156 | 3156 |
| 3157 void ExtensionService::RemoveUpdateObserver( | 3157 void ExtensionService::RemoveUpdateObserver( |
| 3158 extensions::UpdateObserver* observer) { | 3158 extensions::UpdateObserver* observer) { |
| 3159 update_observers_.RemoveObserver(observer); | 3159 update_observers_.RemoveObserver(observer); |
| 3160 } | 3160 } |
| OLD | NEW |