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

Unified Diff: services/ui/view_manager/view_registry.cc

Issue 1949233002: Create a RegisterViewAssociate method in ViewManager (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Moved launching/registering of view associates to launcher 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_registry.cc
diff --git a/services/ui/view_manager/view_registry.cc b/services/ui/view_manager/view_registry.cc
index aee3a466f8af2e4d34c76db26fa1c66fc8244d83..ab272af48bce162e0bc8301ec78629529beca397 100644
--- a/services/ui/view_manager/view_registry.cc
+++ b/services/ui/view_manager/view_registry.cc
@@ -59,14 +59,23 @@ ViewRegistry::ViewRegistry(mojo::gfx::composition::CompositorPtr compositor)
ViewRegistry::~ViewRegistry() {}
-void ViewRegistry::ConnectAssociates(
- mojo::ApplicationImpl* app_impl,
- const std::vector<std::string>& urls,
- const AssociateConnectionErrorCallback& connection_error_callback) {
- associate_table_.ConnectAssociates(app_impl, this, urls,
- connection_error_callback);
+// REGISTERING ASSOCIATES
+
+void ViewRegistry::RegisterViewAssociate(
+ mojo::ui::ViewInspector* view_inspector,
+ mojo::ui::ViewAssociatePtr view_associate,
+ const mojo::String& label) {
+ // TODO(mikejurka): Delete callback once registration fully moved to
+ // Launcher.
+ AssociateConnectionErrorCallback null_callback;
+ associate_table_.RegisterViewAssociate(view_inspector, view_associate.Pass(),
+ null_callback, label);
}
+void ViewRegistry::RegisterViewAssociateWatcher(
+ mojo::ui::ViewAssociateWatcherPtr view_associate_watcher) {
+ associate_table_.RegisterViewAssociateWatcher(view_associate_watcher.Pass());
+}
// CREATE / DESTROY VIEWS
void ViewRegistry::CreateView(
« services/ui/view_manager/view_associate_table.cc ('K') | « services/ui/view_manager/view_registry.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698