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

Side by Side Diff: content/public/test/mock_render_thread.h

Issue 2755813002: Begin to wean child processes off reliance on a persistent service_manager::Connection to the brows… (Closed)
Patch Set: . Created 3 years, 9 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
« no previous file with comments | « content/public/gpu/content_gpu_client.h ('k') | content/public/test/mock_render_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_TEST_MOCK_RENDER_THREAD_H_ 5 #ifndef CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_
6 #define CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ 6 #define CONTENT_PUBLIC_TEST_MOCK_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/memory/shared_memory.h" 11 #include "base/memory/shared_memory.h"
12 #include "base/observer_list.h" 12 #include "base/observer_list.h"
13 #include "base/strings/string16.h" 13 #include "base/strings/string16.h"
14 #include "build/build_config.h" 14 #include "build/build_config.h"
15 #include "cc/test/test_shared_bitmap_manager.h" 15 #include "cc/test/test_shared_bitmap_manager.h"
16 #include "content/public/renderer/render_thread.h" 16 #include "content/public/renderer/render_thread.h"
17 #include "ipc/ipc_test_sink.h" 17 #include "ipc/ipc_test_sink.h"
18 #include "ipc/message_filter.h" 18 #include "ipc/message_filter.h"
19 #include "services/service_manager/public/interfaces/connector.mojom.h"
19 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" 20 #include "services/service_manager/public/interfaces/interface_provider.mojom.h"
20 #include "third_party/WebKit/public/web/WebPopupType.h" 21 #include "third_party/WebKit/public/web/WebPopupType.h"
21 22
22 struct FrameHostMsg_CreateChildFrame_Params; 23 struct FrameHostMsg_CreateChildFrame_Params;
23 24
24 namespace IPC { 25 namespace IPC {
25 class MessageFilter; 26 class MessageFilter;
26 class MessageReplyDeserializer; 27 class MessageReplyDeserializer;
27 } 28 }
28 29
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 base::WaitableEvent* GetShutdownEvent() override; 83 base::WaitableEvent* GetShutdownEvent() override;
83 int32_t GetClientId() override; 84 int32_t GetClientId() override;
84 scoped_refptr<base::SingleThreadTaskRunner> GetTimerTaskRunner() override; 85 scoped_refptr<base::SingleThreadTaskRunner> GetTimerTaskRunner() override;
85 scoped_refptr<base::SingleThreadTaskRunner> GetLoadingTaskRunner() override; 86 scoped_refptr<base::SingleThreadTaskRunner> GetLoadingTaskRunner() override;
86 #if defined(OS_WIN) 87 #if defined(OS_WIN)
87 void PreCacheFont(const LOGFONT& log_font) override; 88 void PreCacheFont(const LOGFONT& log_font) override;
88 void ReleaseCachedFonts() override; 89 void ReleaseCachedFonts() override;
89 #endif 90 #endif
90 ServiceManagerConnection* GetServiceManagerConnection() override; 91 ServiceManagerConnection* GetServiceManagerConnection() override;
91 service_manager::InterfaceRegistry* GetInterfaceRegistry() override; 92 service_manager::InterfaceRegistry* GetInterfaceRegistry() override;
92 service_manager::InterfaceProvider* GetRemoteInterfaces() override; 93 service_manager::Connector* GetConnector() override;
93 void SetFieldTrialGroup(const std::string& trial_name, 94 void SetFieldTrialGroup(const std::string& trial_name,
94 const std::string& group_name) override; 95 const std::string& group_name) override;
95 96
96 ////////////////////////////////////////////////////////////////////////// 97 //////////////////////////////////////////////////////////////////////////
97 // The following functions are called by the test itself. 98 // The following functions are called by the test itself.
98 99
99 void set_routing_id(int32_t id) { routing_id_ = id; } 100 void set_routing_id(int32_t id) { routing_id_ = id; }
100 101
101 int32_t opener_id() const { return opener_id_; } 102 int32_t opener_id() const { return opener_id_; }
102 103
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
160 std::unique_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; 161 std::unique_ptr<IPC::MessageReplyDeserializer> reply_deserializer_;
161 162
162 // A list of message filters added to this thread. 163 // A list of message filters added to this thread.
163 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; 164 std::vector<scoped_refptr<IPC::MessageFilter> > filters_;
164 165
165 // Observers to notify. 166 // Observers to notify.
166 base::ObserverList<RenderThreadObserver> observers_; 167 base::ObserverList<RenderThreadObserver> observers_;
167 168
168 cc::TestSharedBitmapManager shared_bitmap_manager_; 169 cc::TestSharedBitmapManager shared_bitmap_manager_;
169 std::unique_ptr<service_manager::InterfaceRegistry> interface_registry_; 170 std::unique_ptr<service_manager::InterfaceRegistry> interface_registry_;
170 std::unique_ptr<service_manager::InterfaceProvider> remote_interfaces_; 171 std::unique_ptr<service_manager::Connector> connector_;
171 service_manager::mojom::InterfaceProviderRequest 172 service_manager::mojom::ConnectorRequest pending_connector_request_;
172 pending_remote_interface_provider_request_;
173 173
174 std::unique_ptr<mojom::RenderMessageFilter> mock_render_message_filter_; 174 std::unique_ptr<mojom::RenderMessageFilter> mock_render_message_filter_;
175 }; 175 };
176 176
177 } // namespace content 177 } // namespace content
178 178
179 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ 179 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « content/public/gpu/content_gpu_client.h ('k') | content/public/test/mock_render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698