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

Unified Diff: content/browser/mojo/mojo_shell_client_host.cc

Issue 1465793005: Pass CapabilityFilter via CreateInstanceForHandle (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 1 month 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 | « no previous file | mojo/application/public/interfaces/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/mojo/mojo_shell_client_host.cc
diff --git a/content/browser/mojo/mojo_shell_client_host.cc b/content/browser/mojo/mojo_shell_client_host.cc
index 1bc85b51f168de0d8bc05c6909e59fe1d5f3771c..3a1acdfa8012cc5c5dcb7c0bce18db25573a9d20 100644
--- a/content/browser/mojo/mojo_shell_client_host.cc
+++ b/content/browser/mojo/mojo_shell_client_host.cc
@@ -4,14 +4,15 @@
#include "base/strings/stringprintf.h"
#include "base/thread_task_runner_handle.h"
+#include "components/mus/public/interfaces/gpu.mojom.h"
#include "content/browser/mojo/mojo_shell_client_host.h"
#include "content/common/mojo/mojo_messages.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/common/mojo_shell_connection.h"
#include "ipc/ipc_sender.h"
#include "mojo/application/public/cpp/application_impl.h"
+#include "mojo/application/public/interfaces/application_manager.mojom.h"
#include "mojo/converters/network/network_type_converters.h"
-#include "mojo/shell/application_manager.mojom.h"
#include "third_party/mojo/src/mojo/edk/embedder/embedder.h"
#include "third_party/mojo/src/mojo/edk/embedder/platform_channel_pair.h"
#include "third_party/mojo/src/mojo/edk/embedder/scoped_platform_handle.h"
@@ -82,8 +83,15 @@ void RegisterChildWithExternalShell(int child_process_id,
// http://crbug.com/555393
std::string url =
base::StringPrintf("exe:chrome_renderer%d", child_process_id);
+
+ mojo::CapabilityFilterPtr filter(mojo::CapabilityFilter::New());
+ mojo::Array<mojo::String> window_manager_interfaces;
+ window_manager_interfaces.push_back(mus::mojom::Gpu::Name_);
+ filter->filter.insert("mojo:mus", window_manager_interfaces.Pass());
application_manager->CreateInstanceForHandle(
- mojo::ScopedHandle(mojo::Handle(handle.release().value())), url);
+ mojo::ScopedHandle(mojo::Handle(handle.release().value())),
+ url,
+ filter.Pass());
// Send the other end to the child via Chrome IPC.
base::PlatformFile client_file = PlatformFileFromScopedPlatformHandle(
« no previous file with comments | « no previous file | mojo/application/public/interfaces/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698