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

Unified Diff: content/public/test/mock_render_thread.h

Issue 2363573002: Move ViewHostMsg_CreateWindow to mojom (Closed)
Patch Set: . Created 4 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 side-by-side diff with in-line comments
Download patch
Index: content/public/test/mock_render_thread.h
diff --git a/content/public/test/mock_render_thread.h b/content/public/test/mock_render_thread.h
index 909b3530ce3b2446818dab16ce794ce8ac885346..acd2b81c8b7a04d0fdda798a2b2e58ce2631bc06 100644
--- a/content/public/test/mock_render_thread.h
+++ b/content/public/test/mock_render_thread.h
@@ -20,8 +20,6 @@
#include "third_party/WebKit/public/web/WebPopupType.h"
struct FrameHostMsg_CreateChildFrame_Params;
-struct ViewHostMsg_CreateWindow_Params;
-struct ViewHostMsg_CreateWindow_Reply;
namespace IPC {
class MessageFilter;
@@ -35,10 +33,15 @@ enum class WebTreeScopeType;
namespace content {
+namespace mojom {
+class CreateNewWindowParams;
+class CreateNewWindowReply;
+class RenderMessageFilter;
+}
+
// This class is a very simple mock of RenderThread. It simulates an IPC channel
// which supports only three messages:
// ViewHostMsg_CreateWidget : sync message sent by the Widget.
-// ViewHostMsg_CreateWindow : sync message sent by the Widget.
// ViewMsg_Close : async, send to the Widget.
ncarter (slow) 2016/09/27 20:32:41 Let's redo this class comment so that it better de
Ken Rockot(use gerrit already) 2016/09/27 21:05:42 SGTM as-is. Done.
class MockRenderThread : public RenderThread {
public:
@@ -111,6 +114,12 @@ class MockRenderThread : public RenderThread {
base::ObserverList<RenderThreadObserver>& observers() { return observers_; }
+ // The View expects to be returned a valid |reply.route_id| different from its
+ // own. We do not keep track of the newly created widget in MockRenderThread,
+ // so it must be cleaned up on its own.
+ void OnCreateWindow(const mojom::CreateNewWindowParams& params,
+ mojom::CreateNewWindowReply* reply);
+
protected:
// This function operates as a regular IPC listener. Subclasses
// overriding this should first delegate to this implementation.
@@ -121,12 +130,6 @@ class MockRenderThread : public RenderThread {
blink::WebPopupType popup_type,
int* route_id);
- // The View expects to be returned a valid |reply.route_id| different from its
- // own. We do not keep track of the newly created widget in MockRenderThread,
- // so it must be cleaned up on its own.
- void OnCreateWindow(const ViewHostMsg_CreateWindow_Params& params,
- ViewHostMsg_CreateWindow_Reply* reply);
-
// The Frame expects to be returned a valid route_id different from its own.
void OnCreateChildFrame(const FrameHostMsg_CreateChildFrame_Params& params,
int* new_render_frame_id);
@@ -164,6 +167,8 @@ class MockRenderThread : public RenderThread {
std::unique_ptr<shell::InterfaceProvider> remote_interfaces_;
shell::mojom::InterfaceProviderRequest
pending_remote_interface_provider_request_;
+
+ std::unique_ptr<mojom::RenderMessageFilter> mock_render_message_filter_;
};
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698