| 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 <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| 11 #include "base/memory/shared_memory.h" | 11 #include "base/memory/shared_memory.h" |
| 12 #include "base/observer_list.h" | 12 #include "base/observer_list.h" |
| 13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
| 14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
| 15 #include "cc/test/test_shared_bitmap_manager.h" | 15 #include "cc/test/test_shared_bitmap_manager.h" |
| 16 #include "content/public/renderer/render_thread.h" | 16 #include "content/public/renderer/render_thread.h" |
| 17 #include "ipc/ipc_test_sink.h" | 17 #include "ipc/ipc_test_sink.h" |
| 18 #include "ipc/message_filter.h" | 18 #include "ipc/message_filter.h" |
| 19 #include "third_party/WebKit/public/web/WebPopupType.h" | 19 #include "third_party/WebKit/public/web/WebPopupType.h" |
| 20 | 20 |
| 21 struct FrameHostMsg_CreateChildFrame_Params; |
| 21 struct ViewHostMsg_CreateWindow_Params; | 22 struct ViewHostMsg_CreateWindow_Params; |
| 22 struct ViewHostMsg_CreateWindow_Reply; | 23 struct ViewHostMsg_CreateWindow_Reply; |
| 23 | 24 |
| 24 namespace IPC { | 25 namespace IPC { |
| 25 class MessageFilter; | 26 class MessageFilter; |
| 26 class MessageReplyDeserializer; | 27 class MessageReplyDeserializer; |
| 27 } | 28 } |
| 28 | 29 |
| 29 namespace blink { | 30 namespace blink { |
| 30 enum class WebSandboxFlags; | 31 enum class WebSandboxFlags; |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 119 blink::WebPopupType popup_type, | 120 blink::WebPopupType popup_type, |
| 120 int* route_id); | 121 int* route_id); |
| 121 | 122 |
| 122 // The View expects to be returned a valid |reply.route_id| different from its | 123 // The View expects to be returned a valid |reply.route_id| different from its |
| 123 // own. We do not keep track of the newly created widget in MockRenderThread, | 124 // own. We do not keep track of the newly created widget in MockRenderThread, |
| 124 // so it must be cleaned up on its own. | 125 // so it must be cleaned up on its own. |
| 125 void OnCreateWindow(const ViewHostMsg_CreateWindow_Params& params, | 126 void OnCreateWindow(const ViewHostMsg_CreateWindow_Params& params, |
| 126 ViewHostMsg_CreateWindow_Reply* reply); | 127 ViewHostMsg_CreateWindow_Reply* reply); |
| 127 | 128 |
| 128 // The Frame expects to be returned a valid route_id different from its own. | 129 // The Frame expects to be returned a valid route_id different from its own. |
| 129 void OnCreateChildFrame( | 130 void OnCreateChildFrame(const FrameHostMsg_CreateChildFrame_Params& params, |
| 130 int new_frame_routing_id, | 131 int* new_render_frame_id); |
| 131 blink::WebTreeScopeType scope, | |
| 132 const std::string& frame_name, | |
| 133 blink::WebSandboxFlags sandbox_flags, | |
| 134 const blink::WebFrameOwnerProperties& frame_owner_properties, | |
| 135 int* new_render_frame_id); | |
| 136 | 132 |
| 137 #if defined(OS_WIN) | 133 #if defined(OS_WIN) |
| 138 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, | 134 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, |
| 139 base::SharedMemoryHandle* browser_handle); | 135 base::SharedMemoryHandle* browser_handle); |
| 140 #endif | 136 #endif |
| 141 | 137 |
| 142 IPC::TestSink sink_; | 138 IPC::TestSink sink_; |
| 143 | 139 |
| 144 // Routing id what will be assigned to the Widget. | 140 // Routing id what will be assigned to the Widget. |
| 145 int32_t routing_id_; | 141 int32_t routing_id_; |
| (...skipping 15 matching lines...) Expand all Loading... |
| 161 | 157 |
| 162 // Observers to notify. | 158 // Observers to notify. |
| 163 base::ObserverList<RenderProcessObserver> observers_; | 159 base::ObserverList<RenderProcessObserver> observers_; |
| 164 | 160 |
| 165 cc::TestSharedBitmapManager shared_bitmap_manager_; | 161 cc::TestSharedBitmapManager shared_bitmap_manager_; |
| 166 }; | 162 }; |
| 167 | 163 |
| 168 } // namespace content | 164 } // namespace content |
| 169 | 165 |
| 170 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ | 166 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ |
| OLD | NEW |