| 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" |
| 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 |
| 29 namespace blink { | 30 namespace blink { |
| (...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 81 bool ResolveProxy(const GURL& url, std::string* proxy_list) override; | 82 bool ResolveProxy(const GURL& url, std::string* proxy_list) override; |
| 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; |
| 92 service_manager::InterfaceRegistry* GetInterfaceRegistry() override; |
| 91 service_manager::Connector* GetConnector() override; | 93 service_manager::Connector* GetConnector() override; |
| 92 void SetFieldTrialGroup(const std::string& trial_name, | 94 void SetFieldTrialGroup(const std::string& trial_name, |
| 93 const std::string& group_name) override; | 95 const std::string& group_name) override; |
| 94 | 96 |
| 95 ////////////////////////////////////////////////////////////////////////// | 97 ////////////////////////////////////////////////////////////////////////// |
| 96 // The following functions are called by the test itself. | 98 // The following functions are called by the test itself. |
| 97 | 99 |
| 98 void set_routing_id(int32_t id) { routing_id_ = id; } | 100 void set_routing_id(int32_t id) { routing_id_ = id; } |
| 99 | 101 |
| 100 int32_t opener_id() const { return opener_id_; } | 102 int32_t opener_id() const { return opener_id_; } |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // The last known good deserializer for sync messages. | 160 // The last known good deserializer for sync messages. |
| 159 std::unique_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; | 161 std::unique_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; |
| 160 | 162 |
| 161 // A list of message filters added to this thread. | 163 // A list of message filters added to this thread. |
| 162 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; | 164 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; |
| 163 | 165 |
| 164 // Observers to notify. | 166 // Observers to notify. |
| 165 base::ObserverList<RenderThreadObserver> observers_; | 167 base::ObserverList<RenderThreadObserver> observers_; |
| 166 | 168 |
| 167 cc::TestSharedBitmapManager shared_bitmap_manager_; | 169 cc::TestSharedBitmapManager shared_bitmap_manager_; |
| 170 std::unique_ptr<service_manager::InterfaceRegistry> interface_registry_; |
| 168 std::unique_ptr<service_manager::Connector> connector_; | 171 std::unique_ptr<service_manager::Connector> connector_; |
| 169 service_manager::mojom::ConnectorRequest pending_connector_request_; | 172 service_manager::mojom::ConnectorRequest pending_connector_request_; |
| 170 | 173 |
| 171 std::unique_ptr<mojom::RenderMessageFilter> mock_render_message_filter_; | 174 std::unique_ptr<mojom::RenderMessageFilter> mock_render_message_filter_; |
| 172 }; | 175 }; |
| 173 | 176 |
| 174 } // namespace content | 177 } // namespace content |
| 175 | 178 |
| 176 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ | 179 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ |
| OLD | NEW |