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

Side by Side Diff: content/public/browser/web_contents_binding_set.cc

Issue 2310563002: Adds routed interface support between RenderFrameHost and RenderFrame (Closed)
Patch Set: nit 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 unified diff | Download patch
« no previous file with comments | « content/public/browser/web_contents_binding_set.h ('k') | content/public/common/BUILD.gn » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #include "content/public/browser/web_contents_binding_set.h"
6
7 #include <utility>
8
9 #include "base/logging.h"
10 #include "content/browser/web_contents/web_contents_impl.h"
11
12 namespace content {
13
14 void WebContentsBindingSet::Binder::OnRequestForFrame(
15 RenderFrameHost* render_frame_host,
16 mojo::ScopedInterfaceEndpointHandle handle) {
17 NOTREACHED();
18 }
19
20 WebContentsBindingSet::WebContentsBindingSet(WebContents* web_contents,
21 const std::string& interface_name,
22 std::unique_ptr<Binder> binder)
23 : remove_callback_(
24 static_cast<WebContentsImpl*>(web_contents)->AddBindingSet(
25 interface_name, this)),
26 binder_(std::move(binder)) {}
27
28 WebContentsBindingSet::~WebContentsBindingSet() {
29 remove_callback_.Run();
30 }
31
32 void WebContentsBindingSet::CloseAllBindings() {
33 binder_.reset();
34 }
35
36 void WebContentsBindingSet::OnRequestForFrame(
37 RenderFrameHost* render_frame_host,
38 mojo::ScopedInterfaceEndpointHandle handle) {
39 DCHECK(binder_);
40 binder_->OnRequestForFrame(render_frame_host, std::move(handle));
41 }
42
43 } // namespace content
OLDNEW
« no previous file with comments | « content/public/browser/web_contents_binding_set.h ('k') | content/public/common/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698