| 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_CONTENT_VIEWER_APP_H_ | 5 #ifndef MOJO_UI_CONTENT_VIEWER_APP_H_ |
| 6 #define MOJO_UI_CONTENT_VIEWER_APP_H_ | 6 #define MOJO_UI_CONTENT_VIEWER_APP_H_ |
| 7 | 7 |
| 8 #include "mojo/common/strong_binding_set.h" | 8 #include "mojo/common/strong_binding_set.h" |
| 9 #include "mojo/services/content_handler/interfaces/content_handler.mojom.h" | 9 #include "mojo/services/content_handler/interfaces/content_handler.mojom.h" |
| 10 #include "mojo/ui/view_provider_app.h" | 10 #include "mojo/ui/view_provider_app.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 // we are not using the ContentHandlerFactory here. | 21 // we are not using the ContentHandlerFactory here. |
| 22 class ContentViewerApp : public ApplicationDelegate { | 22 class ContentViewerApp : public ApplicationDelegate { |
| 23 public: | 23 public: |
| 24 ContentViewerApp(); | 24 ContentViewerApp(); |
| 25 ~ContentViewerApp() override; | 25 ~ContentViewerApp() override; |
| 26 | 26 |
| 27 ApplicationImpl* app_impl() { return app_impl_; } | 27 ApplicationImpl* app_impl() { return app_impl_; } |
| 28 | 28 |
| 29 // |ApplicationDelegate|: | 29 // |ApplicationDelegate|: |
| 30 void Initialize(ApplicationImpl* app) override; | 30 void Initialize(ApplicationImpl* app) override; |
| 31 bool ConfigureIncomingConnection(ApplicationConnection* connection) override; | 31 bool ConfigureIncomingConnection( |
| 32 ServiceProviderImpl* service_provider_impl) override; |
| 32 | 33 |
| 33 // Called to create the view provider application to view the content. | 34 // Called to create the view provider application to view the content. |
| 34 // | 35 // |
| 35 // This method may be called multiple times to load different content | 36 // This method may be called multiple times to load different content |
| 36 // into separate view providers. The view provider implementation should | 37 // into separate view providers. The view provider implementation should |
| 37 // cache the loaded content in case it is asked to create multiple instances | 38 // cache the loaded content in case it is asked to create multiple instances |
| 38 // of the view since the response can only be consumed once. | 39 // of the view since the response can only be consumed once. |
| 39 // | 40 // |
| 40 // The |content_handler_url| is the connection URL of the content handler | 41 // The |content_handler_url| is the connection URL of the content handler |
| 41 // request. | 42 // request. |
| (...skipping 14 matching lines...) Expand all Loading... |
| 56 ApplicationImpl* app_impl_ = nullptr; | 57 ApplicationImpl* app_impl_ = nullptr; |
| 57 StrongBindingSet<ContentHandler> bindings_; | 58 StrongBindingSet<ContentHandler> bindings_; |
| 58 | 59 |
| 59 MOJO_DISALLOW_COPY_AND_ASSIGN(ContentViewerApp); | 60 MOJO_DISALLOW_COPY_AND_ASSIGN(ContentViewerApp); |
| 60 }; | 61 }; |
| 61 | 62 |
| 62 } // namespace ui | 63 } // namespace ui |
| 63 } // namespace mojo | 64 } // namespace mojo |
| 64 | 65 |
| 65 #endif // MOJO_UI_CONTENT_VIEWER_APP_H_ | 66 #endif // MOJO_UI_CONTENT_VIEWER_APP_H_ |
| OLD | NEW |