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 "chrome/utility/chrome_content_utility_client.h" | 5 #include "chrome/utility/chrome_content_utility_client.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/files/file_path.h" | 8 #include "base/files/file_path.h" |
9 #include "base/json/json_reader.h" | 9 #include "base/json/json_reader.h" |
10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
(...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
159 | 159 |
160 return handled; | 160 return handled; |
161 } | 161 } |
162 | 162 |
163 // static | 163 // static |
164 void ChromeContentUtilityClient::PreSandboxStartup() { | 164 void ChromeContentUtilityClient::PreSandboxStartup() { |
165 #if defined(ENABLE_EXTENSIONS) | 165 #if defined(ENABLE_EXTENSIONS) |
166 extensions::ExtensionsHandler::PreSandboxStartup(); | 166 extensions::ExtensionsHandler::PreSandboxStartup(); |
167 #endif | 167 #endif |
168 | 168 |
| 169 #if defined(ENABLE_PRINT_PREVIEW) || defined(OS_WIN) |
| 170 PrintingHandler::PreSandboxStartup(); |
| 171 #endif |
| 172 |
169 #if defined(ENABLE_MDNS) | 173 #if defined(ENABLE_MDNS) |
170 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 174 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
171 switches::kUtilityProcessEnableMDns)) { | 175 switches::kUtilityProcessEnableMDns)) { |
172 local_discovery::ServiceDiscoveryMessageHandler::PreSandboxStartup(); | 176 local_discovery::ServiceDiscoveryMessageHandler::PreSandboxStartup(); |
173 } | 177 } |
174 #endif // ENABLE_MDNS | 178 #endif // ENABLE_MDNS |
175 } | 179 } |
176 | 180 |
177 // static | 181 // static |
178 SkBitmap ChromeContentUtilityClient::DecodeImage( | 182 SkBitmap ChromeContentUtilityClient::DecodeImage( |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
344 const std::string& mime_type, int64 total_size, bool get_attached_images) { | 348 const std::string& mime_type, int64 total_size, bool get_attached_images) { |
345 // Only one IPCDataSource may be created and added to the list of handlers. | 349 // Only one IPCDataSource may be created and added to the list of handlers. |
346 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); | 350 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); |
347 handlers_.push_back(source); | 351 handlers_.push_back(source); |
348 | 352 |
349 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( | 353 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( |
350 source, mime_type, get_attached_images); | 354 source, mime_type, get_attached_images); |
351 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); | 355 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); |
352 } | 356 } |
353 #endif | 357 #endif |
OLD | NEW |