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/memory/ref_counted.h" | 9 #include "base/memory/ref_counted.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
(...skipping 12 matching lines...) Expand all Loading... |
23 #include "third_party/skia/include/core/SkBitmap.h" | 23 #include "third_party/skia/include/core/SkBitmap.h" |
24 #include "third_party/zlib/google/zip.h" | 24 #include "third_party/zlib/google/zip.h" |
25 #include "ui/gfx/codec/jpeg_codec.h" | 25 #include "ui/gfx/codec/jpeg_codec.h" |
26 #include "ui/gfx/size.h" | 26 #include "ui/gfx/size.h" |
27 | 27 |
28 #if !defined(OS_ANDROID) | 28 #if !defined(OS_ANDROID) |
29 #include "chrome/utility/profile_import_handler.h" | 29 #include "chrome/utility/profile_import_handler.h" |
30 #endif | 30 #endif |
31 | 31 |
32 #if defined(OS_WIN) | 32 #if defined(OS_WIN) |
33 #include "chrome/utility/font_cache_handler_win.h" | |
34 #include "chrome/utility/shell_handler_win.h" | 33 #include "chrome/utility/shell_handler_win.h" |
35 #endif | 34 #endif |
36 | 35 |
37 #if defined(ENABLE_EXTENSIONS) | 36 #if defined(ENABLE_EXTENSIONS) |
38 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" | 37 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" |
39 #include "chrome/utility/extensions/extensions_handler.h" | 38 #include "chrome/utility/extensions/extensions_handler.h" |
40 #include "chrome/utility/image_writer/image_writer_handler.h" | 39 #include "chrome/utility/image_writer/image_writer_handler.h" |
41 #include "chrome/utility/media_galleries/ipc_data_source.h" | 40 #include "chrome/utility/media_galleries/ipc_data_source.h" |
42 #include "chrome/utility/media_galleries/media_metadata_parser.h" | 41 #include "chrome/utility/media_galleries/media_metadata_parser.h" |
43 #endif | 42 #endif |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 92 |
94 #if defined(ENABLE_MDNS) | 93 #if defined(ENABLE_MDNS) |
95 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 94 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
96 switches::kUtilityProcessEnableMDns)) { | 95 switches::kUtilityProcessEnableMDns)) { |
97 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); | 96 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); |
98 } | 97 } |
99 #endif | 98 #endif |
100 | 99 |
101 #if defined(OS_WIN) | 100 #if defined(OS_WIN) |
102 handlers_.push_back(new ShellHandler()); | 101 handlers_.push_back(new ShellHandler()); |
103 handlers_.push_back(new FontCacheHandler()); | |
104 #endif | 102 #endif |
105 } | 103 } |
106 | 104 |
107 ChromeContentUtilityClient::~ChromeContentUtilityClient() { | 105 ChromeContentUtilityClient::~ChromeContentUtilityClient() { |
108 } | 106 } |
109 | 107 |
110 void ChromeContentUtilityClient::UtilityThreadStarted() { | 108 void ChromeContentUtilityClient::UtilityThreadStarted() { |
111 #if defined(ENABLE_EXTENSIONS) | 109 #if defined(ENABLE_EXTENSIONS) |
112 extensions::ExtensionsHandler::UtilityThreadStarted(); | 110 extensions::ExtensionsHandler::UtilityThreadStarted(); |
113 #endif | 111 #endif |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
348 const std::string& mime_type, int64 total_size, bool get_attached_images) { | 346 const std::string& mime_type, int64 total_size, bool get_attached_images) { |
349 // Only one IPCDataSource may be created and added to the list of handlers. | 347 // Only one IPCDataSource may be created and added to the list of handlers. |
350 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); | 348 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); |
351 handlers_.push_back(source); | 349 handlers_.push_back(source); |
352 | 350 |
353 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( | 351 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( |
354 source, mime_type, get_attached_images); | 352 source, mime_type, get_attached_images); |
355 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); | 353 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); |
356 } | 354 } |
357 #endif | 355 #endif |
OLD | NEW |