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

Unified Diff: services/window_manager/window_manager_delegate.h

Issue 1536713004: Revert "Delete the ViewManager and WindowManager services." (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years 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 | « services/window_manager/window_manager_apptest.cc ('k') | services/window_manager/window_manager_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/window_manager/window_manager_delegate.h
diff --git a/services/window_manager/window_manager_delegate.h b/services/window_manager/window_manager_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..88ebb9059076ce9ffc0ed0a5d2dd311189cb766c
--- /dev/null
+++ b/services/window_manager/window_manager_delegate.h
@@ -0,0 +1,54 @@
+// Copyright 2014 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 SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_DELEGATE_H_
+#define SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_DELEGATE_H_
+
+#include "base/memory/scoped_ptr.h"
+#include "mojo/public/cpp/bindings/string.h"
+#include "mojo/public/interfaces/application/service_provider.mojom.h"
+#include "mojo/services/view_manager/cpp/view_manager_delegate.h"
+
+namespace mojo {
+class ApplicationConnection;
+}
+
+namespace window_manager {
+
+class WindowManagerRoot;
+
+class WindowManagerDelegate {
+ public:
+ // See WindowManager::Embed() for details.
+ virtual void Embed(const mojo::String& url,
+ mojo::InterfaceRequest<mojo::ServiceProvider> services,
+ mojo::ServiceProviderPtr exposed_services) = 0;
+
+ protected:
+ virtual ~WindowManagerDelegate() {}
+};
+
+// Controls a single instance of WindowManagerRoot, representing one native
+// window and all its Mojo-controlled views inside it. Instances of this object
+// are owned by the WindowManagerRoot they control.
+class WindowManagerController : public WindowManagerDelegate,
+ public mojo::ViewManagerDelegate {};
+
+// Creates WindowManagerControllers.
+// This class should be implemented by window managers and passed to the
+// WindowManagerApp object.
+class WindowManagerControllerFactory {
+ public:
+ // CreateWindowManagerController() is called by WindowManagerRoot to create
+ // its controller. The WindowManagerRoot passed to this method is guaranteed
+ // to remain valid for the entire lifetime of the created
+ // WindowManagerController.
+ virtual scoped_ptr<WindowManagerController> CreateWindowManagerController(
+ mojo::ApplicationConnection* connection,
+ WindowManagerRoot* wm_root_) = 0;
+};
+
+} // namespace mojo
+
+#endif // SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_DELEGATE_H_
« no previous file with comments | « services/window_manager/window_manager_apptest.cc ('k') | services/window_manager/window_manager_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698