| OLD | NEW |
| 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 SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_DELEGATE_H_ | 5 #ifndef SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_DELEGATE_H_ |
| 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_DELEGATE_H_ | 6 #define SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "services/shell/public/interfaces/interface_provider.mojom.h" | 10 #include "services/shell/public/interfaces/interface_provider.mojom.h" |
| 11 #include "services/ui/public/cpp/ui_export.h" |
| 11 #include "services/ui/public/interfaces/window_tree.mojom.h" | 12 #include "services/ui/public/interfaces/window_tree.mojom.h" |
| 12 | 13 |
| 13 namespace ui { | 14 namespace ui { |
| 14 class Event; | 15 class Event; |
| 15 } | 16 } |
| 16 | 17 |
| 17 namespace ui { | 18 namespace ui { |
| 18 | 19 |
| 19 class Window; | 20 class Window; |
| 20 class WindowTreeClient; | 21 class WindowTreeClient; |
| 21 | 22 |
| 22 // Interface implemented by an application using mus. | 23 // Interface implemented by an application using mus. |
| 23 class WindowTreeClientDelegate { | 24 class UI_EXPORT WindowTreeClientDelegate { |
| 24 public: | 25 public: |
| 25 // Called when the application implementing this interface is embedded at | 26 // Called when the application implementing this interface is embedded at |
| 26 // |root|. | 27 // |root|. |
| 27 // NOTE: this is only invoked if the WindowTreeClient is created with an | 28 // NOTE: this is only invoked if the WindowTreeClient is created with an |
| 28 // InterfaceRequest. | 29 // InterfaceRequest. |
| 29 virtual void OnEmbed(Window* root) = 0; | 30 virtual void OnEmbed(Window* root) = 0; |
| 30 | 31 |
| 31 // Sent when another app is embedded in |root| (one of the roots of the | 32 // Sent when another app is embedded in |root| (one of the roots of the |
| 32 // connection). Afer this call |root| is deleted. If |root| is the only root | 33 // connection). Afer this call |root| is deleted. If |root| is the only root |
| 33 // and the connection is configured to delete when there are no roots (the | 34 // and the connection is configured to delete when there are no roots (the |
| (...skipping 10 matching lines...) Expand all Loading... |
| 44 // windows owned by other processes. | 45 // windows owned by other processes. |
| 45 virtual void OnEventObserved(const ui::Event& event, Window* target) = 0; | 46 virtual void OnEventObserved(const ui::Event& event, Window* target) = 0; |
| 46 | 47 |
| 47 protected: | 48 protected: |
| 48 virtual ~WindowTreeClientDelegate() {} | 49 virtual ~WindowTreeClientDelegate() {} |
| 49 }; | 50 }; |
| 50 | 51 |
| 51 } // namespace ui | 52 } // namespace ui |
| 52 | 53 |
| 53 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_DELEGATE_H_ | 54 #endif // SERVICES_UI_PUBLIC_CPP_WINDOW_TREE_CLIENT_DELEGATE_H_ |
| OLD | NEW |