| 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_VIEW_MANAGER_INIT_SERVICE_IMPL_H_ | 5 #ifndef MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_IMPL_H_ |
| 6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_IMPL_H_ | 6 #define MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_IMPL_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
| 11 #include "base/compiler_specific.h" | 11 #include "base/compiler_specific.h" |
| 12 #include "base/memory/scoped_vector.h" |
| 12 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" | 13 #include "mojo/services/public/interfaces/view_manager/view_manager.mojom.h" |
| 13 #include "mojo/services/view_manager/root_node_manager.h" | 14 #include "mojo/services/view_manager/root_node_manager.h" |
| 14 #include "mojo/services/view_manager/root_view_manager_delegate.h" | 15 #include "mojo/services/view_manager/root_view_manager_delegate.h" |
| 15 #include "mojo/services/view_manager/view_manager_export.h" | 16 #include "mojo/services/view_manager/view_manager_export.h" |
| 16 | 17 |
| 17 namespace mojo { | 18 namespace mojo { |
| 18 | 19 |
| 19 class ApplicationConnection; | 20 class ApplicationConnection; |
| 20 class ServiceProvider; | 21 class ServiceProvider; |
| 21 | 22 |
| (...skipping 18 matching lines...) Expand all Loading... |
| 40 | 41 |
| 41 private: | 42 private: |
| 42 struct ConnectParams { | 43 struct ConnectParams { |
| 43 ConnectParams(); | 44 ConnectParams(); |
| 44 ~ConnectParams(); | 45 ~ConnectParams(); |
| 45 | 46 |
| 46 std::string url; | 47 std::string url; |
| 47 Callback<void(bool)> callback; | 48 Callback<void(bool)> callback; |
| 48 }; | 49 }; |
| 49 | 50 |
| 50 void MaybeEmbedRoot(const std::string& url, | 51 void MaybeEmbed(); |
| 51 const Callback<void(bool)>& callback); | |
| 52 | 52 |
| 53 // ViewManagerInitService overrides: | 53 // ViewManagerInitService overrides: |
| 54 virtual void EmbedRoot(const String& url, | 54 virtual void Embed(const String& url, |
| 55 const Callback<void(bool)>& callback) OVERRIDE; | 55 const Callback<void(bool)>& callback) OVERRIDE; |
| 56 | 56 |
| 57 // RootViewManagerDelegate overrides: | 57 // RootViewManagerDelegate overrides: |
| 58 virtual void OnRootViewManagerWindowTreeHostCreated() OVERRIDE; | 58 virtual void OnRootViewManagerWindowTreeHostCreated() OVERRIDE; |
| 59 | 59 |
| 60 void OnNativeViewportDeleted(); | 60 void OnNativeViewportDeleted(); |
| 61 | 61 |
| 62 ServiceProvider* service_provider_; | 62 ServiceProvider* service_provider_; |
| 63 | 63 |
| 64 RootNodeManager root_node_manager_; | 64 RootNodeManager root_node_manager_; |
| 65 | 65 |
| 66 // Parameters passed to Connect(). If non-null Connect() has been invoked. | 66 // Stores information about inbound calls to Embed() pending execution on |
| 67 scoped_ptr<ConnectParams> connect_params_; | 67 // the window tree host being ready to use. |
| 68 ScopedVector<ConnectParams> connect_params_; |
| 68 | 69 |
| 69 bool is_tree_host_ready_; | 70 bool is_tree_host_ready_; |
| 70 | 71 |
| 71 DISALLOW_COPY_AND_ASSIGN(ViewManagerInitServiceImpl); | 72 DISALLOW_COPY_AND_ASSIGN(ViewManagerInitServiceImpl); |
| 72 }; | 73 }; |
| 73 | 74 |
| 74 #if defined(OS_WIN) | 75 #if defined(OS_WIN) |
| 75 #pragma warning(pop) | 76 #pragma warning(pop) |
| 76 #endif | 77 #endif |
| 77 | 78 |
| 78 } // namespace service | 79 } // namespace service |
| 79 } // namespace view_manager | 80 } // namespace view_manager |
| 80 } // namespace mojo | 81 } // namespace mojo |
| 81 | 82 |
| 82 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_IMPL_H_ | 83 #endif // MOJO_SERVICES_VIEW_MANAGER_VIEW_MANAGER_INIT_SERVICE_IMPL_H_ |
| OLD | NEW |