Add ICU message format support
[chromium-blink-merge.git] / chrome / utility / extensions / extensions_handler.h
blob06f3601a0772b33ae79eeb06511684f64a393eb1
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
3 // found in the LICENSE file.
5 #ifndef CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_
6 #define CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_
8 #include "base/base64.h"
9 #include "base/compiler_specific.h"
10 #include "base/macros.h"
11 #include "chrome/common/media_galleries/picasa_types.h"
12 #include "chrome/utility/utility_message_handler.h"
13 #include "extensions/utility/utility_handler.h"
15 #if !defined(ENABLE_EXTENSIONS)
16 #error "Extensions must be enabled"
17 #endif
19 namespace metadata {
20 class MediaMetadataParser;
23 namespace extensions {
25 // Dispatches IPCs for Chrome extensions utility messages.
26 class ExtensionsHandler : public UtilityMessageHandler {
27 public:
28 ExtensionsHandler();
29 ~ExtensionsHandler() override;
31 static void PreSandboxStartup();
33 // UtilityMessageHandler:
34 bool OnMessageReceived(const IPC::Message& message) override;
36 private:
37 // IPC message handlers.
38 void OnCheckMediaFile(int64 milliseconds_of_decoding,
39 const IPC::PlatformFileForTransit& media_file);
41 #if defined(OS_WIN)
42 void OnParseITunesPrefXml(const std::string& itunes_xml_data);
43 #endif // defined(OS_WIN)
45 #if defined(OS_MACOSX)
46 void OnParseIPhotoLibraryXmlFile(
47 const IPC::PlatformFileForTransit& iphoto_library_file);
48 #endif // defined(OS_MACOSX)
50 #if defined(OS_WIN) || defined(OS_MACOSX)
51 void OnParseITunesLibraryXmlFile(
52 const IPC::PlatformFileForTransit& itunes_library_file);
54 void OnParsePicasaPMPDatabase(
55 const picasa::AlbumTableFilesForTransit& album_table_files);
57 void OnIndexPicasaAlbumsContents(
58 const picasa::AlbumUIDSet& album_uids,
59 const std::vector<picasa::FolderINIContents>& folders_inis);
60 #endif // defined(OS_WIN) || defined(OS_MACOSX)
62 #if defined(OS_WIN)
63 void OnGetWiFiCredentials(const std::string& network_guid);
64 #endif // defined(OS_WIN)
66 UtilityHandler utility_handler_;
68 DISALLOW_COPY_AND_ASSIGN(ExtensionsHandler);
71 } // namespace extensions
73 #endif // CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_