Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(648)

Unified Diff: services/ui/view_manager/view_associate_table.h

Issue 1949233002: Create a RegisterViewAssociate method in ViewManager (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Improved tests Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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..bfdc7ea8dd048398741917c347765869c2638755 100644
--- a/services/ui/view_manager/view_associate_table.h
+++ b/services/ui/view_manager/view_associate_table.h
@@ -35,6 +35,9 @@ class ViewAssociateTable {
const std::vector<std::string>& urls,
const AssociateConnectionErrorCallback& connection_error_callback);
+ void RegisterViewAssociate(mojo::ui::ViewInspector* inspector,
+ mojo::ui::ViewAssociatePtr associate);
+
// Connects to services offered by the view associates.
void ConnectToViewService(mojo::ui::ViewTokenPtr view_token,
const mojo::String& service_name,
@@ -49,15 +52,21 @@ class ViewAssociateTable {
private:
struct AssociateData {
- AssociateData(const std::string& url, mojo::ui::ViewInspector* inspector);
+ AssociateData(mojo::ui::ViewAssociatePtr associate,
+ mojo::ui::ViewInspector* inspector);
~AssociateData();
- const std::string url;
mojo::ui::ViewAssociatePtr associate;
mojo::ui::ViewAssociateInfoPtr info;
mojo::Binding<mojo::ui::ViewInspector> inspector_binding;
};
+ void ConnectAssociate(mojo::ApplicationImpl* app_impl,
+ mojo::ui::ViewInspector* inspector,
+ const std::string& url);
+
+ void OnAssociateConnectionError(AssociateData* associate_data);
+
std::vector<std::unique_ptr<AssociateData>> associates_;
uint32_t pending_connection_count_ = 0u;

Powered by Google App Engine
This is Rietveld 408576698