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

Unified Diff: mojo/shell/application_manager/shell_impl.h

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/shell/application_manager/query_util_unittest.cc ('k') | mojo/shell/application_manager/shell_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/shell/application_manager/shell_impl.h
diff --git a/mojo/shell/application_manager/shell_impl.h b/mojo/shell/application_manager/shell_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..ef557a6310bb7eb333ea2746bc71f305288acc08
--- /dev/null
+++ b/mojo/shell/application_manager/shell_impl.h
@@ -0,0 +1,62 @@
+// 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 SHELL_APPLICATION_MANAGER_SHELL_IMPL_H_
+#define SHELL_APPLICATION_MANAGER_SHELL_IMPL_H_
+
+#include "base/callback.h"
+#include "mojo/public/cpp/bindings/binding.h"
+#include "mojo/public/cpp/bindings/error_handler.h"
+#include "mojo/public/interfaces/application/application.mojom.h"
+#include "mojo/public/interfaces/application/shell.mojom.h"
+#include "mojo/shell/application_manager/identity.h"
+#include "url/gurl.h"
+
+namespace mojo {
+namespace shell {
+
+class ApplicationManager;
+
+class ShellImpl : public Shell, public ErrorHandler {
+ public:
+ ShellImpl(ApplicationPtr application,
+ ApplicationManager* manager,
+ const Identity& resolved_identity,
+ const base::Closure& on_application_end);
+
+ ~ShellImpl() override;
+
+ void InitializeApplication(Array<String> args);
+
+ void ConnectToClient(const GURL& requested_url,
+ const GURL& requestor_url,
+ InterfaceRequest<ServiceProvider> services,
+ ServiceProviderPtr exposed_services);
+
+ Application* application() { return application_.get(); }
+ const Identity& identity() const { return identity_; }
+ base::Closure on_application_end() const { return on_application_end_; }
+
+ private:
+ // Shell implementation:
+ void ConnectToApplication(const String& app_url,
+ InterfaceRequest<ServiceProvider> services,
+ ServiceProviderPtr exposed_services) override;
+
+ // ErrorHandler implementation:
+ void OnConnectionError() override;
+
+ ApplicationManager* const manager_;
+ const Identity identity_;
+ base::Closure on_application_end_;
+ ApplicationPtr application_;
+ Binding<Shell> binding_;
+
+ DISALLOW_COPY_AND_ASSIGN(ShellImpl);
+};
+
+} // namespace shell
+} // namespace mojo
+
+#endif // SHELL_APPLICATION_MANAGER_SHELL_IMPL_H_
« no previous file with comments | « mojo/shell/application_manager/query_util_unittest.cc ('k') | mojo/shell/application_manager/shell_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698