| 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 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 protected: | 106 protected: |
| 107 // This function operates as a regular IPC listener. Subclasses | 107 // This function operates as a regular IPC listener. Subclasses |
| 108 // overriding this should first delegate to this implementation. | 108 // overriding this should first delegate to this implementation. |
| 109 virtual bool OnMessageReceived(const IPC::Message& msg); | 109 virtual bool OnMessageReceived(const IPC::Message& msg); |
| 110 | 110 |
| 111 // Dispatches control messages to observers. | 111 // Dispatches control messages to observers. |
| 112 bool OnControlMessageReceived(const IPC::Message& msg); | 112 bool OnControlMessageReceived(const IPC::Message& msg); |
| 113 | 113 |
| 114 // The Widget expects to be returned valid route_id. | 114 // The Widget expects to be returned valid route_id. |
| 115 void OnCreateWidget(int opener_id, | 115 void OnCreateWidget(int opener_id, |
| 116 WebKit::WebPopupType popup_type, | 116 blink::WebPopupType popup_type, |
| 117 int* route_id, | 117 int* route_id, |
| 118 int* surface_id); | 118 int* surface_id); |
| 119 | 119 |
| 120 // The View expects to be returned a valid route_id different from its own. | 120 // The View expects to be returned a valid route_id different from its own. |
| 121 // We do not keep track of the newly created widget in MockRenderThread, | 121 // We do not keep track of the newly created widget in MockRenderThread, |
| 122 // so it must be cleaned up on its own. | 122 // so it must be cleaned up on its own. |
| 123 void OnCreateWindow( | 123 void OnCreateWindow( |
| 124 const ViewHostMsg_CreateWindow_Params& params, | 124 const ViewHostMsg_CreateWindow_Params& params, |
| 125 int* route_id, | 125 int* route_id, |
| 126 int* main_frame_route_id, | 126 int* main_frame_route_id, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 // A list of message filters added to this thread. | 158 // A list of message filters added to this thread. |
| 159 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; | 159 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; |
| 160 | 160 |
| 161 // Observers to notify. | 161 // Observers to notify. |
| 162 ObserverList<RenderProcessObserver> observers_; | 162 ObserverList<RenderProcessObserver> observers_; |
| 163 }; | 163 }; |
| 164 | 164 |
| 165 } // namespace content | 165 } // namespace content |
| 166 | 166 |
| 167 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ | 167 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ |
| OLD | NEW |