| 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 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 WebKit::WebPopupType popup_type, | 113 WebKit::WebPopupType popup_type, |
| 114 int* route_id, | 114 int* route_id, |
| 115 int* surface_id); | 115 int* surface_id); |
| 116 | 116 |
| 117 // The View expects to be returned a valid route_id different from its own. | 117 // The View expects to be returned a valid route_id different from its own. |
| 118 // We do not keep track of the newly created widget in MockRenderThread, | 118 // We do not keep track of the newly created widget in MockRenderThread, |
| 119 // so it must be cleaned up on its own. | 119 // so it must be cleaned up on its own. |
| 120 void OnCreateWindow( | 120 void OnCreateWindow( |
| 121 const ViewHostMsg_CreateWindow_Params& params, | 121 const ViewHostMsg_CreateWindow_Params& params, |
| 122 int* route_id, | 122 int* route_id, |
| 123 int* main_frame_route_id, |
| 123 int* surface_id, | 124 int* surface_id, |
| 124 int64* cloned_session_storage_namespace_id); | 125 int64* cloned_session_storage_namespace_id); |
| 125 | 126 |
| 126 #if defined(OS_WIN) | 127 #if defined(OS_WIN) |
| 127 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, | 128 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, |
| 128 base::SharedMemoryHandle* browser_handle); | 129 base::SharedMemoryHandle* browser_handle); |
| 129 #endif | 130 #endif |
| 130 | 131 |
| 131 IPC::TestSink sink_; | 132 IPC::TestSink sink_; |
| 132 | 133 |
| 133 // Routing id what will be assigned to the Widget. | 134 // Routing id what will be assigned to the Widget. |
| 134 int32 routing_id_; | 135 int32 routing_id_; |
| 135 | 136 |
| 136 // Surface id what will be assigned to the Widget. | 137 // Surface id what will be assigned to the Widget. |
| 137 int32 surface_id_; | 138 int32 surface_id_; |
| 138 | 139 |
| 139 // Opener id reported by the Widget. | 140 // Opener id reported by the Widget. |
| 140 int32 opener_id_; | 141 int32 opener_id_; |
| 141 | 142 |
| 142 // We only keep track of one Widget, we learn its pointer when it | 143 // We only keep track of one Widget, we learn its pointer when it |
| 143 // adds a new route. We do not keep track of Widgets created with | 144 // adds a new route. We do not keep track of Widgets created with |
| 144 // OnCreateWindow. | 145 // OnCreateWindow. |
| 145 IPC::Listener* widget_; | 146 IPC::Listener* widget_; |
| 146 | 147 |
| 147 // Routing id that will be assigned to a CreateWindow Widget. | 148 // Routing id that will be assigned to a CreateWindow Widget. |
| 148 int32 new_window_routing_id_; | 149 int32 new_window_routing_id_; |
| 150 int32 new_window_main_frame_routing_id_; |
| 149 | 151 |
| 150 // The last known good deserializer for sync messages. | 152 // The last known good deserializer for sync messages. |
| 151 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; | 153 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; |
| 152 | 154 |
| 153 // A list of message filters added to this thread. | 155 // A list of message filters added to this thread. |
| 154 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; | 156 std::vector<scoped_refptr<IPC::ChannelProxy::MessageFilter> > filters_; |
| 155 }; | 157 }; |
| 156 | 158 |
| 157 } // namespace content | 159 } // namespace content |
| 158 | 160 |
| 159 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ | 161 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ |
| OLD | NEW |