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

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

Issue 2090773003: Add ability to bind a different InterfaceRegistry/InterfaceProvider to an incoming Connection. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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/test/mock_render_thread.cc ('k') | services/shell/public/cpp/connector.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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 1099 matching lines...) Expand 10 before | Expand all | Expand 10 after
1110 pepper_last_mouse_event_target_(nullptr), 1110 pepper_last_mouse_event_target_(nullptr),
1111 #endif 1111 #endif
1112 frame_binding_(this), 1112 frame_binding_(this),
1113 weak_factory_(this) { 1113 weak_factory_(this) {
1114 // We don't have a shell::Connection at this point, so use nullptr. 1114 // We don't have a shell::Connection at this point, so use nullptr.
1115 // TODO(beng): We should fix this, so we can apply policy about which 1115 // TODO(beng): We should fix this, so we can apply policy about which
1116 // interfaces get exposed. 1116 // interfaces get exposed.
1117 interface_registry_.reset(new shell::InterfaceRegistry(nullptr)); 1117 interface_registry_.reset(new shell::InterfaceRegistry(nullptr));
1118 shell::mojom::InterfaceProviderPtr remote_interfaces; 1118 shell::mojom::InterfaceProviderPtr remote_interfaces;
1119 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces); 1119 pending_remote_interface_provider_request_ = GetProxy(&remote_interfaces);
1120 remote_interfaces_.reset( 1120 remote_interfaces_.reset(new shell::InterfaceProvider);
1121 new shell::InterfaceProvider(std::move(remote_interfaces))); 1121 remote_interfaces_->Bind(std::move(remote_interfaces));
1122 blink_service_registry_.reset(new BlinkServiceRegistryImpl( 1122 blink_service_registry_.reset(new BlinkServiceRegistryImpl(
1123 remote_interfaces_->GetWeakPtr())); 1123 remote_interfaces_->GetWeakPtr()));
1124 1124
1125 std::pair<RoutingIDFrameMap::iterator, bool> result = 1125 std::pair<RoutingIDFrameMap::iterator, bool> result =
1126 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this)); 1126 g_routing_id_frame_map.Get().insert(std::make_pair(routing_id_, this));
1127 CHECK(result.second) << "Inserting a duplicate item."; 1127 CHECK(result.second) << "Inserting a duplicate item.";
1128 1128
1129 RenderThread::Get()->AddRoute(routing_id_, this); 1129 RenderThread::Get()->AddRoute(routing_id_, this);
1130 1130
1131 render_view_->RegisterRenderFrame(this); 1131 render_view_->RegisterRenderFrame(this);
(...skipping 5144 matching lines...) Expand 10 before | Expand all | Expand 10 after
6276 // event target. Potentially a Pepper plugin will receive the event. 6276 // event target. Potentially a Pepper plugin will receive the event.
6277 // In order to tell whether a plugin gets the last mouse event and which it 6277 // In order to tell whether a plugin gets the last mouse event and which it
6278 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6278 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6279 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6279 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6280 // |pepper_last_mouse_event_target_|. 6280 // |pepper_last_mouse_event_target_|.
6281 pepper_last_mouse_event_target_ = nullptr; 6281 pepper_last_mouse_event_target_ = nullptr;
6282 #endif 6282 #endif
6283 } 6283 }
6284 6284
6285 } // namespace content 6285 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/mock_render_thread.cc ('k') | services/shell/public/cpp/connector.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698