OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 CHROME_RENDERER_MOCK_RENDER_THREAD_H_ | 5 #ifndef CHROME_RENDERER_MOCK_RENDER_THREAD_H_ |
6 #define CHROME_RENDERER_MOCK_RENDER_THREAD_H_ | 6 #define CHROME_RENDERER_MOCK_RENDER_THREAD_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 | 34 |
35 // Called by the Widget. The routing id must match the routing id of AddRoute. | 35 // Called by the Widget. The routing id must match the routing id of AddRoute. |
36 virtual void RemoveRoute(int32 routing_id); | 36 virtual void RemoveRoute(int32 routing_id); |
37 | 37 |
38 // Called by the Widget. Used to send messages to the browser. | 38 // Called by the Widget. Used to send messages to the browser. |
39 // We short-circuit the mechanim and handle the messages right here on this | 39 // We short-circuit the mechanim and handle the messages right here on this |
40 // class. | 40 // class. |
41 virtual bool Send(IPC::Message* msg); | 41 virtual bool Send(IPC::Message* msg); |
42 | 42 |
43 // Our mock thread doesn't do filtering. | 43 // Our mock thread doesn't do filtering. |
44 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) { | 44 virtual void AddFilter(IPC::ChannelProxy::MessageFilter* filter) { } |
45 } | 45 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) { } |
46 virtual void RemoveFilter(IPC::ChannelProxy::MessageFilter* filter) { | 46 |
47 } | 47 // Our mock thread doesn't deal with hidden and restored tabs. |
| 48 virtual void WidgetHidden() { } |
| 49 virtual void WidgetRestored() { } |
48 | 50 |
49 ////////////////////////////////////////////////////////////////////////// | 51 ////////////////////////////////////////////////////////////////////////// |
50 // The following functions are called by the test itself. | 52 // The following functions are called by the test itself. |
51 | 53 |
52 void set_routing_id(int32 id) { | 54 void set_routing_id(int32 id) { |
53 routing_id_ = id; | 55 routing_id_ = id; |
54 } | 56 } |
55 | 57 |
56 int32 opener_id() const { | 58 int32 opener_id() const { |
57 return opener_id_; | 59 return opener_id_; |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 IPC::Channel::Listener* widget_; | 111 IPC::Channel::Listener* widget_; |
110 | 112 |
111 // The last known good deserializer for sync messages. | 113 // The last known good deserializer for sync messages. |
112 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; | 114 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; |
113 | 115 |
114 // A mock printer device used for printing tests. | 116 // A mock printer device used for printing tests. |
115 scoped_ptr<MockPrinter> printer_; | 117 scoped_ptr<MockPrinter> printer_; |
116 }; | 118 }; |
117 | 119 |
118 #endif // CHROME_RENDERER_MOCK_RENDER_THREAD_H_ | 120 #endif // CHROME_RENDERER_MOCK_RENDER_THREAD_H_ |
OLD | NEW |