Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(113)

Side by Side Diff: content/public/test/mock_render_thread.h

Issue 1162943002: Replace more ObserverList with base::ObserverList. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@observer
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_
OLDNEW
« no previous file with comments | « content/public/test/mock_render_process_host.h ('k') | content/renderer/p2p/socket_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698