Revert "Reland c91b178b07b0d - Delete dead signin code (SigninGlobalError)"
[chromium-blink-merge.git] / components / view_manager / view_manager_root_delegate.h
blobb85440c7f22955368693be41b5f534b550c1e32a
1 // Copyright 2015 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_VIEW_MANAGER_ROOT_DELEGATE_H_
6 #define COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_DELEGATE_H_
8 namespace view_manager {
10 class ViewManagerServiceImpl;
12 // A ViewManagerRootDelegate interface is implemented by an object that
13 // has the ViewManagerServiceImpl that is associated with the
14 // ViewManagerRootImpl that holds a pointer to this object. Typically, a
15 // ViewManagerRootDelegate will also manage the lifetime of the
16 // ViewManagerRootImpl and will delete the object when it gets informed of
17 // when the Display of the root is closed.
18 class ViewManagerRootDelegate {
19 public:
20 // Called when the window associated with the root is completely initialized
21 // (i.e. the ViewportMetrics for the display is known).
22 virtual void OnDisplayInitialized() = 0;
24 // Called when the window associated with the root is closed.
25 virtual void OnDisplayClosed() = 0;
27 // Returns the ViewManagerServiceImpl associated with the delegate.
28 virtual ViewManagerServiceImpl* GetViewManagerService() = 0;
30 protected:
31 virtual ~ViewManagerRootDelegate() {}
34 } // namespace view_manager
36 #endif // COMPONENTS_VIEW_MANAGER_VIEW_MANAGER_ROOT_DELEGATE_H_