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

Side by Side Diff: content/renderer/mus/render_widget_window_tree_client_factory.cc

Issue 2182643003: Remove shell::Connection* parameter to InterfaceFactory<T>::Create() (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 4 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/test_mojo_app.cc ('k') | ios/web/webui/mojo_facade_unittest.mm » ('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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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/mus/render_widget_window_tree_client_factory.h" 5 #include "content/renderer/mus/render_widget_window_tree_client_factory.h"
6 6
7 #include <stdint.h> 7 #include <stdint.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 50
51 private: 51 private:
52 // ConnectionFilter implementation: 52 // ConnectionFilter implementation:
53 bool OnConnect(shell::Connection* connection, 53 bool OnConnect(shell::Connection* connection,
54 shell::Connector* connector) override { 54 shell::Connector* connector) override {
55 connection->AddInterface<mojom::RenderWidgetWindowTreeClientFactory>(this); 55 connection->AddInterface<mojom::RenderWidgetWindowTreeClientFactory>(this);
56 return true; 56 return true;
57 } 57 }
58 58
59 // shell::InterfaceFactory<mojom::RenderWidgetWindowTreeClientFactory>: 59 // shell::InterfaceFactory<mojom::RenderWidgetWindowTreeClientFactory>:
60 void Create(shell::Connection* connection, 60 void Create(const shell::Identity& remote_identity,
61 mojo::InterfaceRequest<mojom::RenderWidgetWindowTreeClientFactory> 61 mojo::InterfaceRequest<mojom::RenderWidgetWindowTreeClientFactory>
62 request) override { 62 request) override {
63 bindings_.AddBinding(this, std::move(request)); 63 bindings_.AddBinding(this, std::move(request));
64 } 64 }
65 65
66 // mojom::RenderWidgetWindowTreeClientFactory implementation. 66 // mojom::RenderWidgetWindowTreeClientFactory implementation.
67 void CreateWindowTreeClientForRenderWidget( 67 void CreateWindowTreeClientForRenderWidget(
68 uint32_t routing_id, 68 uint32_t routing_id,
69 ui::mojom::WindowTreeClientRequest request) override { 69 ui::mojom::WindowTreeClientRequest request) override {
70 main_thread_task_runner_->PostTask( 70 main_thread_task_runner_->PostTask(
71 FROM_HERE, base::Bind(&BindMusConnectionOnMainThread, routing_id, 71 FROM_HERE, base::Bind(&BindMusConnectionOnMainThread, routing_id,
72 base::Passed(&request))); 72 base::Passed(&request)));
73 } 73 }
74 74
75 scoped_refptr<base::SequencedTaskRunner> main_thread_task_runner_; 75 scoped_refptr<base::SequencedTaskRunner> main_thread_task_runner_;
76 mojo::BindingSet<mojom::RenderWidgetWindowTreeClientFactory> bindings_; 76 mojo::BindingSet<mojom::RenderWidgetWindowTreeClientFactory> bindings_;
77 77
78 DISALLOW_COPY_AND_ASSIGN(RenderWidgetWindowTreeClientFactoryImpl); 78 DISALLOW_COPY_AND_ASSIGN(RenderWidgetWindowTreeClientFactoryImpl);
79 }; 79 };
80 80
81 } // namespace 81 } // namespace
82 82
83 void CreateRenderWidgetWindowTreeClientFactory( 83 void CreateRenderWidgetWindowTreeClientFactory(
84 MojoShellConnection* connection) { 84 MojoShellConnection* connection) {
85 connection->AddConnectionFilter( 85 connection->AddConnectionFilter(
86 base::MakeUnique<RenderWidgetWindowTreeClientFactoryImpl>()); 86 base::MakeUnique<RenderWidgetWindowTreeClientFactoryImpl>());
87 } 87 }
88 88
89 } // namespace content 89 } // namespace content
OLDNEW
« no previous file with comments | « content/public/test/test_mojo_app.cc ('k') | ios/web/webui/mojo_facade_unittest.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698