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

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

Issue 1679023006: Reify view ownership as a message pipe. (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 4 years, 10 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
« no previous file with comments | « services/ui/view_manager/BUILD.gn ('k') | services/ui/view_manager/view_host_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: services/ui/view_manager/view_host_impl.h
diff --git a/services/ui/view_manager/view_host_impl.h b/services/ui/view_manager/view_host_impl.h
index 907c8f1353a081935880afe21b36bfd7ab75a1b5..2ed54f613a875eb8885194ad041f1ab553ee1e27 100644
--- a/services/ui/view_manager/view_host_impl.h
+++ b/services/ui/view_manager/view_host_impl.h
@@ -7,36 +7,35 @@
#include "base/macros.h"
#include "mojo/common/binding_set.h"
-#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/services/ui/views/interfaces/views.mojom.h"
-#include "services/ui/view_manager/view_registry.h"
-#include "services/ui/view_manager/view_state.h"
namespace view_manager {
+class ViewRegistry;
+class ViewState;
+
// ViewHost interface implementation.
// This object is owned by its associated ViewState.
-class ViewHostImpl : public mojo::ui::ViewHost, public mojo::ServiceProvider {
+class ViewHostImpl : public mojo::ui::ViewHost,
+ public mojo::ui::ViewOwner,
+ public mojo::ServiceProvider {
public:
- ViewHostImpl(ViewRegistry* registry,
- ViewState* state,
- mojo::InterfaceRequest<mojo::ui::ViewHost> view_host_request);
+ ViewHostImpl(ViewRegistry* registry, ViewState* state);
~ViewHostImpl() override;
- void set_view_host_connection_error_handler(const base::Closure& handler) {
- binding_.set_connection_error_handler(handler);
- }
-
private:
// |ViewHost|:
+ void GetToken(const mojo::ui::ViewHost::GetTokenCallback& callback) override;
void GetServiceProvider(mojo::InterfaceRequest<mojo::ServiceProvider>
service_provider_request) override;
void CreateScene(
mojo::InterfaceRequest<mojo::gfx::composition::Scene> scene) override;
void RequestLayout() override;
void AddChild(uint32_t child_key,
- mojo::ui::ViewTokenPtr child_view_token) override;
- void RemoveChild(uint32_t child_key) override;
+ mojo::ui::ViewOwnerPtr child_view_owner) override;
+ void RemoveChild(uint32_t child_key,
+ mojo::InterfaceRequest<mojo::ui::ViewOwner>
+ transferred_view_owner_request) override;
void LayoutChild(uint32_t child_key,
mojo::ui::ViewLayoutParamsPtr child_layout_params,
const LayoutChildCallback& callback) override;
@@ -47,7 +46,6 @@ class ViewHostImpl : public mojo::ui::ViewHost, public mojo::ServiceProvider {
ViewRegistry* const registry_;
ViewState* const state_;
- mojo::Binding<mojo::ui::ViewHost> binding_;
mojo::BindingSet<mojo::ServiceProvider> service_provider_bindings_;
DISALLOW_COPY_AND_ASSIGN(ViewHostImpl);
« no previous file with comments | « services/ui/view_manager/BUILD.gn ('k') | services/ui/view_manager/view_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698