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/memory/shared_memory.h" | 8 #include "base/memory/shared_memory.h" |
9 #include "base/observer_list.h" | 9 #include "base/observer_list.h" |
10 #include "base/strings/string16.h" | 10 #include "base/strings/string16.h" |
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 } | 103 } |
104 | 104 |
105 // Simulates the Widget receiving a close message. This should result | 105 // Simulates the Widget receiving a close message. This should result |
106 // on releasing the internal reference counts and destroying the internal | 106 // on releasing the internal reference counts and destroying the internal |
107 // state. | 107 // state. |
108 void SendCloseMessage(); | 108 void SendCloseMessage(); |
109 | 109 |
110 // Dispatches control messages to observers. | 110 // Dispatches control messages to observers. |
111 bool OnControlMessageReceived(const IPC::Message& msg); | 111 bool OnControlMessageReceived(const IPC::Message& msg); |
112 | 112 |
113 ObserverList<RenderProcessObserver>& observers() { | 113 base::ObserverList<RenderProcessObserver>& observers() { return observers_; } |
114 return observers_; | |
115 } | |
116 | 114 |
117 protected: | 115 protected: |
118 // This function operates as a regular IPC listener. Subclasses | 116 // This function operates as a regular IPC listener. Subclasses |
119 // overriding this should first delegate to this implementation. | 117 // overriding this should first delegate to this implementation. |
120 virtual bool OnMessageReceived(const IPC::Message& msg); | 118 virtual bool OnMessageReceived(const IPC::Message& msg); |
121 | 119 |
122 // The Widget expects to be returned valid route_id. | 120 // The Widget expects to be returned valid route_id. |
123 void OnCreateWidget(int opener_id, | 121 void OnCreateWidget(int opener_id, |
124 blink::WebPopupType popup_type, | 122 blink::WebPopupType popup_type, |
125 int* route_id, | 123 int* route_id, |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 int32 new_window_main_frame_routing_id_; | 161 int32 new_window_main_frame_routing_id_; |
164 int32 new_frame_routing_id_; | 162 int32 new_frame_routing_id_; |
165 | 163 |
166 // The last known good deserializer for sync messages. | 164 // The last known good deserializer for sync messages. |
167 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; | 165 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; |
168 | 166 |
169 // A list of message filters added to this thread. | 167 // A list of message filters added to this thread. |
170 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; | 168 std::vector<scoped_refptr<IPC::MessageFilter> > filters_; |
171 | 169 |
172 // Observers to notify. | 170 // Observers to notify. |
173 ObserverList<RenderProcessObserver> observers_; | 171 base::ObserverList<RenderProcessObserver> observers_; |
174 | 172 |
175 cc::TestSharedBitmapManager shared_bitmap_manager_; | 173 cc::TestSharedBitmapManager shared_bitmap_manager_; |
176 }; | 174 }; |
177 | 175 |
178 } // namespace content | 176 } // namespace content |
179 | 177 |
180 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ | 178 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ |
OLD | NEW |