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

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

Issue 2079943002: Change RenderFrame to use InterfaceRegistry et al. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@a2
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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | content/public/utility/content_utility_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/test/mock_render_thread.cc
diff --git a/content/public/test/mock_render_thread.cc b/content/public/test/mock_render_thread.cc
index a3522a3126173f63c6a775bd498665f545a94756..11cf993fadf331df589e19201b174b39c4007a8b 100644
--- a/content/public/test/mock_render_thread.cc
+++ b/content/public/test/mock_render_thread.cc
@@ -9,13 +9,14 @@
#include "base/threading/thread_task_runner_handle.h"
#include "build/build_config.h"
#include "content/common/frame_messages.h"
-#include "content/common/mojo/service_registry_impl.h"
#include "content/common/view_messages.h"
#include "content/public/renderer/render_thread_observer.h"
#include "content/renderer/render_view_impl.h"
#include "ipc/ipc_message_utils.h"
#include "ipc/ipc_sync_message.h"
#include "ipc/message_filter.h"
+#include "services/shell/public/cpp/interface_provider.h"
+#include "services/shell/public/cpp/interface_registry.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/WebKit/public/web/WebScriptController.h"
@@ -183,10 +184,21 @@ void MockRenderThread::ReleaseCachedFonts() {
#endif // OS_WIN
-ServiceRegistry* MockRenderThread::GetServiceRegistry() {
- if (!service_registry_)
- service_registry_.reset(new ServiceRegistryImpl);
- return service_registry_.get();
+shell::InterfaceRegistry* MockRenderThread::GetInterfaceRegistry() {
+ if (!interface_registry_)
+ interface_registry_.reset(new shell::InterfaceRegistry(nullptr));
+ return interface_registry_.get();
+}
+
+shell::InterfaceProvider* MockRenderThread::GetRemoteInterfaces() {
+ if (!remote_interfaces_) {
+ shell::mojom::InterfaceProviderPtr remote_interface_provider;
+ pending_remote_interface_provider_request_ =
+ GetProxy(&remote_interface_provider);
+ remote_interfaces_.reset(new shell::InterfaceProvider(
+ std::move(remote_interface_provider)));
+ }
+ return remote_interfaces_.get();
}
void MockRenderThread::SendCloseMessage() {
« no previous file with comments | « content/public/test/mock_render_thread.h ('k') | content/public/utility/content_utility_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698