Index: services/ui/view_manager/view_associate_table.h |
diff --git a/services/ui/view_manager/view_associate_table.h b/services/ui/view_manager/view_associate_table.h |
index 9cdc71b84eb78910e3eadde605baca78a690c6ae..a989b0b4606d25c3edea276cbc0ca6db9c20a232 100644 |
--- a/services/ui/view_manager/view_associate_table.h |
+++ b/services/ui/view_manager/view_associate_table.h |
@@ -14,6 +14,7 @@ |
#include "mojo/common/binding_set.h" |
#include "mojo/public/cpp/application/application_impl.h" |
#include "mojo/services/ui/views/interfaces/view_associates.mojom.h" |
+#include "mojo/services/ui/views/interfaces/view_manager.mojom.h" |
namespace view_manager { |
@@ -26,14 +27,14 @@ class ViewAssociateTable { |
ViewAssociateTable(); |
~ViewAssociateTable(); |
- // Begins connecting to the view associates. |
- // Invokes |connection_error_callback| if an associate connection fails |
- // and provides the associate's url. |
- void ConnectAssociates( |
- mojo::ApplicationImpl* app_impl, |
+ void RegisterViewAssociate( |
mojo::ui::ViewInspector* inspector, |
- const std::vector<std::string>& urls, |
- const AssociateConnectionErrorCallback& connection_error_callback); |
+ mojo::ui::ViewAssociatePtr associate, |
+ const AssociateConnectionErrorCallback& connection_error_callback, |
jeffbrown
2016/05/17 00:44:49
I think you can remove this callback now given you
mikejurka
2016/05/18 01:14:28
Done.
|
+ const mojo::String& label); |
+ |
+ void RegisterViewAssociateWatcher( |
+ mojo::ui::ViewAssociateWatcherPtr view_associate_watcher); |
// Connects to services offered by the view associates. |
void ConnectToViewService(mojo::ui::ViewTokenPtr view_token, |
@@ -47,18 +48,25 @@ class ViewAssociateTable { |
void CompleteDeferredWork(); |
+ size_t associate_count(); |
+ |
private: |
struct AssociateData { |
- AssociateData(const std::string& url, mojo::ui::ViewInspector* inspector); |
+ AssociateData(const std::string& label, |
+ mojo::ui::ViewAssociatePtr associate, |
+ mojo::ui::ViewInspector* inspector); |
~AssociateData(); |
- const std::string url; |
+ const std::string label; |
mojo::ui::ViewAssociatePtr associate; |
mojo::ui::ViewAssociateInfoPtr info; |
mojo::Binding<mojo::ui::ViewInspector> inspector_binding; |
}; |
+ void OnAssociateConnectionError(AssociateData* associate_data); |
+ |
std::vector<std::unique_ptr<AssociateData>> associates_; |
+ std::vector<mojo::ui::ViewAssociateWatcherPtr> associate_watchers_; |
uint32_t pending_connection_count_ = 0u; |
std::vector<base::Closure> deferred_work_; |