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/base64.h" | 7 #include "base/base64.h" |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
13 #include "chrome/common/chrome_utility_messages.h" | 13 #include "chrome/common/chrome_utility_messages.h" |
14 #include "chrome/common/extensions/chrome_manifest_handlers.h" | 14 #include "chrome/common/extensions/chrome_manifest_handlers.h" |
15 #include "chrome/common/extensions/extension.h" | 15 #include "chrome/common/extensions/extension.h" |
16 #include "chrome/common/extensions/extension_l10n_util.h" | 16 #include "chrome/common/extensions/extension_l10n_util.h" |
17 #include "chrome/common/extensions/manifest.h" | 17 #include "chrome/common/extensions/manifest.h" |
18 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" | 18 #include "chrome/common/extensions/permissions/chrome_api_permissions.h" |
19 #include "chrome/common/extensions/update_manifest.h" | 19 #include "chrome/common/extensions/update_manifest.h" |
20 #include "chrome/common/safe_browsing/zip_analyzer.h" | 20 #include "chrome/common/safe_browsing/zip_analyzer.h" |
21 #include "chrome/utility/extensions/unpacker.h" | 21 #include "chrome/utility/extensions/unpacker.h" |
| 22 #include "chrome/utility/networking_private_handler.h" |
22 #include "chrome/utility/profile_import_handler.h" | 23 #include "chrome/utility/profile_import_handler.h" |
23 #include "chrome/utility/web_resource_unpacker.h" | 24 #include "chrome/utility/web_resource_unpacker.h" |
24 #include "content/public/child/image_decoder_utils.h" | 25 #include "content/public/child/image_decoder_utils.h" |
25 #include "content/public/utility/utility_thread.h" | 26 #include "content/public/utility/utility_thread.h" |
26 #include "printing/page_range.h" | 27 #include "printing/page_range.h" |
27 #include "third_party/skia/include/core/SkBitmap.h" | 28 #include "third_party/skia/include/core/SkBitmap.h" |
28 #include "third_party/zlib/google/zip.h" | 29 #include "third_party/zlib/google/zip.h" |
29 #include "ui/base/ui_base_switches.h" | 30 #include "ui/base/ui_base_switches.h" |
30 #include "ui/gfx/codec/jpeg_codec.h" | 31 #include "ui/gfx/codec/jpeg_codec.h" |
31 #include "ui/gfx/rect.h" | 32 #include "ui/gfx/rect.h" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); | 70 content::UtilityThread::Get()->ReleaseProcessIfNeeded(); |
70 } | 71 } |
71 | 72 |
72 } // namespace | 73 } // namespace |
73 | 74 |
74 ChromeContentUtilityClient::ChromeContentUtilityClient() { | 75 ChromeContentUtilityClient::ChromeContentUtilityClient() { |
75 #if !defined(OS_ANDROID) | 76 #if !defined(OS_ANDROID) |
76 handlers_.push_back(new ProfileImportHandler()); | 77 handlers_.push_back(new ProfileImportHandler()); |
77 #endif // OS_ANDROID | 78 #endif // OS_ANDROID |
78 | 79 |
| 80 #if !defined(OS_ANDROID) |
| 81 handlers_.push_back(new NetworkingPrivateHandler()); |
| 82 #endif // OS_ANDROID |
| 83 |
79 #if defined(ENABLE_MDNS) | 84 #if defined(ENABLE_MDNS) |
80 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); | 85 handlers_.push_back(new local_discovery::ServiceDiscoveryMessageHandler()); |
81 #endif // ENABLE_MDNS | 86 #endif // ENABLE_MDNS |
82 } | 87 } |
83 | 88 |
84 ChromeContentUtilityClient::~ChromeContentUtilityClient() { | 89 ChromeContentUtilityClient::~ChromeContentUtilityClient() { |
85 } | 90 } |
86 | 91 |
87 void ChromeContentUtilityClient::UtilityThreadStarted() { | 92 void ChromeContentUtilityClient::UtilityThreadStarted() { |
88 #if defined(OS_WIN) | 93 #if defined(OS_WIN) |
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
573 indexer.ParseFolderINI(it->folder_path, it->ini_contents); | 578 indexer.ParseFolderINI(it->folder_path, it->ini_contents); |
574 } | 579 } |
575 | 580 |
576 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( | 581 Send(new ChromeUtilityHostMsg_IndexPicasaAlbumsContents_Finished( |
577 indexer.albums_images())); | 582 indexer.albums_images())); |
578 ReleaseProcessIfNeeded(); | 583 ReleaseProcessIfNeeded(); |
579 } | 584 } |
580 #endif // defined(OS_WIN) || defined(OS_MACOSX) | 585 #endif // defined(OS_WIN) || defined(OS_MACOSX) |
581 | 586 |
582 } // namespace chrome | 587 } // namespace chrome |
OLD | NEW |