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

Side by Side Diff: content/renderer/render_thread_impl.cc

Issue 2535483002: Plumb site engagement to the renderer process. (Closed)
Patch Set: Rebase Created 4 years 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/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/dom/Document.h » ('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 #include "content/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <utility> 10 #include <utility>
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 // We can receive a GetServiceProviderForFrame message for a frame not yet 345 // We can receive a GetServiceProviderForFrame message for a frame not yet
346 // created due to a race between the message and a 346 // created due to a race between the message and a
347 // mojom::Renderer::CreateView IPC that triggers creation of the RenderFrame 347 // mojom::Renderer::CreateView IPC that triggers creation of the RenderFrame
348 // we want. 348 // we want.
349 if (!frame) { 349 if (!frame) {
350 RenderThreadImpl::current()->RegisterPendingFrameCreate( 350 RenderThreadImpl::current()->RegisterPendingFrameCreate(
351 frame_routing_id, std::move(frame_request), std::move(frame_host)); 351 frame_routing_id, std::move(frame_request), std::move(frame_host));
352 return; 352 return;
353 } 353 }
354 354
355 frame->Bind(std::move(frame_request), std::move(frame_host)); 355 frame->BindFrame(std::move(frame_request), std::move(frame_host));
356 } 356 }
357 357
358 private: 358 private:
359 int32_t routing_id_highmark_; 359 int32_t routing_id_highmark_;
360 }; 360 };
361 361
362 void CreateFrameFactory(mojom::FrameFactoryRequest request) { 362 void CreateFrameFactory(mojom::FrameFactoryRequest request) {
363 mojo::MakeStrongBinding(base::MakeUnique<FrameFactoryImpl>(), 363 mojo::MakeStrongBinding(base::MakeUnique<FrameFactoryImpl>(),
364 std::move(request)); 364 std::move(request));
365 } 365 }
(...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after
1122 ChildThreadImpl::GetRouter()->AddRoute(routing_id, listener); 1122 ChildThreadImpl::GetRouter()->AddRoute(routing_id, listener);
1123 auto it = pending_frame_creates_.find(routing_id); 1123 auto it = pending_frame_creates_.find(routing_id);
1124 if (it == pending_frame_creates_.end()) 1124 if (it == pending_frame_creates_.end())
1125 return; 1125 return;
1126 1126
1127 RenderFrameImpl* frame = RenderFrameImpl::FromRoutingID(routing_id); 1127 RenderFrameImpl* frame = RenderFrameImpl::FromRoutingID(routing_id);
1128 if (!frame) 1128 if (!frame)
1129 return; 1129 return;
1130 1130
1131 scoped_refptr<PendingFrameCreate> create(it->second); 1131 scoped_refptr<PendingFrameCreate> create(it->second);
1132 frame->Bind(it->second->TakeFrameRequest(), it->second->TakeFrameHost()); 1132 frame->BindFrame(it->second->TakeFrameRequest(), it->second->TakeFrameHost());
1133 pending_frame_creates_.erase(it); 1133 pending_frame_creates_.erase(it);
1134 } 1134 }
1135 1135
1136 void RenderThreadImpl::RemoveRoute(int32_t routing_id) { 1136 void RenderThreadImpl::RemoveRoute(int32_t routing_id) {
1137 ChildThreadImpl::GetRouter()->RemoveRoute(routing_id); 1137 ChildThreadImpl::GetRouter()->RemoveRoute(routing_id);
1138 } 1138 }
1139 1139
1140 void RenderThreadImpl::AddEmbeddedWorkerRoute(int32_t routing_id, 1140 void RenderThreadImpl::AddEmbeddedWorkerRoute(int32_t routing_id,
1141 IPC::Listener* listener) { 1141 IPC::Listener* listener) {
1142 AddRoute(routing_id, listener); 1142 AddRoute(routing_id, listener);
(...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after
2486 } 2486 }
2487 } 2487 }
2488 2488
2489 void RenderThreadImpl::OnRendererInterfaceRequest( 2489 void RenderThreadImpl::OnRendererInterfaceRequest(
2490 mojom::RendererAssociatedRequest request) { 2490 mojom::RendererAssociatedRequest request) {
2491 DCHECK(!renderer_binding_.is_bound()); 2491 DCHECK(!renderer_binding_.is_bound());
2492 renderer_binding_.Bind(std::move(request)); 2492 renderer_binding_.Bind(std::move(request));
2493 } 2493 }
2494 2494
2495 } // namespace content 2495 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_frame_impl.cc ('k') | third_party/WebKit/Source/core/dom/Document.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698