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

Side by Side Diff: content/public/utility/content_utility_client.h

Issue 1947313002: Enable content embedders to specify mojo application task runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: restores mojo:media in browser Created 4 years, 7 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 (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 14
14 class GURL; 15 class GURL;
15 16
16 namespace shell { 17 namespace shell {
17 class ShellClient; 18 class ShellClient;
18 } 19 }
19 20
20 namespace content { 21 namespace content {
21 22
22 class ServiceRegistry; 23 class ServiceRegistry;
23 24
24 // Embedder API for participating in renderer logic. 25 // Embedder API for participating in renderer logic.
25 class CONTENT_EXPORT ContentUtilityClient { 26 class CONTENT_EXPORT ContentUtilityClient {
26 public: 27 public:
27 using StaticMojoApplicationMap = 28 using StaticMojoApplicationMap = std::map<std::string, MojoApplicationInfo>;
28 std::map<std::string,
29 base::Callback<std::unique_ptr<shell::ShellClient>(
30 const base::Closure& quit_closure)>>;
31 29
32 virtual ~ContentUtilityClient() {} 30 virtual ~ContentUtilityClient() {}
33 31
34 // Notifies us that the UtilityThread has been created. 32 // Notifies us that the UtilityThread has been created.
35 virtual void UtilityThreadStarted() {} 33 virtual void UtilityThreadStarted() {}
36 34
37 // Allows the embedder to filter messages. 35 // Allows the embedder to filter messages.
38 virtual bool OnMessageReceived(const IPC::Message& message); 36 virtual bool OnMessageReceived(const IPC::Message& message);
39 37
40 // Registers Mojo services. 38 // Registers Mojo services.
41 virtual void RegisterMojoServices(ServiceRegistry* registry) {} 39 virtual void RegisterMojoServices(ServiceRegistry* registry) {}
42 40
43 // Registers Mojo applications. 41 // Registers Mojo applications.
44 virtual void RegisterMojoApplications(StaticMojoApplicationMap* apps) {} 42 virtual void RegisterMojoApplications(StaticMojoApplicationMap* apps) {}
45 }; 43 };
46 44
47 } // namespace content 45 } // namespace content
48 46
49 #endif // CONTENT_PUBLIC_UTILITY_CONTENT_UTILITY_CLIENT_H_ 47 #endif // CONTENT_PUBLIC_UTILITY_CONTENT_UTILITY_CLIENT_H_
OLDNEW
« no previous file with comments | « content/public/common/mojo_application_info.cc ('k') | content/shell/browser/shell_content_browser_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698