| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 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 | 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_UI_VIEW_PROVIDER_APP_H_ | 5 #ifndef MOJO_UI_VIEW_PROVIDER_APP_H_ |
| 6 #define MOJO_UI_VIEW_PROVIDER_APP_H_ | 6 #define MOJO_UI_VIEW_PROVIDER_APP_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "mojo/common/strong_binding_set.h" | 10 #include "mojo/common/strong_binding_set.h" |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 // This method may be called multiple times in the case where the | 39 // This method may be called multiple times in the case where the |
| 40 // view provider is asked to create multiple view instances. | 40 // view provider is asked to create multiple view instances. |
| 41 // | 41 // |
| 42 // The |view_provider_url| is the connection URL of the view provider request. | 42 // The |view_provider_url| is the connection URL of the view provider request. |
| 43 // | 43 // |
| 44 // The |view_owner_request| should be attached to the newly created view | 44 // The |view_owner_request| should be attached to the newly created view |
| 45 // and closed or left pending if the view could not be created. | 45 // and closed or left pending if the view could not be created. |
| 46 // | 46 // |
| 47 // The |services| parameter is used to receive services from the view | 47 // The |services| parameter is used to receive services from the view |
| 48 // on behalf of the caller. | 48 // on behalf of the caller. |
| 49 // | 49 virtual void CreateView(const std::string& view_provider_url, |
| 50 // The |exposed_services| parameters is used to provide services to | 50 InterfaceRequest<ViewOwner> view_owner_request, |
| 51 // the view from the caller. | 51 InterfaceRequest<ServiceProvider> services) = 0; |
| 52 virtual void CreateView( | |
| 53 const std::string& view_provider_url, | |
| 54 InterfaceRequest<ViewOwner> view_owner_request, | |
| 55 InterfaceRequest<ServiceProvider> services, | |
| 56 InterfaceHandle<ServiceProvider> exposed_services) = 0; | |
| 57 | 52 |
| 58 private: | 53 private: |
| 59 class DelegatingViewProvider; | 54 class DelegatingViewProvider; |
| 60 | 55 |
| 61 void CreateView(DelegatingViewProvider* provider, | 56 void CreateView(DelegatingViewProvider* provider, |
| 62 const std::string& view_provider_url, | 57 const std::string& view_provider_url, |
| 63 InterfaceRequest<ViewOwner> view_owner_request, | 58 InterfaceRequest<ViewOwner> view_owner_request, |
| 64 InterfaceRequest<ServiceProvider> services, | 59 InterfaceRequest<ServiceProvider> services); |
| 65 InterfaceHandle<ServiceProvider> exposed_services); | |
| 66 | 60 |
| 67 ApplicationImpl* app_impl_ = nullptr; | 61 ApplicationImpl* app_impl_ = nullptr; |
| 68 StrongBindingSet<ViewProvider> bindings_; | 62 StrongBindingSet<ViewProvider> bindings_; |
| 69 | 63 |
| 70 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewProviderApp); | 64 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewProviderApp); |
| 71 }; | 65 }; |
| 72 | 66 |
| 73 } // namespace ui | 67 } // namespace ui |
| 74 } // namespace mojo | 68 } // namespace mojo |
| 75 | 69 |
| 76 #endif // MOJO_UI_VIEW_PROVIDER_APP_H_ | 70 #endif // MOJO_UI_VIEW_PROVIDER_APP_H_ |
| OLD | NEW |