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

Side by Side Diff: services/window_manager/window_manager_delegate.h

Issue 1531403003: Delete the ViewManager and WindowManager services. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-3
Patch Set: rebase Created 4 years, 11 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright 2014 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 SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_DELEGATE_H_
6 #define SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_DELEGATE_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "mojo/public/cpp/bindings/string.h"
10 #include "mojo/public/interfaces/application/service_provider.mojom.h"
11 #include "mojo/services/view_manager/cpp/view_manager_delegate.h"
12
13 namespace mojo {
14 class ApplicationConnection;
15 }
16
17 namespace window_manager {
18
19 class WindowManagerRoot;
20
21 class WindowManagerDelegate {
22 public:
23 // See WindowManager::Embed() for details.
24 virtual void Embed(const mojo::String& url,
25 mojo::InterfaceRequest<mojo::ServiceProvider> services,
26 mojo::ServiceProviderPtr exposed_services) = 0;
27
28 protected:
29 virtual ~WindowManagerDelegate() {}
30 };
31
32 // Controls a single instance of WindowManagerRoot, representing one native
33 // window and all its Mojo-controlled views inside it. Instances of this object
34 // are owned by the WindowManagerRoot they control.
35 class WindowManagerController : public WindowManagerDelegate,
36 public mojo::ViewManagerDelegate {};
37
38 // Creates WindowManagerControllers.
39 // This class should be implemented by window managers and passed to the
40 // WindowManagerApp object.
41 class WindowManagerControllerFactory {
42 public:
43 // CreateWindowManagerController() is called by WindowManagerRoot to create
44 // its controller. The WindowManagerRoot passed to this method is guaranteed
45 // to remain valid for the entire lifetime of the created
46 // WindowManagerController.
47 virtual scoped_ptr<WindowManagerController> CreateWindowManagerController(
48 mojo::ApplicationConnection* connection,
49 WindowManagerRoot* wm_root_) = 0;
50 };
51
52 } // namespace mojo
53
54 #endif // SERVICES_WINDOW_MANAGER_WINDOW_MANAGER_DELEGATE_H_
OLDNEW
« 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