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

Side by Side Diff: content/shell/renderer/shell_content_renderer_client.cc

Issue 2049303002: Add the UtilityProcessMojoClient class and convert SafeJsonParser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed compilation 2 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
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/shell/renderer/shell_content_renderer_client.h" 5 #include "content/shell/renderer/shell_content_renderer_client.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "base/logging.h"
9 #include "base/macros.h" 10 #include "base/macros.h"
10 #include "components/web_cache/renderer/web_cache_impl.h" 11 #include "components/web_cache/renderer/web_cache_impl.h"
11 #include "content/public/common/service_registry.h" 12 #include "content/public/common/service_registry.h"
12 #include "content/public/test/test_mojo_service.mojom.h" 13 #include "content/public/test/test_mojo_service.mojom.h"
13 #include "content/shell/common/shell_switches.h" 14 #include "content/shell/common/shell_switches.h"
14 #include "content/shell/renderer/shell_render_view_observer.h" 15 #include "content/shell/renderer/shell_render_view_observer.h"
15 #include "mojo/public/cpp/bindings/binding.h" 16 #include "mojo/public/cpp/bindings/binding.h"
16 #include "mojo/public/cpp/system/message_pipe.h" 17 #include "mojo/public/cpp/system/message_pipe.h"
17 #include "third_party/WebKit/public/web/WebTestingSupport.h" 18 #include "third_party/WebKit/public/web/WebTestingSupport.h"
18 #include "third_party/WebKit/public/web/WebView.h" 19 #include "third_party/WebKit/public/web/WebView.h"
(...skipping 30 matching lines...) Expand all
49 mojo::ScopedMessagePipeHandle pipe = binding_.Unbind().PassMessagePipe(); 50 mojo::ScopedMessagePipeHandle pipe = binding_.Unbind().PassMessagePipe();
50 MojoResult rv = mojo::WriteMessageRaw( 51 MojoResult rv = mojo::WriteMessageRaw(
51 pipe.get(), kBadMessage.data(), kBadMessage.size(), nullptr, 0, 52 pipe.get(), kBadMessage.data(), kBadMessage.size(), nullptr, 0,
52 MOJO_WRITE_MESSAGE_FLAG_NONE); 53 MOJO_WRITE_MESSAGE_FLAG_NONE);
53 DCHECK_EQ(rv, MOJO_RESULT_OK); 54 DCHECK_EQ(rv, MOJO_RESULT_OK);
54 55
55 // Deletes this. 56 // Deletes this.
56 OnConnectionError(); 57 OnConnectionError();
57 } 58 }
58 59
60 void DoTerminateProcess(const DoTerminateProcessCallback& callback) override {
61 NOTREACHED();
62 }
63
64 void CreateFolder(const CreateFolderCallback& callback) override {
65 NOTREACHED();
66 }
67
59 void GetRequestorName(const GetRequestorNameCallback& callback) override { 68 void GetRequestorName(const GetRequestorNameCallback& callback) override {
60 callback.Run("Not implemented."); 69 callback.Run("Not implemented.");
61 } 70 }
62 71
63 mojo::Binding<mojom::TestMojoService> binding_; 72 mojo::Binding<mojom::TestMojoService> binding_;
64 73
65 DISALLOW_COPY_AND_ASSIGN(TestMojoServiceImpl); 74 DISALLOW_COPY_AND_ASSIGN(TestMojoServiceImpl);
66 }; 75 };
67 76
68 void CreateTestMojoService(mojom::TestMojoServiceRequest request) { 77 void CreateTestMojoService(mojom::TestMojoServiceRequest request) {
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 } 121 }
113 } 122 }
114 123
115 void ShellContentRendererClient::RegisterProcessMojoServices( 124 void ShellContentRendererClient::RegisterProcessMojoServices(
116 ServiceRegistry* service_registry) { 125 ServiceRegistry* service_registry) {
117 service_registry->AddService<mojom::TestMojoService>( 126 service_registry->AddService<mojom::TestMojoService>(
118 base::Bind(&CreateTestMojoService)); 127 base::Bind(&CreateTestMojoService));
119 } 128 }
120 129
121 } // namespace content 130 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698