Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / components / view_manager / public / cpp / view_manager.h
blob7841f4175d15290ee494bb594415cca39b0b0c36
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.
5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_
8 #include <string>
10 #include "components/view_manager/public/cpp/types.h"
12 namespace mojo {
13 class View;
15 // Encapsulates a connection to the view manager service. A unique connection
16 // is made every time an app is embedded.
17 class ViewManager {
18 public:
19 virtual ~ViewManager() {}
21 // Returns the root of this connection.
22 virtual View* GetRoot() = 0;
24 // Returns a View known to this connection.
25 virtual View* GetViewById(Id id) = 0;
27 // Returns the focused view; null if focus is not yet known or another app is
28 // focused.
29 virtual View* GetFocusedView() = 0;
31 // Creates and returns a new View (which is owned by the ViewManager). Views
32 // are initially hidden, use SetVisible(true) to show.
33 virtual View* CreateView() = 0;
35 // Set view_manager.mojom for details.
36 virtual void SetEmbedRoot() = 0;
39 } // namespace mojo
41 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_