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

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

Issue 799113004: Update mojo sdk to rev 59145288bae55b0fce4276b017df6a1117bcf00f (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: add mojo's ply to checklicenses whitelist 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>
10 9
11 #include "mojo/services/public/cpp/view_manager/types.h" 10 #include "mojo/services/view_manager/public/cpp/types.h"
12 11
13 namespace mojo { 12 namespace mojo {
14 class View; 13 class View;
15 14
16 // Encapsulates a connection to the view manager service. 15 // 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 16 // 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 17 // app B embed by the following paths: A->B, A->C->B - there are two connections
19 // and thus two instances of this class. 18 // and thus two instances of this class.
20 class ViewManager { 19 class ViewManager {
21 public: 20 public:
22 // Returns the URL of the application that embedded this application. 21 // Returns the URL of the application that embedded this application.
23 virtual const std::string& GetEmbedderURL() const = 0; 22 virtual const std::string& GetEmbedderURL() const = 0;
24 23
25 // Returns all root views known to this connection. 24 // Returns the root of this connection.
26 virtual const std::vector<View*>& GetRoots() const = 0; 25 virtual View* GetRoot() = 0;
27 26
28 // Returns a View known to this connection. 27 // Returns a View known to this connection.
29 virtual View* GetViewById(Id id) = 0; 28 virtual View* GetViewById(Id id) = 0;
30 29
30 // Returns the focused view; null if focus is not yet known or another app is
31 // focused.
32 virtual View* GetFocusedView() = 0;
33
31 protected: 34 protected:
32 virtual ~ViewManager() {} 35 virtual ~ViewManager() {}
33 }; 36 };
34 37
35 } // namespace mojo 38 } // namespace mojo
36 39
37 #endif // MOJO_SERVICES_PUBLIC_CPP_VIEW_MANAGER_VIEW_MANAGER_H_ 40 #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