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

Side by Side Diff: chrome/browser/mojo_runner_state.cc

Issue 1423063004: Allow Chrome to bind an Application request from mojo_runner. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@callback
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 unified diff | Download patch
« no previous file with comments | « chrome/browser/mojo_runner_state.h ('k') | chrome/browser/mojo_runner_util.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #include "chrome/browser/mojo_runner_state.h"
6
7 #include "mojo/application/public/cpp/application_delegate.h"
8 #include "mojo/application/public/cpp/application_impl.h"
9 #include "mojo/runner/child/runner_connection.h"
10
11 class ChromeApplicationDelegate : public mojo::ApplicationDelegate {
12 public:
13 ChromeApplicationDelegate() {}
14 ~ChromeApplicationDelegate() override {}
15
16 private:
17 void Initialize(mojo::ApplicationImpl* application) override {
18 // TODO(beng): Connect to the window manager.
19 }
20 bool ConfigureIncomingConnection(
21 mojo::ApplicationConnection* connection) override {
22 return false;
23 }
24
25 DISALLOW_COPY_AND_ASSIGN(ChromeApplicationDelegate);
26 };
27
28 MojoRunnerState::MojoRunnerState() {}
29 MojoRunnerState::~MojoRunnerState() {}
30
31 void MojoRunnerState::WaitForConnection() {
32 mojo::InterfaceRequest<mojo::Application> application_request;
33 runner_connection_.reset(
34 mojo::runner::RunnerConnection::ConnectToRunner(&application_request));
35 application_delegate_.reset(new ChromeApplicationDelegate);
36 application_impl_.reset(new mojo::ApplicationImpl(
37 application_delegate_.get(), application_request.Pass()));
38 application_impl_->WaitForInitialize();
39 }
OLDNEW
« no previous file with comments | « chrome/browser/mojo_runner_state.h ('k') | chrome/browser/mojo_runner_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698