| 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 CONTENT_PUBLIC_UTILITY_CONTENT_UTILITY_CLIENT_H_ | 5 #ifndef CONTENT_PUBLIC_UTILITY_CONTENT_UTILITY_CLIENT_H_ |
| 6 #define CONTENT_PUBLIC_UTILITY_CONTENT_UTILITY_CLIENT_H_ | 6 #define CONTENT_PUBLIC_UTILITY_CONTENT_UTILITY_CLIENT_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 | 10 |
| 11 #include "base/callback_forward.h" | 11 #include "base/callback_forward.h" |
| 12 #include "content/public/common/content_client.h" | 12 #include "content/public/common/content_client.h" |
| 13 #include "content/public/common/mojo_application_info.h" | 13 #include "content/public/common/mojo_application_info.h" |
| 14 | 14 |
| 15 class GURL; | 15 class GURL; |
| 16 | 16 |
| 17 namespace shell { | 17 namespace shell { |
| 18 class InterfaceRegistry; |
| 18 class ShellClient; | 19 class ShellClient; |
| 19 } | 20 } |
| 20 | 21 |
| 21 namespace content { | 22 namespace content { |
| 22 | 23 |
| 23 class ServiceRegistry; | |
| 24 | |
| 25 // Embedder API for participating in renderer logic. | 24 // Embedder API for participating in renderer logic. |
| 26 class CONTENT_EXPORT ContentUtilityClient { | 25 class CONTENT_EXPORT ContentUtilityClient { |
| 27 public: | 26 public: |
| 28 using StaticMojoApplicationMap = std::map<std::string, MojoApplicationInfo>; | 27 using StaticMojoApplicationMap = std::map<std::string, MojoApplicationInfo>; |
| 29 | 28 |
| 30 virtual ~ContentUtilityClient() {} | 29 virtual ~ContentUtilityClient() {} |
| 31 | 30 |
| 32 // Notifies us that the UtilityThread has been created. | 31 // Notifies us that the UtilityThread has been created. |
| 33 virtual void UtilityThreadStarted() {} | 32 virtual void UtilityThreadStarted() {} |
| 34 | 33 |
| 35 // Allows the embedder to filter messages. | 34 // Allows the embedder to filter messages. |
| 36 virtual bool OnMessageReceived(const IPC::Message& message); | 35 virtual bool OnMessageReceived(const IPC::Message& message); |
| 37 | 36 |
| 38 // Registers Mojo services. | 37 // Registers Mojo interfaces. |
| 39 virtual void RegisterMojoServices(ServiceRegistry* registry) {} | 38 virtual void RegisterMojoInterfaces(shell::InterfaceRegistry* registry) {} |
| 40 | 39 |
| 41 // Registers Mojo applications. | 40 // Registers Mojo applications. |
| 42 virtual void RegisterMojoApplications(StaticMojoApplicationMap* apps) {} | 41 virtual void RegisterMojoApplications(StaticMojoApplicationMap* apps) {} |
| 43 }; | 42 }; |
| 44 | 43 |
| 45 } // namespace content | 44 } // namespace content |
| 46 | 45 |
| 47 #endif // CONTENT_PUBLIC_UTILITY_CONTENT_UTILITY_CLIENT_H_ | 46 #endif // CONTENT_PUBLIC_UTILITY_CONTENT_UTILITY_CLIENT_H_ |
| OLD | NEW |