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

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

Issue 2611283002: [mojo talk demo] Convert utility process CheckMediaFile IPC to mojo (Closed)
Patch Set: Created 3 years, 11 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" 11 #include "base/compiler_specific.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 #include "build/build_config.h" 13 #include "build/build_config.h"
14 #include "chrome/common/media_galleries/picasa_types.h" 14 #include "chrome/common/media_galleries/picasa_types.h"
15 #include "chrome/utility/utility_message_handler.h" 15 #include "chrome/utility/utility_message_handler.h"
16 #include "extensions/features/features.h" 16 #include "extensions/features/features.h"
17 #include "extensions/utility/utility_handler.h" 17 #include "extensions/utility/utility_handler.h"
18 18
19 #if !BUILDFLAG(ENABLE_EXTENSIONS) 19 #if !BUILDFLAG(ENABLE_EXTENSIONS)
20 #error "Extensions must be enabled" 20 #error "Extensions must be enabled"
21 #endif 21 #endif
22 22
23 class ChromeContentUtilityClient; 23 class ChromeContentUtilityClient;
24 24
25 namespace service_manager {
26 class InterfaceRegistry;
27 }
28
25 namespace extensions { 29 namespace extensions {
26 30
27 // Dispatches IPCs for Chrome extensions utility messages. 31 // Dispatches IPCs for Chrome extensions utility messages.
28 class ExtensionsHandler : public UtilityMessageHandler { 32 class ExtensionsHandler : public UtilityMessageHandler {
29 public: 33 public:
30 explicit ExtensionsHandler(ChromeContentUtilityClient* utility_client); 34 explicit ExtensionsHandler(ChromeContentUtilityClient* utility_client);
31 ~ExtensionsHandler() override; 35 ~ExtensionsHandler() override;
32 36
33 static void PreSandboxStartup(); 37 static void PreSandboxStartup();
34 38
39 static void ExposeInterfacesToBrowser(
40 service_manager::InterfaceRegistry* registry,
41 bool running_elevated);
42
35 // UtilityMessageHandler: 43 // UtilityMessageHandler:
36 bool OnMessageReceived(const IPC::Message& message) override; 44 bool OnMessageReceived(const IPC::Message& message) override;
37 45
38 private: 46 private:
39 // IPC message handlers. 47 // IPC message handlers.
40 void OnCheckMediaFile(int64_t milliseconds_of_decoding, 48 void OnCheckMediaFile(int64_t milliseconds_of_decoding,
41 const IPC::PlatformFileForTransit& media_file); 49 const IPC::PlatformFileForTransit& media_file);
42 50
43 void OnParseMediaMetadata(const std::string& mime_type, 51 void OnParseMediaMetadata(const std::string& mime_type,
44 int64_t total_size, 52 int64_t total_size,
(...skipping 23 matching lines...) Expand all
68 76
69 // The client that owns this. 77 // The client that owns this.
70 ChromeContentUtilityClient* const utility_client_; 78 ChromeContentUtilityClient* const utility_client_;
71 79
72 DISALLOW_COPY_AND_ASSIGN(ExtensionsHandler); 80 DISALLOW_COPY_AND_ASSIGN(ExtensionsHandler);
73 }; 81 };
74 82
75 } // namespace extensions 83 } // namespace extensions
76 84
77 #endif // CHROME_UTILITY_EXTENSIONS_EXTENSIONS_HANDLER_H_ 85 #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