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_
10 #include "components/view_manager/public/cpp/types.h"
15 // Encapsulates a connection to the view manager service. A unique connection
16 // is made every time an app is embedded.
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
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;
41 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_H_