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

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

Issue 837283003: Start replicating sandbox flags for OOPIF (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address Nasko's nit Created 5 years, 11 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
« no previous file with comments | « content/common/frame_replication_state.cc ('k') | content/public/test/mock_render_thread.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 18
19 namespace IPC { 19 namespace IPC {
20 class MessageFilter; 20 class MessageFilter;
21 class MessageReplyDeserializer; 21 class MessageReplyDeserializer;
22 } 22 }
23 23
24 namespace content { 24 namespace content {
25 25
26 enum class SandboxFlags;
27
26 // This class is a very simple mock of RenderThread. It simulates an IPC channel 28 // This class is a very simple mock of RenderThread. It simulates an IPC channel
27 // which supports only three messages: 29 // which supports only three messages:
28 // ViewHostMsg_CreateWidget : sync message sent by the Widget. 30 // ViewHostMsg_CreateWidget : sync message sent by the Widget.
29 // ViewHostMsg_CreateWindow : sync message sent by the Widget. 31 // ViewHostMsg_CreateWindow : sync message sent by the Widget.
30 // ViewMsg_Close : async, send to the Widget. 32 // ViewMsg_Close : async, send to the Widget.
31 class MockRenderThread : public RenderThread { 33 class MockRenderThread : public RenderThread {
32 public: 34 public:
33 MockRenderThread(); 35 MockRenderThread();
34 ~MockRenderThread() override; 36 ~MockRenderThread() override;
35 37
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 void OnCreateWindow( 128 void OnCreateWindow(
127 const ViewHostMsg_CreateWindow_Params& params, 129 const ViewHostMsg_CreateWindow_Params& params,
128 int* route_id, 130 int* route_id,
129 int* main_frame_route_id, 131 int* main_frame_route_id,
130 int* surface_id, 132 int* surface_id,
131 int64* cloned_session_storage_namespace_id); 133 int64* cloned_session_storage_namespace_id);
132 134
133 // The Frame expects to be returned a valid route_id different from its own. 135 // The Frame expects to be returned a valid route_id different from its own.
134 void OnCreateChildFrame(int new_frame_routing_id, 136 void OnCreateChildFrame(int new_frame_routing_id,
135 const std::string& frame_name, 137 const std::string& frame_name,
138 SandboxFlags sandbox_flags,
136 int* new_render_frame_id); 139 int* new_render_frame_id);
137 140
138 #if defined(OS_WIN) 141 #if defined(OS_WIN)
139 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle, 142 void OnDuplicateSection(base::SharedMemoryHandle renderer_handle,
140 base::SharedMemoryHandle* browser_handle); 143 base::SharedMemoryHandle* browser_handle);
141 #endif 144 #endif
142 145
143 IPC::TestSink sink_; 146 IPC::TestSink sink_;
144 147
145 // Routing id what will be assigned to the Widget. 148 // Routing id what will be assigned to the Widget.
(...skipping 18 matching lines...) Expand all
164 167
165 // Observers to notify. 168 // Observers to notify.
166 ObserverList<RenderProcessObserver> observers_; 169 ObserverList<RenderProcessObserver> observers_;
167 170
168 cc::TestSharedBitmapManager shared_bitmap_manager_; 171 cc::TestSharedBitmapManager shared_bitmap_manager_;
169 }; 172 };
170 173
171 } // namespace content 174 } // namespace content
172 175
173 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_ 176 #endif // CONTENT_PUBLIC_TEST_MOCK_RENDER_THREAD_H_
OLDNEW
« no previous file with comments | « content/common/frame_replication_state.cc ('k') | content/public/test/mock_render_thread.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698