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

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

Issue 1303773002: Give the main frame a RenderWidget. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 3 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"
11 #include "cc/test/test_shared_bitmap_manager.h" 11 #include "cc/test/test_shared_bitmap_manager.h"
12 #include "content/public/renderer/render_thread.h" 12 #include "content/public/renderer/render_thread.h"
13 #include "ipc/ipc_test_sink.h" 13 #include "ipc/ipc_test_sink.h"
14 #include "ipc/message_filter.h" 14 #include "ipc/message_filter.h"
15 #include "third_party/WebKit/public/web/WebPopupType.h" 15 #include "third_party/WebKit/public/web/WebPopupType.h"
16 16
17 struct ViewHostMsg_CreateWindow_Params; 17 struct ViewHostMsg_CreateWindow_Params;
18 struct ViewHostMsg_CreateWindow_Reply;
18 19
19 namespace IPC { 20 namespace IPC {
20 class MessageFilter; 21 class MessageFilter;
21 class MessageReplyDeserializer; 22 class MessageReplyDeserializer;
22 } 23 }
23 24
24 namespace blink { 25 namespace blink {
25 enum class WebSandboxFlags; 26 enum class WebSandboxFlags;
26 enum class WebTreeScopeType; 27 enum class WebTreeScopeType;
27 } 28 }
(...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 // This function operates as a regular IPC listener. Subclasses 117 // This function operates as a regular IPC listener. Subclasses
117 // overriding this should first delegate to this implementation. 118 // overriding this should first delegate to this implementation.
118 virtual bool OnMessageReceived(const IPC::Message& msg); 119 virtual bool OnMessageReceived(const IPC::Message& msg);
119 120
120 // The Widget expects to be returned valid route_id. 121 // The Widget expects to be returned valid route_id.
121 void OnCreateWidget(int opener_id, 122 void OnCreateWidget(int opener_id,
122 blink::WebPopupType popup_type, 123 blink::WebPopupType popup_type,
123 int* route_id, 124 int* route_id,
124 int* surface_id); 125 int* surface_id);
125 126
126 // The View expects to be returned a valid route_id different from its own. 127 // The View expects to be returned a valid route_id different from its own.
ncarter (slow) 2015/08/24 20:55:35 |route_id| comment is stale.
dcheng 2015/09/03 16:33:09 Done.
127 // We do not keep track of the newly created widget in MockRenderThread, 128 // We do not keep track of the newly created widget in MockRenderThread,
128 // so it must be cleaned up on its own. 129 // so it must be cleaned up on its own.
129 void OnCreateWindow( 130 void OnCreateWindow(const ViewHostMsg_CreateWindow_Params& params,
130 const ViewHostMsg_CreateWindow_Params& params, 131 ViewHostMsg_CreateWindow_Reply* reply);
131 int* route_id,
132 int* main_frame_route_id,
133 int* surface_id,
134 int64* cloned_session_storage_namespace_id);
135 132
136 // The Frame expects to be returned a valid route_id different from its own. 133 // The Frame expects to be returned a valid route_id different from its own.
137 void OnCreateChildFrame(int new_frame_routing_id, 134 void OnCreateChildFrame(int new_frame_routing_id,
138 blink::WebTreeScopeType scope, 135 blink::WebTreeScopeType scope,
139 const std::string& frame_name, 136 const std::string& frame_name,
140 blink::WebSandboxFlags sandbox_flags, 137 blink::WebSandboxFlags sandbox_flags,
141 int* new_render_frame_id); 138 int* new_render_frame_id);
142 139
143 #if defined(OS_WIN) 140 #if defined(OS_WIN)
144 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, 141 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle,
(...skipping 24 matching lines...) Expand all
169 166
170 // Observers to notify. 167 // Observers to notify.
171 base::ObserverList<RenderProcessObserver> observers_; 168 base::ObserverList<RenderProcessObserver> observers_;
172 169
173 cc::TestSharedBitmapManager shared_bitmap_manager_; 170 cc::TestSharedBitmapManager shared_bitmap_manager_;
174 }; 171 };
175 172
176 } // namespace content 173 } // namespace content
177 174
178 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ 175 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698