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" |
33 #include "chrome/utility/shell_handler_win.h" | 34 #include "chrome/utility/shell_handler_win.h" |
34 #endif | 35 #endif |
35 | 36 |
36 #if defined(ENABLE_EXTENSIONS) | 37 #if defined(ENABLE_EXTENSIONS) |
37 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" | 38 #include "chrome/common/extensions/chrome_utility_extensions_messages.h" |
38 #include "chrome/utility/extensions/extensions_handler.h" | 39 #include "chrome/utility/extensions/extensions_handler.h" |
39 #include "chrome/utility/image_writer/image_writer_handler.h" | 40 #include "chrome/utility/image_writer/image_writer_handler.h" |
40 #include "chrome/utility/media_galleries/ipc_data_source.h" | 41 #include "chrome/utility/media_galleries/ipc_data_source.h" |
41 #include "chrome/utility/media_galleries/media_metadata_parser.h" | 42 #include "chrome/utility/media_galleries/media_metadata_parser.h" |
42 #endif | 43 #endif |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 | 93 |
93 #if defined(ENABLE_MDNS) | 94 #if defined(ENABLE_MDNS) |
94 if (base::CommandLine::ForCurrentProcess()->HasSwitch( | 95 if (base::CommandLine::ForCurrentProcess()->HasSwitch( |
95 switches::kUtilityProcessEnableMDns)) { | 96 switches::kUtilityProcessEnableMDns)) { |
96 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); | 97 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); |
97 } | 98 } |
98 #endif | 99 #endif |
99 | 100 |
100 #if defined(OS_WIN) | 101 #if defined(OS_WIN) |
101 handlers_.push_back(new ShellHandler()); | 102 handlers_.push_back(new ShellHandler()); |
| 103 handlers_.push_back(new FontCacheHandler()); |
102 #endif | 104 #endif |
103 } | 105 } |
104 | 106 |
105 ChromeContentUtilityClient::~ChromeContentUtilityClient() { | 107 ChromeContentUtilityClient::~ChromeContentUtilityClient() { |
106 } | 108 } |
107 | 109 |
108 void ChromeContentUtilityClient::UtilityThreadStarted() { | 110 void ChromeContentUtilityClient::UtilityThreadStarted() { |
109 #if defined(ENABLE_EXTENSIONS) | 111 #if defined(ENABLE_EXTENSIONS) |
110 extensions::ExtensionsHandler::UtilityThreadStarted(); | 112 extensions::ExtensionsHandler::UtilityThreadStarted(); |
111 #endif | 113 #endif |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
346 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) { |
347 // 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. |
348 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); | 350 metadata::IPCDataSource* source = new metadata::IPCDataSource(total_size); |
349 handlers_.push_back(source); | 351 handlers_.push_back(source); |
350 | 352 |
351 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( | 353 metadata::MediaMetadataParser* parser = new metadata::MediaMetadataParser( |
352 source, mime_type, get_attached_images); | 354 source, mime_type, get_attached_images); |
353 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); | 355 parser->Start(base::Bind(&FinishParseMediaMetadata, base::Owned(parser))); |
354 } | 356 } |
355 #endif | 357 #endif |
OLD | NEW |