OLD | NEW |
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/connector.mojom.h" |
20 #include "services/service_manager/public/interfaces/interface_provider.mojom.h" | |
21 #include "third_party/WebKit/public/web/WebPopupType.h" | 20 #include "third_party/WebKit/public/web/WebPopupType.h" |
22 | 21 |
23 struct FrameHostMsg_CreateChildFrame_Params; | 22 struct FrameHostMsg_CreateChildFrame_Params; |
24 | 23 |
25 namespace IPC { | 24 namespace IPC { |
26 class MessageFilter; | 25 class MessageFilter; |
27 class MessageReplyDeserializer; | 26 class MessageReplyDeserializer; |
28 } | 27 } |
29 | 28 |
30 namespace blink { | 29 namespace blink { |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 bool ResolveProxy(const GURL& url, std::string* proxy_list) override; | 81 bool ResolveProxy(const GURL& url, std::string* proxy_list) override; |
83 base::WaitableEvent* GetShutdownEvent() override; | 82 base::WaitableEvent* GetShutdownEvent() override; |
84 int32_t GetClientId() override; | 83 int32_t GetClientId() override; |
85 scoped_refptr<base::SingleThreadTaskRunner> GetTimerTaskRunner() override; | 84 scoped_refptr<base::SingleThreadTaskRunner> GetTimerTaskRunner() override; |
86 scoped_refptr<base::SingleThreadTaskRunner> GetLoadingTaskRunner() override; | 85 scoped_refptr<base::SingleThreadTaskRunner> GetLoadingTaskRunner() override; |
87 #if defined(OS_WIN) | 86 #if defined(OS_WIN) |
88 void PreCacheFont(const LOGFONT& log_font) override; | 87 void PreCacheFont(const LOGFONT& log_font) override; |
89 void ReleaseCachedFonts() override; | 88 void ReleaseCachedFonts() override; |
90 #endif | 89 #endif |
91 ServiceManagerConnection* GetServiceManagerConnection() override; | 90 ServiceManagerConnection* GetServiceManagerConnection() override; |
92 service_manager::InterfaceRegistry* GetInterfaceRegistry() override; | |
93 service_manager::Connector* GetConnector() override; | 91 service_manager::Connector* GetConnector() override; |
94 void SetFieldTrialGroup(const std::string& trial_name, | 92 void SetFieldTrialGroup(const std::string& trial_name, |
95 const std::string& group_name) override; | 93 const std::string& group_name) override; |
96 | 94 |
97 ////////////////////////////////////////////////////////////////////////// | 95 ////////////////////////////////////////////////////////////////////////// |
98 // The following functions are called by the test itself. | 96 // The following functions are called by the test itself. |
99 | 97 |
100 void set_routing_id(int32_t id) { routing_id_ = id; } | 98 void set_routing_id(int32_t id) { routing_id_ = id; } |
101 | 99 |
102 int32_t opener_id() const { return opener_id_; } | 100 int32_t opener_id() const { return opener_id_; } |
(...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
160 // The last known good deserializer for sync messages. | 158 // The last known good deserializer for sync messages. |
161 std::unique_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; | 159 std::unique_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; |
162 | 160 |
163 // A list of message filters added to this thread. | 161 // A list of message filters added to this thread. |
164 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; | 162 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; |
165 | 163 |
166 // Observers to notify. | 164 // Observers to notify. |
167 base::ObserverList<RenderThreadObserver> observers_; | 165 base::ObserverList<RenderThreadObserver> observers_; |
168 | 166 |
169 cc::TestSharedBitmapManager shared_bitmap_manager_; | 167 cc::TestSharedBitmapManager shared_bitmap_manager_; |
170 std::unique_ptr<service_manager::InterfaceRegistry> interface_registry_; | |
171 std::unique_ptr<service_manager::Connector> connector_; | 168 std::unique_ptr<service_manager::Connector> connector_; |
172 service_manager::mojom::ConnectorRequest pending_connector_request_; | 169 service_manager::mojom::ConnectorRequest pending_connector_request_; |
173 | 170 |
174 std::unique_ptr<mojom::RenderMessageFilter> mock_render_message_filter_; | 171 std::unique_ptr<mojom::RenderMessageFilter> mock_render_message_filter_; |
175 }; | 172 }; |
176 | 173 |
177 } // namespace content | 174 } // namespace content |
178 | 175 |
179 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ | 176 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ |
OLD | NEW |