| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "extensions/browser/renderer_startup_helper.h" | 5 #include "extensions/browser/renderer_startup_helper.h" |
| 6 | 6 |
| 7 #include "base/debug/dump_without_crashing.h" | 7 #include "base/debug/dump_without_crashing.h" |
| 8 #include "base/stl_util.h" | 8 #include "base/stl_util.h" |
| 9 #include "base/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 96 // We only send the ActivityLoggingEnabled message if it is enabled; otherwise | 96 // We only send the ActivityLoggingEnabled message if it is enabled; otherwise |
| 97 // the default (not enabled) is correct. | 97 // the default (not enabled) is correct. |
| 98 if (activity_logging_enabled) { | 98 if (activity_logging_enabled) { |
| 99 process->Send( | 99 process->Send( |
| 100 new ExtensionMsg_SetActivityLoggingEnabled(activity_logging_enabled)); | 100 new ExtensionMsg_SetActivityLoggingEnabled(activity_logging_enabled)); |
| 101 } | 101 } |
| 102 | 102 |
| 103 // Extensions need to know the channel and the session type for API | 103 // Extensions need to know the channel and the session type for API |
| 104 // restrictions. The values are sent to all renderers, as the non-extension | 104 // restrictions. The values are sent to all renderers, as the non-extension |
| 105 // renderers may have content scripts. | 105 // renderers may have content scripts. |
| 106 process->Send(new ExtensionMsg_SetSessionInfo( | 106 bool is_lock_screen_context = |
| 107 GetCurrentChannel(), GetCurrentFeatureSessionType())); | 107 client->IsLockScreenContext(process->GetBrowserContext()); |
| 108 process->Send(new ExtensionMsg_SetSessionInfo(GetCurrentChannel(), |
| 109 GetCurrentFeatureSessionType(), |
| 110 is_lock_screen_context)); |
| 108 | 111 |
| 109 // Platform apps need to know the system font. | 112 // Platform apps need to know the system font. |
| 110 // TODO(dbeam): this is not the system font in all cases. | 113 // TODO(dbeam): this is not the system font in all cases. |
| 111 process->Send(new ExtensionMsg_SetSystemFont(webui::GetFontFamily(), | 114 process->Send(new ExtensionMsg_SetSystemFont(webui::GetFontFamily(), |
| 112 webui::GetFontSize())); | 115 webui::GetFontSize())); |
| 113 | 116 |
| 114 // Scripting whitelist. This is modified by tests and must be communicated | 117 // Scripting whitelist. This is modified by tests and must be communicated |
| 115 // to renderers. | 118 // to renderers. |
| 116 process->Send(new ExtensionMsg_SetScriptingWhitelist( | 119 process->Send(new ExtensionMsg_SetScriptingWhitelist( |
| 117 extensions::ExtensionsClient::Get()->GetScriptingWhitelist())); | 120 extensions::ExtensionsClient::Get()->GetScriptingWhitelist())); |
| (...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 296 BrowserContext* context) const { | 299 BrowserContext* context) const { |
| 297 // Redirected in incognito. | 300 // Redirected in incognito. |
| 298 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); | 301 return ExtensionsBrowserClient::Get()->GetOriginalContext(context); |
| 299 } | 302 } |
| 300 | 303 |
| 301 bool RendererStartupHelperFactory::ServiceIsCreatedWithBrowserContext() const { | 304 bool RendererStartupHelperFactory::ServiceIsCreatedWithBrowserContext() const { |
| 302 return true; | 305 return true; |
| 303 } | 306 } |
| 304 | 307 |
| 305 } // namespace extensions | 308 } // namespace extensions |
| OLD | NEW |