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

Side by Side Diff: components/view_manager/public/cpp/view_manager.h

Issue 1166123005: Removes ServiceProviders from ViewManager::Embed (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: use is_headless rather than check for browser. Created 5 years, 6 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
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 COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_ 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_ 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/view_manager/public/cpp/types.h" 10 #include "components/view_manager/public/cpp/types.h"
11 11
12 namespace mojo { 12 namespace mojo {
13 class View; 13 class View;
14 14
15 // Encapsulates a connection to the view manager service. A unique connection 15 // Encapsulates a connection to the view manager service. A unique connection
16 // is made every time an app is embedded. 16 // is made every time an app is embedded.
17 class ViewManager { 17 class ViewManager {
18 public: 18 public:
19 virtual ~ViewManager() {} 19 virtual ~ViewManager() {}
20 20
21 // Returns the URL of the application that embedded this application.
22 virtual const std::string& GetEmbedderURL() const = 0;
23
24 // Returns the root of this connection. 21 // Returns the root of this connection.
25 virtual View* GetRoot() = 0; 22 virtual View* GetRoot() = 0;
26 23
27 // Returns a View known to this connection. 24 // Returns a View known to this connection.
28 virtual View* GetViewById(Id id) = 0; 25 virtual View* GetViewById(Id id) = 0;
29 26
30 // Returns the focused view; null if focus is not yet known or another app is 27 // Returns the focused view; null if focus is not yet known or another app is
31 // focused. 28 // focused.
32 virtual View* GetFocusedView() = 0; 29 virtual View* GetFocusedView() = 0;
33 30
34 // Creates and returns a new View (which is owned by the ViewManager). Views 31 // Creates and returns a new View (which is owned by the ViewManager). Views
35 // are initially hidden, use SetVisible(true) to show. 32 // are initially hidden, use SetVisible(true) to show.
36 virtual View* CreateView() = 0; 33 virtual View* CreateView() = 0;
37 34
38 // Set view_manager.mojom for details. 35 // Set view_manager.mojom for details.
39 virtual void SetEmbedRoot() = 0; 36 virtual void SetEmbedRoot() = 0;
40 }; 37 };
41 38
42 } // namespace mojo 39 } // namespace mojo
43 40
44 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_ 41 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_
OLDNEW
« no previous file with comments | « components/view_manager/public/cpp/view.h ('k') | components/view_manager/public/cpp/view_manager_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698