| 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 <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 public: | 30 public: |
| 31 ChromeContentUtilityClient(); | 31 ChromeContentUtilityClient(); |
| 32 ~ChromeContentUtilityClient() override; | 32 ~ChromeContentUtilityClient() override; |
| 33 | 33 |
| 34 void UtilityThreadStarted() override; | 34 void UtilityThreadStarted() override; |
| 35 bool OnMessageReceived(const IPC::Message& message) override; | 35 bool OnMessageReceived(const IPC::Message& message) override; |
| 36 void ExposeInterfacesToBrowser( | 36 void ExposeInterfacesToBrowser( |
| 37 service_manager::InterfaceRegistry* registry) override; | 37 service_manager::InterfaceRegistry* registry) override; |
| 38 void RegisterServices(StaticServiceMap* services) override; | 38 void RegisterServices(StaticServiceMap* services) override; |
| 39 | 39 |
| 40 void AddHandler(std::unique_ptr<UtilityMessageHandler> handler); | |
| 41 | |
| 42 static void PreSandboxStartup(); | 40 static void PreSandboxStartup(); |
| 43 | 41 |
| 44 private: | 42 private: |
| 45 // IPC message handlers. | 43 // IPC message handlers. |
| 46 #if defined(OS_CHROMEOS) | 44 #if defined(OS_CHROMEOS) |
| 47 void OnCreateZipFile(const base::FilePath& src_dir, | 45 void OnCreateZipFile(const base::FilePath& src_dir, |
| 48 const std::vector<base::FilePath>& src_relative_paths, | 46 const std::vector<base::FilePath>& src_relative_paths, |
| 49 const base::FileDescriptor& dest_fd); | 47 const base::FileDescriptor& dest_fd); |
| 50 #endif // defined(OS_CHROMEOS) | 48 #endif // defined(OS_CHROMEOS) |
| 51 | 49 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 65 | 63 |
| 66 // Flag to enable whitelisting. | 64 // Flag to enable whitelisting. |
| 67 bool filter_messages_; | 65 bool filter_messages_; |
| 68 // A list of message_ids to filter. | 66 // A list of message_ids to filter. |
| 69 std::set<int> message_id_whitelist_; | 67 std::set<int> message_id_whitelist_; |
| 70 | 68 |
| 71 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); | 69 DISALLOW_COPY_AND_ASSIGN(ChromeContentUtilityClient); |
| 72 }; | 70 }; |
| 73 | 71 |
| 74 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ | 72 #endif // CHROME_UTILITY_CHROME_CONTENT_UTILITY_CLIENT_H_ |
| OLD | NEW |