OLD | NEW |
(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 #ifndef CHROME_BROWSER_MOJO_RUNNER_STATE_H_ |
| 6 #define CHROME_BROWSER_MOJO_RUNNER_STATE_H_ |
| 7 |
| 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" |
| 10 |
| 11 namespace mojo { |
| 12 class ApplicationImpl; |
| 13 namespace runner { |
| 14 class RunnerConnection; |
| 15 } |
| 16 } |
| 17 |
| 18 class ChromeApplicationDelegate; |
| 19 |
| 20 // Encapsulates a connection to a spawning mojo_runner/shell. |
| 21 // TODO(beng): figure out if/how this should be exposed to other layers |
| 22 // of code in Chrome. |
| 23 class MojoRunnerState { |
| 24 public: |
| 25 MojoRunnerState(); |
| 26 ~MojoRunnerState(); |
| 27 |
| 28 // Blocks the calling thread until a connection to the spawning mojo_runner |
| 29 // is established, an Application request from it is bound, and the |
| 30 // Initialize() method on that application is called. |
| 31 void WaitForConnection(); |
| 32 |
| 33 private: |
| 34 scoped_ptr<mojo::runner::RunnerConnection> runner_connection_; |
| 35 scoped_ptr<mojo::ApplicationImpl> application_impl_; |
| 36 scoped_ptr<ChromeApplicationDelegate> application_delegate_; |
| 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(MojoRunnerState); |
| 39 }; |
| 40 |
| 41 #endif // CHROME_BROWSER_MOJO_RUNNER_STATE_H_ |
OLD | NEW |