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

Unified Diff: content/child/child_thread_impl.h

Issue 2138263002: Revert of Move content's shell connections to the IO thread (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/child/background_sync/background_sync_provider.cc ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/child/child_thread_impl.h
diff --git a/content/child/child_thread_impl.h b/content/child/child_thread_impl.h
index e4447c9ed1adb41d14e98df097a22df12e15c115..368089076a95972d9a2504d65b3f0b88b0aad6e2 100644
--- a/content/child/child_thread_impl.h
+++ b/content/child/child_thread_impl.h
@@ -23,6 +23,7 @@
#include "ipc/ipc_message.h" // For IPC_MESSAGE_LOG_ENABLED.
#include "ipc/ipc_platform_file.h"
#include "ipc/message_router.h"
+#include "services/shell/public/cpp/service.h"
namespace base {
class MessageLoop;
@@ -67,7 +68,8 @@
// The main thread of a child process derives from this class.
class CONTENT_EXPORT ChildThreadImpl
: public IPC::Listener,
- virtual public ChildThread {
+ virtual public ChildThread,
+ public NON_EXPORTED_BASE(shell::Service){
public:
struct CONTENT_EXPORT Options;
@@ -99,6 +101,10 @@
shell::InterfaceRegistry* GetInterfaceRegistry() override;
shell::InterfaceProvider* GetRemoteInterfaces() override;
+ // shell::Service:
+ shell::InterfaceRegistry* GetInterfaceRegistryForConnection() override;
+ shell::InterfaceProvider* GetInterfaceProviderForConnection() override;
+
IPC::SyncChannel* channel() { return channel_.get(); }
IPC::MessageRouter* GetRouter();
@@ -203,10 +209,6 @@
// Called when the process refcount is 0.
void OnProcessFinalRelease();
- // Implemented by subclasses to attach ConnectionFilters to the thread's
- // shell connection.
- virtual void AddConnectionFilters(MojoShellConnection* connection);
-
virtual bool OnControlMessageReceived(const IPC::Message& msg);
virtual void OnProcessBackgrounded(bool backgrounded);
virtual void OnProcessPurgeAndSuspend();
@@ -251,9 +253,9 @@
void EnsureConnected();
std::unique_ptr<mojo::edk::ScopedIPCSupport> mojo_ipc_support_;
+ std::unique_ptr<MojoShellConnection> mojo_shell_connection_;
std::unique_ptr<shell::InterfaceRegistry> interface_registry_;
std::unique_ptr<shell::InterfaceProvider> remote_interfaces_;
- std::unique_ptr<MojoShellConnection> mojo_shell_connection_;
std::string channel_name_;
std::unique_ptr<IPC::SyncChannel> channel_;
@@ -307,10 +309,7 @@
scoped_refptr<base::SequencedTaskRunner> browser_process_io_runner_;
- std::unique_ptr<base::WeakPtrFactory<ChildThreadImpl>>
- channel_connected_factory_;
-
- base::WeakPtrFactory<ChildThreadImpl> weak_factory_;
+ base::WeakPtrFactory<ChildThreadImpl> channel_connected_factory_;
DISALLOW_COPY_AND_ASSIGN(ChildThreadImpl);
};
« no previous file with comments | « content/child/background_sync/background_sync_provider.cc ('k') | content/child/child_thread_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698