Roll src/third_party/WebKit f298044:aa8346d (svn 202628:202629)
[chromium-blink-merge.git] / components / mus / view_tree_host_delegate.h
blob501249995259ed367723bc84198d775b830e8bcb
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_MUS_VIEW_TREE_HOST_DELEGATE_H_
6 #define COMPONENTS_MUS_VIEW_TREE_HOST_DELEGATE_H_
8 namespace mus {
10 class ViewTreeImpl;
12 // A ViewTreeHostDelegate interface is implemented by an object that
13 // has the ViewTreeImpl that is associated with the ViewTreeHostImpl that holds
14 // a pointer to this object. Typically, a ViewTreeHostDelegate will also manage
15 // the lifetime of the ViewTreeHostImpl and will delete the object when it gets
16 // informed of when the Display of the root is closed.
17 class ViewTreeHostDelegate {
18 public:
19 // Called when the window associated with the root is completely initialized
20 // (i.e. the ViewportMetrics for the display is known).
21 virtual void OnDisplayInitialized() = 0;
23 // Called when the window associated with the root is closed.
24 virtual void OnDisplayClosed() = 0;
26 // Returns the ViewTreeImpl associated with the delegate.
27 virtual ViewTreeImpl* GetViewTree() = 0;
29 protected:
30 virtual ~ViewTreeHostDelegate() {}
33 } // namespace mus
35 #endif // COMPONENTS_MUS_VIEW_TREE_HOST_DELEGATE_H_