| 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 13 matching lines...) Expand all Loading... |
| 24 // This class is merely intended to make the simple apps easier to write. | 24 // This class is merely intended to make the simple apps easier to write. |
| 25 class ViewProviderApp : public ApplicationDelegate { | 25 class ViewProviderApp : public ApplicationDelegate { |
| 26 public: | 26 public: |
| 27 ViewProviderApp(); | 27 ViewProviderApp(); |
| 28 ~ViewProviderApp() override; | 28 ~ViewProviderApp() override; |
| 29 | 29 |
| 30 ApplicationImpl* app_impl() { return app_impl_; } | 30 ApplicationImpl* app_impl() { return app_impl_; } |
| 31 | 31 |
| 32 // |ApplicationDelegate|: | 32 // |ApplicationDelegate|: |
| 33 void Initialize(ApplicationImpl* app) override; | 33 void Initialize(ApplicationImpl* app) override; |
| 34 bool ConfigureIncomingConnection(ApplicationConnection* connection) override; | 34 bool ConfigureIncomingConnection( |
| 35 ServiceProviderImpl* service_provider_impl) override; |
| 35 | 36 |
| 36 // Called by the ViewProvider to create a view. | 37 // Called by the ViewProvider to create a view. |
| 37 // This method may be called multiple times in the case where the | 38 // This method may be called multiple times in the case where the |
| 38 // view provider is asked to create multiple view instances. | 39 // view provider is asked to create multiple view instances. |
| 39 // | 40 // |
| 40 // The |view_provider_url| is the connection URL of the view provider request. | 41 // The |view_provider_url| is the connection URL of the view provider request. |
| 41 // | 42 // |
| 42 // The |view_owner_request| should be attached to the newly created view | 43 // The |view_owner_request| should be attached to the newly created view |
| 43 // and closed or left pending if the view could not be created. | 44 // and closed or left pending if the view could not be created. |
| 44 // | 45 // |
| (...skipping 20 matching lines...) Expand all Loading... |
| 65 ApplicationImpl* app_impl_ = nullptr; | 66 ApplicationImpl* app_impl_ = nullptr; |
| 66 StrongBindingSet<ViewProvider> bindings_; | 67 StrongBindingSet<ViewProvider> bindings_; |
| 67 | 68 |
| 68 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewProviderApp); | 69 MOJO_DISALLOW_COPY_AND_ASSIGN(ViewProviderApp); |
| 69 }; | 70 }; |
| 70 | 71 |
| 71 } // namespace ui | 72 } // namespace ui |
| 72 } // namespace mojo | 73 } // namespace mojo |
| 73 | 74 |
| 74 #endif // MOJO_UI_VIEW_PROVIDER_APP_H_ | 75 #endif // MOJO_UI_VIEW_PROVIDER_APP_H_ |
| OLD | NEW |