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

Unified Diff: content/renderer/render_thread_impl.cc

Issue 2821473002: Service CreateNewWindow on the UI thread with a new mojo interface (Closed)
Patch Set: MakeShared goodness Created 3 years, 8 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/renderer/render_thread_impl.cc
diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc
index bd4ef1a6c6400f651419daaff4a67dff50dc3957..7a77da1d6d5ea74edee558d5afb9a60958644a90 100644
--- a/content/renderer/render_thread_impl.cc
+++ b/content/renderer/render_thread_impl.cc
@@ -321,9 +321,10 @@ class FrameFactoryImpl : public mojom::FrameFactory {
private:
// mojom::FrameFactory:
- void CreateFrame(int32_t frame_routing_id,
- mojom::FrameRequest frame_request,
- mojom::FrameHostPtr frame_host) override {
+ void CreateFrame(
+ int32_t frame_routing_id,
+ mojom::FrameRequest frame_request,
+ mojom::FrameHostInterfaceBrokerPtr frame_host_interface_broker) override {
// TODO(morrita): This is for investigating http://crbug.com/415059 and
// should be removed once it is fixed.
CHECK_LT(routing_id_highmark_, frame_routing_id);
@@ -336,11 +337,13 @@ class FrameFactoryImpl : public mojom::FrameFactory {
// we want.
if (!frame) {
RenderThreadImpl::current()->RegisterPendingFrameCreate(
- frame_routing_id, std::move(frame_request), std::move(frame_host));
+ frame_routing_id, std::move(frame_request),
+ std::move(frame_host_interface_broker));
return;
}
- frame->BindFrame(std::move(frame_request), std::move(frame_host));
+ frame->BindFrame(std::move(frame_request),
+ std::move(frame_host_interface_broker));
}
private:
@@ -996,7 +999,8 @@ void RenderThreadImpl::AddRoute(int32_t routing_id, IPC::Listener* listener) {
return;
scoped_refptr<PendingFrameCreate> create(it->second);
- frame->BindFrame(it->second->TakeFrameRequest(), it->second->TakeFrameHost());
+ frame->BindFrame(it->second->TakeFrameRequest(),
+ it->second->TakeInterfaceBroker());
pending_frame_creates_.erase(it);
}
@@ -1024,12 +1028,12 @@ void RenderThreadImpl::RemoveEmbeddedWorkerRoute(int32_t routing_id) {
void RenderThreadImpl::RegisterPendingFrameCreate(
int routing_id,
mojom::FrameRequest frame_request,
- mojom::FrameHostPtr frame_host) {
+ mojom::FrameHostInterfaceBrokerPtr frame_host_interface_broker) {
std::pair<PendingFrameCreateMap::iterator, bool> result =
pending_frame_creates_.insert(std::make_pair(
- routing_id,
- make_scoped_refptr(new PendingFrameCreate(
- routing_id, std::move(frame_request), std::move(frame_host)))));
+ routing_id, make_scoped_refptr(new PendingFrameCreate(
+ routing_id, std::move(frame_request),
+ std::move(frame_host_interface_broker)))));
CHECK(result.second) << "Inserting a duplicate item.";
}
@@ -2396,16 +2400,16 @@ void RenderThreadImpl::ReleaseFreeMemory() {
RenderThreadImpl::PendingFrameCreate::PendingFrameCreate(
int routing_id,
mojom::FrameRequest frame_request,
- mojom::FrameHostPtr frame_host)
+ mojom::FrameHostInterfaceBrokerPtr frame_host_interface_broker)
: routing_id_(routing_id),
frame_request_(std::move(frame_request)),
- frame_host_(std::move(frame_host)) {
+ frame_host_interface_broker_(std::move(frame_host_interface_broker)) {
// The RenderFrame may be deleted before the CreateFrame message is received.
// In that case, the RenderFrameHost should cancel the create, which is
- // detected by setting an error handler on |frame_host_|.
- frame_host_.set_connection_error_handler(base::Bind(
- &RenderThreadImpl::PendingFrameCreate::OnConnectionError,
- base::Unretained(this)));
+ // detected by setting an error handler on |frame_host_interface_broker_|.
+ frame_host_interface_broker_.set_connection_error_handler(
+ base::Bind(&RenderThreadImpl::PendingFrameCreate::OnConnectionError,
+ base::Unretained(this)));
}
RenderThreadImpl::PendingFrameCreate::~PendingFrameCreate() {

Powered by Google App Engine
This is Rietveld 408576698