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 COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ | 5 #ifndef COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ |
6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ | 6 #define COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "components/view_manager/public/interfaces/view_manager.mojom.h" | 10 #include "components/view_manager/public/interfaces/view_tree.mojom.h" |
11 #include "mojo/application/public/interfaces/service_provider.mojom.h" | 11 #include "mojo/application/public/interfaces/service_provider.mojom.h" |
12 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" | 12 #include "mojo/services/network/public/interfaces/url_loader.mojom.h" |
13 | 13 |
14 namespace mojo { | 14 namespace mojo { |
15 | 15 |
16 class View; | 16 class View; |
17 class ViewManager; | 17 class ViewManager; |
18 | 18 |
19 // Interface implemented by an application using the view manager. | 19 // Interface implemented by an application using the view manager. |
20 // | 20 // |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
53 // Only invoked if the connection has been marked as an embed root. This | 53 // Only invoked if the connection has been marked as an embed root. This |
54 // allows the delegate to disallow the embed (return false), or change | 54 // allows the delegate to disallow the embed (return false), or change |
55 // the ServiceProviders that would be exposed to the new client. | 55 // the ServiceProviders that would be exposed to the new client. |
56 // | 56 // |
57 // This implementation returns true (allowing the embed), and does not alter | 57 // This implementation returns true (allowing the embed), and does not alter |
58 // the supplied ServiceProviders. | 58 // the supplied ServiceProviders. |
59 // | 59 // |
60 // See the mojom for more details. | 60 // See the mojom for more details. |
61 virtual void OnEmbedForDescendant(View* view, | 61 virtual void OnEmbedForDescendant(View* view, |
62 URLRequestPtr request, | 62 URLRequestPtr request, |
63 ViewManagerClientPtr* client); | 63 ViewTreeClientPtr* client); |
64 | 64 |
65 // Called from the destructor of ViewManager after all the Views have been | 65 // Called from the destructor of ViewManager after all the Views have been |
66 // destroyed. |view_manager| is no longer valid after this call. | 66 // destroyed. |view_manager| is no longer valid after this call. |
67 virtual void OnViewManagerDestroyed(ViewManager* view_manager) = 0; | 67 virtual void OnViewManagerDestroyed(ViewManager* view_manager) = 0; |
68 | 68 |
69 protected: | 69 protected: |
70 virtual ~ViewManagerDelegate() {} | 70 virtual ~ViewManagerDelegate() {} |
71 }; | 71 }; |
72 | 72 |
73 } // namespace mojo | 73 } // namespace mojo |
74 | 74 |
75 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ | 75 #endif // COMPONENTS_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ |
OLD | NEW |