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 #ifndef CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 5 #ifndef CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
6 #define CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 6 #define CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "content/public/utility/content_utility_client.h" | 12 #include "content/public/utility/content_utility_client.h" |
13 | 13 |
14 class UtilityMessageHandler; | 14 class UtilityMessageHandler; |
15 | 15 |
16 class ChromeContentUtilityClient : public content::ContentUtilityClient { | 16 class ChromeContentUtilityClient : public content::ContentUtilityClient { |
17 public: | 17 public: |
18 ChromeContentUtilityClient(); | 18 ChromeContentUtilityClient(); |
19 ~ChromeContentUtilityClient() override; | 19 ~ChromeContentUtilityClient() override; |
20 | 20 |
21 // content::ContentUtilityClient: | 21 // content::ContentUtilityClient: |
22 void UtilityThreadStarted() override; | 22 void UtilityThreadStarted() override; |
23 bool OnMessageReceived(const IPC::Message& message) override; | 23 bool OnMessageReceived(const IPC::Message& message) override; |
| 24 void RegisterServices(StaticServiceMap* services) override; |
24 | 25 |
25 static void PreSandboxStartup(); | 26 static void PreSandboxStartup(); |
26 | 27 |
27 private: | 28 private: |
28 // IPC message handlers. | 29 // IPC message handlers. |
29 using Handlers = std::vector<std::unique_ptr<UtilityMessageHandler>>; | 30 using Handlers = std::vector<std::unique_ptr<UtilityMessageHandler>>; |
30 Handlers handlers_; | 31 Handlers handlers_; |
31 | 32 |
32 // True if the utility process runs with elevated privileges. | 33 // True if the utility process runs with elevated privileges. |
33 bool utility_process_running_elevated_; | 34 bool utility_process_running_elevated_; |
34 | 35 |
35 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); | 36 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); |
36 }; | 37 }; |
37 | 38 |
38 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 39 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
OLD | NEW |