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

Side by Side Diff: mojo/services/view_manager/public/cpp/view_manager.h

Issue 790623003: Restructure public side of view_manager service. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: BUILD.gn file reorderings Created 6 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 unified diff | Download patch
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_
6 #define MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ 6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
11 #include "mojo/services/public/cpp/view_manager/types.h" 11 #include "mojo/services/view_manager/public/cpp/types.h"
12 12
13 namespace mojo { 13 namespace mojo {
14 class View; 14 class View;
15 15
16 // Encapsulates a connection to the view manager service. 16 // Encapsulates a connection to the view manager service.
17 // A unique connection is made for every unique embed path for an app. e.g. for 17 // A unique connection is made for every unique embed path for an app. e.g. for
18 // app B embed by the following paths: A->B, A->C->B - there are two connections 18 // app B embed by the following paths: A->B, A->C->B - there are two connections
19 // and thus two instances of this class. 19 // and thus two instances of this class.
20 class ViewManager { 20 class ViewManager {
21 public: 21 public:
22 // Returns the URL of the application that embedded this application. 22 // Returns the URL of the application that embedded this application.
23 virtual const std::string& GetEmbedderURL() const = 0; 23 virtual const std::string& GetEmbedderURL() const = 0;
24 24
25 // Returns all root views known to this connection. 25 // Returns all root views known to this connection.
26 virtual const std::vector<View*>& GetRoots() const = 0; 26 virtual const std::vector<View*>& GetRoots() const = 0;
27 27
28 // Returns a View known to this connection. 28 // Returns a View known to this connection.
29 virtual View* GetViewById(Id id) = 0; 29 virtual View* GetViewById(Id id) = 0;
30 30
31 protected: 31 protected:
32 virtual ~ViewManager() {} 32 virtual ~ViewManager() {}
33 }; 33 };
34 34
35 } // namespace mojo 35 } // namespace mojo
36 36
37 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ 37 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_
OLDNEW
« no previous file with comments | « mojo/services/view_manager/public/cpp/view.h ('k') | mojo/services/view_manager/public/cpp/view_manager_client_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698