| 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" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 void OnNativeViewportDeleted(); | 42 void OnNativeViewportDeleted(); |
| 43 | 43 |
| 44 void OnRootViewManagerWindowTreeHostCreated(); | 44 void OnRootViewManagerWindowTreeHostCreated(); |
| 45 | 45 |
| 46 private: | 46 private: |
| 47 struct ConnectParams { | 47 struct ConnectParams { |
| 48 ConnectParams(); | 48 ConnectParams(); |
| 49 ~ConnectParams(); | 49 ~ConnectParams(); |
| 50 | 50 |
| 51 std::string url; | 51 std::string url; |
| 52 InterfaceRequest<ServiceProvider> service_provider; |
| 52 Callback<void(bool)> callback; | 53 Callback<void(bool)> callback; |
| 53 }; | 54 }; |
| 54 | 55 |
| 55 void MaybeEmbed(); | 56 void MaybeEmbed(); |
| 56 | 57 |
| 57 // ViewManagerInitService overrides: | 58 // ViewManagerInitService overrides: |
| 58 virtual void Embed(const String& url, | 59 virtual void Embed(const String& url, |
| 60 ServiceProviderPtr service_provider, |
| 59 const Callback<void(bool)>& callback) OVERRIDE; | 61 const Callback<void(bool)>& callback) OVERRIDE; |
| 60 | 62 |
| 61 ViewManagerInitServiceContext* context_; | 63 ViewManagerInitServiceContext* context_; |
| 62 | 64 |
| 63 ServiceProvider* service_provider_; | 65 ServiceProvider* service_provider_; |
| 64 | 66 |
| 65 // Stores information about inbound calls to Embed() pending execution on | 67 // Stores information about inbound calls to Embed() pending execution on |
| 66 // the window tree host being ready to use. | 68 // the window tree host being ready to use. |
| 67 ScopedVector<ConnectParams> connect_params_; | 69 ScopedVector<ConnectParams> connect_params_; |
| 68 | 70 |
| 69 bool is_tree_host_ready_; | 71 bool is_tree_host_ready_; |
| 70 | 72 |
| 71 DISALLOW_COPY_AND_ASSIGN(ViewManagerInitServiceImpl); | 73 DISALLOW_COPY_AND_ASSIGN(ViewManagerInitServiceImpl); |
| 72 }; | 74 }; |
| 73 | 75 |
| 74 #if defined(OS_WIN) | 76 #if defined(OS_WIN) |
| 75 #pragma warning(pop) | 77 #pragma warning(pop) |
| 76 #endif | 78 #endif |
| 77 | 79 |
| 78 } // namespace service | 80 } // namespace service |
| 79 } // namespace mojo | 81 } // namespace mojo |
| 80 | 82 |
| 81 #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 |