Chromium Code Reviews| 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 MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ |
| 7 | 7 |
| 8 #include <string> | |
| 9 | |
| 8 #include "mojo/public/interfaces/application/service_provider.mojom.h" | 10 #include "mojo/public/interfaces/application/service_provider.mojom.h" |
| 9 | 11 |
| 10 namespace mojo { | 12 namespace mojo { |
| 11 | 13 |
| 12 class View; | 14 class View; |
| 13 class ViewManager; | 15 class ViewManager; |
| 14 | 16 |
| 15 // Interface implemented by an application using the view manager. | 17 // Interface implemented by an application using the view manager. |
| 16 class ViewManagerDelegate { | 18 class ViewManagerDelegate { |
| 17 public: | 19 public: |
| (...skipping 12 matching lines...) Expand all Loading... | |
| 30 // any services obtained from them are not broken and will continue to be | 32 // any services obtained from them are not broken and will continue to be |
| 31 // valid. | 33 // valid. |
| 32 virtual void OnEmbed(View* root, | 34 virtual void OnEmbed(View* root, |
| 33 InterfaceRequest<ServiceProvider> services, | 35 InterfaceRequest<ServiceProvider> services, |
| 34 ServiceProviderPtr exposed_services) = 0; | 36 ServiceProviderPtr exposed_services) = 0; |
| 35 | 37 |
| 36 // Called when a connection to the view manager service is closed. | 38 // Called when a connection to the view manager service is closed. |
| 37 // |view_manager| is not valid after this function returns. | 39 // |view_manager| is not valid after this function returns. |
| 38 virtual void OnViewManagerDisconnected(ViewManager* view_manager) = 0; | 40 virtual void OnViewManagerDisconnected(ViewManager* view_manager) = 0; |
| 39 | 41 |
| 42 // Asks the delegate to perform the specified action. | |
| 43 // TODO(sky): nuke! See comments in view_manager.mojom for details.n | |
|
msw
2015/02/25 22:29:30
nit: remove trailing 'n'
sky
2015/02/25 23:20:26
Done.
| |
| 44 virtual void OnPerformAction(View* view, const std::string& action) {} | |
| 45 | |
| 40 protected: | 46 protected: |
| 41 virtual ~ViewManagerDelegate() {} | 47 virtual ~ViewManagerDelegate() {} |
| 42 }; | 48 }; |
| 43 | 49 |
| 44 } // namespace mojo | 50 } // namespace mojo |
| 45 | 51 |
| 46 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ | 52 #endif // MOJO_SERVICES_VIEW_MANAGER_PUBLIC_CPP_VIEW_MANAGER_DELEGATE_H_ |
| OLD | NEW |