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

Unified Diff: chrome/browser/mojo_runner_state.h

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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/mojo_runner_state.h
diff --git a/chrome/browser/mojo_runner_state.h b/chrome/browser/mojo_runner_state.h
new file mode 100644
index 0000000000000000000000000000000000000000..3874169f420f4145ec9daf35c5f486ef3db2d4b7
--- /dev/null
+++ b/chrome/browser/mojo_runner_state.h
@@ -0,0 +1,39 @@
+// Copyright 2015 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_MOJO_RUNNER_STATE_H_
+#define CHROME_BROWSER_MOJO_RUNNER_STATE_H_
+
+#include "base/macros.h"
+#include "base/memory/scoped_ptr.h"
+
+namespace mojo {
+class ApplicationImpl;
+namespace runner {
+class RunnerConnection;
+}
+}
+
+class ChromeApplicationDelegate;
+
+// Creating an instance of this class blocks the calling thread until a
sky 2015/11/05 19:21:28 nit: have constructor just setup state and Init()
+// connection to the spawning mojo_runner is established, an Application
+// request from it is bound, and the Initialize() method on that
+// application is called.
+// TODO(beng): figure out if/how this should be exposed to other layers
+// of code in Chrome.
+class MojoRunnerState {
+ public:
+ MojoRunnerState();
+ ~MojoRunnerState();
+
+ private:
+ scoped_ptr<mojo::runner::RunnerConnection> runner_connection_;
+ scoped_ptr<mojo::ApplicationImpl> application_impl_;
+ scoped_ptr<ChromeApplicationDelegate> application_delegate_;
sky 2015/11/05 19:21:28 You need to forward declare ChromeApplicationDeleg
+
+ DISALLOW_COPY_AND_ASSIGN(MojoRunnerState);
+};
+
+#endif // CHROME_BROWSER_MOJO_RUNNER_STATE_H_

Powered by Google App Engine
This is Rietveld 408576698