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

Side by Side Diff: content/public/renderer/render_thread.h

Issue 2310563002: Adds routed interface support between RenderFrameHost and RenderFrame (Closed)
Patch Set: Created 4 years, 3 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_RENDERER_RENDER_THREAD_H_ 5 #ifndef CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_
6 #define CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ 6 #define CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
11 #include "base/callback.h" 11 #include "base/callback.h"
12 #include "base/memory/shared_memory.h" 12 #include "base/memory/shared_memory.h"
13 #include "base/metrics/user_metrics_action.h" 13 #include "base/metrics/user_metrics_action.h"
14 #include "content/common/content_export.h" 14 #include "content/common/content_export.h"
15 #include "content/public/child/child_thread.h" 15 #include "content/public/child/child_thread.h"
16 #include "content/public/common/routed_interface.mojom.h"
16 #include "ipc/ipc_channel_proxy.h" 17 #include "ipc/ipc_channel_proxy.h"
17 18
18 class GURL; 19 class GURL;
19 20
20 namespace base { 21 namespace base {
21 class MessageLoop; 22 class MessageLoop;
22 class WaitableEvent; 23 class WaitableEvent;
23 } 24 }
24 25
25 namespace cc { 26 namespace cc {
(...skipping 28 matching lines...) Expand all
54 virtual std::string GetLocale() = 0; 55 virtual std::string GetLocale() = 0;
55 virtual IPC::SyncMessageFilter* GetSyncMessageFilter() = 0; 56 virtual IPC::SyncMessageFilter* GetSyncMessageFilter() = 0;
56 virtual scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() = 0; 57 virtual scoped_refptr<base::SingleThreadTaskRunner> GetIOTaskRunner() = 0;
57 58
58 // Called to add or remove a listener for a particular message routing ID. 59 // Called to add or remove a listener for a particular message routing ID.
59 // These methods normally get delegated to a MessageRouter. 60 // These methods normally get delegated to a MessageRouter.
60 virtual void AddRoute(int32_t routing_id, IPC::Listener* listener) = 0; 61 virtual void AddRoute(int32_t routing_id, IPC::Listener* listener) = 0;
61 virtual void RemoveRoute(int32_t routing_id) = 0; 62 virtual void RemoveRoute(int32_t routing_id) = 0;
62 virtual int GenerateRoutingID() = 0; 63 virtual int GenerateRoutingID() = 0;
63 64
65 // Adds a mojom::RoutedInterfaceProvider for a specific message routing ID.
66 // |provider| must live at least until RemoveRoute() is called on
67 // |routing_id|.
68 virtual void AddRoutedInterfaces(
69 int32_t routing_id,
70 mojom::RoutedInterfaceProvider* provider) = 0;
71
72 virtual mojom::RouteProvider* GetRemoteRouteProvider() = 0;
73
64 // These map to IPC::ChannelProxy methods. 74 // These map to IPC::ChannelProxy methods.
65 virtual void AddFilter(IPC::MessageFilter* filter) = 0; 75 virtual void AddFilter(IPC::MessageFilter* filter) = 0;
66 virtual void RemoveFilter(IPC::MessageFilter* filter) = 0; 76 virtual void RemoveFilter(IPC::MessageFilter* filter) = 0;
67 77
68 // Add/remove observers for the process. 78 // Add/remove observers for the process.
69 virtual void AddObserver(RenderThreadObserver* observer) = 0; 79 virtual void AddObserver(RenderThreadObserver* observer) = 0;
70 virtual void RemoveObserver(RenderThreadObserver* observer) = 0; 80 virtual void RemoveObserver(RenderThreadObserver* observer) = 0;
71 81
72 // Set the ResourceDispatcher delegate object for this process. 82 // Set the ResourceDispatcher delegate object for this process.
73 virtual void SetResourceDispatcherDelegate( 83 virtual void SetResourceDispatcherDelegate(
(...skipping 30 matching lines...) Expand all
104 // proxy servers. 114 // proxy servers.
105 virtual bool ResolveProxy(const GURL& url, std::string* proxy_list) = 0; 115 virtual bool ResolveProxy(const GURL& url, std::string* proxy_list) = 0;
106 116
107 // Gets the shutdown event for the process. 117 // Gets the shutdown event for the process.
108 virtual base::WaitableEvent* GetShutdownEvent() = 0; 118 virtual base::WaitableEvent* GetShutdownEvent() = 0;
109 }; 119 };
110 120
111 } // namespace content 121 } // namespace content
112 122
113 #endif // CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_ 123 #endif // CONTENT_PUBLIC_RENDERER_RENDER_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698