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 "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
9 #include "base/string16.h" | 9 #include "base/string16.h" |
10 #include "content/public/renderer/render_thread.h" | 10 #include "content/public/renderer/render_thread.h" |
(...skipping 20 matching lines...) Expand all Loading... |
31 | 31 |
32 // Provides access to the messages that have been received by this thread. | 32 // Provides access to the messages that have been received by this thread. |
33 IPC::TestSink& sink() { return sink_; } | 33 IPC::TestSink& sink() { return sink_; } |
34 | 34 |
35 // Helpers for embedders to know when content IPC messages are received, since | 35 // Helpers for embedders to know when content IPC messages are received, since |
36 // they don't have access to content IPC files. | 36 // they don't have access to content IPC files. |
37 void VerifyRunJavaScriptMessageSend(const string16& expected_alert_message); | 37 void VerifyRunJavaScriptMessageSend(const string16& expected_alert_message); |
38 | 38 |
39 // RenderThread implementation: | 39 // RenderThread implementation: |
40 virtual bool Send(IPC::Message* msg) OVERRIDE; | 40 virtual bool Send(IPC::Message* msg) OVERRIDE; |
41 virtual MessageLoop* GetMessageLoop() OVERRIDE; | 41 virtual base::MessageLoop* GetMessageLoop() OVERRIDE; |
42 virtual IPC::SyncChannel* GetChannel() OVERRIDE; | 42 virtual IPC::SyncChannel* GetChannel() OVERRIDE; |
43 virtual std::string GetLocale() OVERRIDE; | 43 virtual std::string GetLocale() OVERRIDE; |
44 virtual IPC::SyncMessageFilter* GetSyncMessageFilter() OVERRIDE; | 44 virtual IPC::SyncMessageFilter* GetSyncMessageFilter() OVERRIDE; |
45 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() | 45 virtual scoped_refptr<base::MessageLoopProxy> GetIOMessageLoopProxy() |
46 OVERRIDE; | 46 OVERRIDE; |
47 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; | 47 virtual void AddRoute(int32 routing_id, IPC::Listener* listener) OVERRIDE; |
48 virtual void RemoveRoute(int32 routing_id) OVERRIDE; | 48 virtual void RemoveRoute(int32 routing_id) OVERRIDE; |
49 virtual int GenerateRoutingID() OVERRIDE; | 49 virtual int GenerateRoutingID() OVERRIDE; |
50 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; | 50 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; |
51 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; | 51 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) OVERRIDE; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
150 // The last known good deserializer for sync messages. | 150 // The last known good deserializer for sync messages. |
151 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; | 151 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; |
152 | 152 |
153 // A list of message filters added to this thread. | 153 // A list of message filters added to this thread. |
154 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; | 154 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; |
155 }; | 155 }; |
156 | 156 |
157 } // namespace content | 157 } // namespace content |
158 | 158 |
159 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ | 159 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ |
OLD | NEW |