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

Side by Side Diff: content/public/child/child_thread.h

Issue 2099063002: Migrate RenderProcessHost, ChildThread to InterfaceRegistry/Provider (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 5 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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_CHILD_CHILD_THREAD_H_ 5 #ifndef CONTENT_PUBLIC_CHILD_CHILD_THREAD_H_
6 #define CONTENT_PUBLIC_CHILD_CHILD_THREAD_H_ 6 #define CONTENT_PUBLIC_CHILD_CHILD_THREAD_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "build/build_config.h" 11 #include "build/build_config.h"
12 #include "content/common/content_export.h" 12 #include "content/common/content_export.h"
13 #include "ipc/ipc_sender.h" 13 #include "ipc/ipc_sender.h"
14 14
15 #if defined(OS_WIN) 15 #if defined(OS_WIN)
16 #include <windows.h> 16 #include <windows.h>
17 #endif 17 #endif
18 18
19 namespace base { 19 namespace base {
20 struct UserMetricsAction; 20 struct UserMetricsAction;
21 } 21 }
22 22
23 namespace shell {
24 class InterfaceProvider;
25 class InterfaceRegistry;
26 }
27
23 namespace content { 28 namespace content {
24 29
25 // An abstract base class that contains logic shared between most child 30 // An abstract base class that contains logic shared between most child
26 // processes of the embedder. 31 // processes of the embedder.
27 class CONTENT_EXPORT ChildThread : public IPC::Sender { 32 class CONTENT_EXPORT ChildThread : public IPC::Sender {
28 public: 33 public:
29 // Returns the one child thread for this process. Note that this can only be 34 // Returns the one child thread for this process. Note that this can only be
30 // accessed when running on the child thread itself. 35 // accessed when running on the child thread itself.
31 static ChildThread* Get(); 36 static ChildThread* Get();
32 37
(...skipping 19 matching lines...) Expand all
52 // and a string literal parameter must be on the same line, e.g. 57 // and a string literal parameter must be on the same line, e.g.
53 // RenderThread::Get()->RecordAction( 58 // RenderThread::Get()->RecordAction(
54 // base::UserMetricsAction("my extremely long action name")); 59 // base::UserMetricsAction("my extremely long action name"));
55 // because otherwise our processing scripts won't pick up on new actions. 60 // because otherwise our processing scripts won't pick up on new actions.
56 virtual void RecordAction(const base::UserMetricsAction& action) = 0; 61 virtual void RecordAction(const base::UserMetricsAction& action) = 0;
57 62
58 // Sends over a string to be recorded by user metrics as a computed action. 63 // Sends over a string to be recorded by user metrics as a computed action.
59 // When you use this you need to also update the rules for extracting known 64 // When you use this you need to also update the rules for extracting known
60 // actions in chrome/tools/extract_actions.py. 65 // actions in chrome/tools/extract_actions.py.
61 virtual void RecordComputedAction(const std::string& action) = 0; 66 virtual void RecordComputedAction(const std::string& action) = 0;
67
68 // Returns the InterfaceRegistry that this process uses to expose interfaces
69 // to the browser.
70 virtual shell::InterfaceRegistry* GetInterfaceRegistry() = 0;
71
72 // Returns the InterfaceProvider that this process can use to bind
73 // interfaces exposed to it by the browser.
74 virtual shell::InterfaceProvider* GetRemoteInterfaces() = 0;
62 }; 75 };
63 76
64 } // namespace content 77 } // namespace content
65 78
66 #endif // CONTENT_PUBLIC_CHILD_CHILD_THREAD_H_ 79 #endif // CONTENT_PUBLIC_CHILD_CHILD_THREAD_H_
OLDNEW
« no previous file with comments | « content/public/browser/utility_process_mojo_client.h ('k') | content/public/gpu/content_gpu_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698