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

Side by Side Diff: components/mus/public/cpp/window_tree_delegate.h

Issue 1976703003: Impl mus::mojom::GpuService to enable using Chrome IPC version gpu CmdBuf in mus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update Created 4 years, 7 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
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_ 5 #ifndef COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_
6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_ 6 #define COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "components/mus/public/cpp/mus_public_export.h"
10 #include "components/mus/public/interfaces/window_tree.mojom.h" 11 #include "components/mus/public/interfaces/window_tree.mojom.h"
11 #include "services/shell/public/interfaces/interface_provider.mojom.h" 12 #include "services/shell/public/interfaces/interface_provider.mojom.h"
12 13
13 namespace ui { 14 namespace ui {
14 class Event; 15 class Event;
15 } 16 }
16 17
17 namespace mus { 18 namespace mus {
18 19
19 class Window; 20 class Window;
20 class WindowTreeConnection; 21 class WindowTreeConnection;
21 22
22 // Interface implemented by an application using the window manager. 23 // Interface implemented by an application using the window manager.
23 // 24 //
24 // WindowTreeConnection is deleted by any of the following: 25 // WindowTreeConnection is deleted by any of the following:
25 // . If all the roots of the connection are destroyed and the connection is 26 // . If all the roots of the connection are destroyed and the connection is
26 // configured to delete when there are no roots (the default). This happens 27 // configured to delete when there are no roots (the default). This happens
27 // if the owner of the roots Embed()s another app in all the roots, or all 28 // if the owner of the roots Embed()s another app in all the roots, or all
28 // the roots are explicitly deleted. 29 // the roots are explicitly deleted.
29 // . The connection to the window manager is lost. 30 // . The connection to the window manager is lost.
30 // . Explicitly by way of calling delete. 31 // . Explicitly by way of calling delete.
31 // 32 //
32 // When the WindowTreeConnection is deleted all windows are deleted (and 33 // When the WindowTreeConnection is deleted all windows are deleted (and
33 // observers notified). This is followed by notifying the delegate by way of 34 // observers notified). This is followed by notifying the delegate by way of
34 // OnConnectionLost(). 35 // OnConnectionLost().
35 class WindowTreeDelegate { 36 class MUS_PUBLIC_EXPORT WindowTreeDelegate {
36 public: 37 public:
37 // Called when the application implementing this interface is embedded at 38 // Called when the application implementing this interface is embedded at
38 // |root|. 39 // |root|.
39 // NOTE: this is only invoked if the WindowTreeConnection is created with 40 // NOTE: this is only invoked if the WindowTreeConnection is created with
40 // an InterfaceRequest. 41 // an InterfaceRequest.
41 virtual void OnEmbed(Window* root) = 0; 42 virtual void OnEmbed(Window* root) = 0;
42 43
43 // Sent when another app is embedded in |root| (one of the roots of the 44 // Sent when another app is embedded in |root| (one of the roots of the
44 // connection). Afer this call |root| is deleted. If |root| is the only root 45 // connection). Afer this call |root| is deleted. If |root| is the only root
45 // and the connection is configured to delete when there are no roots (the 46 // and the connection is configured to delete when there are no roots (the
(...skipping 10 matching lines...) Expand all
56 // windows owned by other processes. 57 // windows owned by other processes.
57 virtual void OnEventObserved(const ui::Event& event, Window* target) = 0; 58 virtual void OnEventObserved(const ui::Event& event, Window* target) = 0;
58 59
59 protected: 60 protected:
60 virtual ~WindowTreeDelegate() {} 61 virtual ~WindowTreeDelegate() {}
61 }; 62 };
62 63
63 } // namespace mus 64 } // namespace mus
64 65
65 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_ 66 #endif // COMPONENTS_MUS_PUBLIC_CPP_WINDOW_TREE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698