Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(225)

Side by Side Diff: chrome/utility/extensions/extensions_handler.h

Issue 2699663003: Convert utility process extension ParseUpdate IPC to mojo (Closed)
Patch Set: Extensions review comments. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 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 #ifndef CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_ 5 #ifndef CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_
6 #define CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_ 6 #define CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 11 #include "base/macros.h"
13 #include "build/build_config.h" 12 #include "build/build_config.h"
14 #include "chrome/common/media_galleries/picasa_types.h" 13 #include "chrome/common/media_galleries/picasa_types.h"
15 #include "chrome/utility/utility_message_handler.h" 14 #include "chrome/utility/utility_message_handler.h"
16 #include "extensions/features/features.h" 15 #include "extensions/features/features.h"
17 #include "extensions/utility/utility_handler.h" 16 #include "extensions/utility/utility_handler.h"
18 17
19 #if !BUILDFLAG(ENABLE_EXTENSIONS) 18 #if !BUILDFLAG(ENABLE_EXTENSIONS)
20 #error "Extensions must be enabled" 19 #error "Extensions must be enabled"
21 #endif 20 #endif
22 21
23 namespace service_manager { 22 namespace service_manager {
24 class InterfaceRegistry; 23 class InterfaceRegistry;
25 } 24 }
26 25
27 namespace extensions { 26 namespace extensions {
28 27
29 // Dispatches IPCs for Chrome extensions utility messages. 28 // Dispatches IPCs for Chrome extensions utility messages.
29 // Note: these IPC are deprecated so there is no need to convert
30 // them to mojo. https://crbug.com/680928
30 class ExtensionsHandler : public UtilityMessageHandler { 31 class ExtensionsHandler : public UtilityMessageHandler {
31 public: 32 public:
32 ExtensionsHandler(); 33 ExtensionsHandler();
33 ~ExtensionsHandler() override; 34 ~ExtensionsHandler() override;
34 35
35 static void PreSandboxStartup(); 36 static void PreSandboxStartup();
36 37
37 // TODO(noel): consider moving this API to the UtilityMessageHandler
38 // interface.
39 static void ExposeInterfacesToBrowser( 38 static void ExposeInterfacesToBrowser(
40 service_manager::InterfaceRegistry* registry, 39 service_manager::InterfaceRegistry* registry,
41 bool running_elevated); 40 bool running_elevated);
42 41
43 // UtilityMessageHandler: 42 // UtilityMessageHandler:
44 bool OnMessageReceived(const IPC::Message& message) override; 43 bool OnMessageReceived(const IPC::Message& message) override;
45 44
46 private: 45 private:
47 // IPC message handlers. 46 // IPC message handlers.
48 #if defined(OS_WIN) 47 #if defined(OS_WIN)
49 void OnParseITunesPrefXml(const std::string& itunes_xml_data); 48 void OnParseITunesPrefXml(const std::string& itunes_xml_data);
50 #endif // defined(OS_WIN) 49 #endif // defined(OS_WIN)
51 50
52 #if defined(OS_WIN) || defined(OS_MACOSX) 51 #if defined(OS_WIN) || defined(OS_MACOSX)
53 void OnParseITunesLibraryXmlFile( 52 void OnParseITunesLibraryXmlFile(
54 const IPC::PlatformFileForTransit& itunes_library_file); 53 const IPC::PlatformFileForTransit& itunes_library_file);
55 54
56 void OnParsePicasaPMPDatabase( 55 void OnParsePicasaPMPDatabase(
57 const picasa::AlbumTableFilesForTransit& album_table_files); 56 const picasa::AlbumTableFilesForTransit& album_table_files);
58 57
59 void OnIndexPicasaAlbumsContents( 58 void OnIndexPicasaAlbumsContents(
60 const picasa::AlbumUIDSet& album_uids, 59 const picasa::AlbumUIDSet& album_uids,
61 const std::vector<picasa::FolderINIContents>& folders_inis); 60 const std::vector<picasa::FolderINIContents>& folders_inis);
62 #endif // defined(OS_WIN) || defined(OS_MACOSX) 61 #endif // defined(OS_WIN) || defined(OS_MACOSX)
63 62
64 UtilityHandler utility_handler_;
65
66 DISALLOW_COPY_AND_ASSIGN(ExtensionsHandler); 63 DISALLOW_COPY_AND_ASSIGN(ExtensionsHandler);
67 }; 64 };
68 65
69 } // namespace extensions 66 } // namespace extensions
70 67
71 #endif // CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_ 68 #endif // CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_
OLDNEW
« no previous file with comments | « chrome/utility/chrome_content_utility_client.cc ('k') | chrome/utility/extensions/extensions_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698