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

Side by Side Diff: components/mus/ws/window_tree_host_delegate.h

Issue 1750143002: Changes ownership of WindowTreeHostConnection (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: comments Created 4 years, 9 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
(Empty)
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.
4
5 #ifndef COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_
6 #define COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_
7
8 namespace mus {
9
10 namespace ws {
11
12 class WindowTreeImpl;
13
14 // A WindowTreeHostDelegate interface is implemented by an object that
15 // has the WindowTreeImpl that is associated with the WindowTreeHostImpl that
16 // holds a pointer to this object. Typically, a WindowTreeHostDelegate will also
17 // manage the lifetime of the WindowTreeHostImpl and will delete the object when
18 // it get informed of when the Display of the root is closed.
19 class WindowTreeHostDelegate {
20 public:
21 // Called when the window associated with the root is completely initialized
22 // (i.e. the ViewportMetrics for the display is known).
23 virtual void OnDisplayInitialized() = 0;
24
25 // Called when the window associated with the root is closed.
26 virtual void OnDisplayClosed() = 0;
27
28 // Returns the WindowTreeImpl associated with the delegate.
29 virtual const WindowTreeImpl* GetWindowTree() const = 0;
30 WindowTreeImpl* GetWindowTree() {
31 return const_cast<WindowTreeImpl*>(
32 const_cast<const WindowTreeHostDelegate*>(this)->GetWindowTree());
33 }
34
35 protected:
36 virtual ~WindowTreeHostDelegate() {}
37 };
38
39 } // namespace ws
40
41 } // namespace mus
42
43 #endif // COMPONENTS_MUS_WS_WINDOW_TREE_HOST_DELEGATE_H_
OLDNEW
« no previous file with comments | « components/mus/ws/window_tree_host_connection.cc ('k') | components/mus/ws/window_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698