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

Unified Diff: services/ui/view_manager/view_tree_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/view_stub.cc ('k') | services/ui/view_manager/view_tree_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_tree_host_impl.h
diff --git a/services/ui/view_manager/view_tree_host_impl.h b/services/ui/view_manager/view_tree_host_impl.h
index 017ee8815582772f88cb49e98a602ebffedf6e4a..4c832f1f14511dc3d246a5db4916590b458dba72 100644
--- a/services/ui/view_manager/view_tree_host_impl.h
+++ b/services/ui/view_manager/view_tree_host_impl.h
@@ -7,37 +7,31 @@
#include "base/macros.h"
#include "mojo/common/binding_set.h"
-#include "mojo/public/cpp/bindings/binding.h"
#include "mojo/services/ui/views/interfaces/view_trees.mojom.h"
-#include "services/ui/view_manager/view_registry.h"
-#include "services/ui/view_manager/view_tree_state.h"
namespace view_manager {
+class ViewRegistry;
+class ViewTreeState;
+
// ViewTreeHost interface implementation.
// This object is owned by its associated ViewTreeState.
class ViewTreeHostImpl : public mojo::ui::ViewTreeHost,
public mojo::ServiceProvider {
public:
- ViewTreeHostImpl(
- ViewRegistry* registry,
- ViewTreeState* state,
- mojo::InterfaceRequest<mojo::ui::ViewTreeHost> view_tree_host_request);
+ ViewTreeHostImpl(ViewRegistry* registry, ViewTreeState* state);
~ViewTreeHostImpl() override;
- void set_view_tree_host_connection_error_handler(
- const base::Closure& handler) {
- binding_.set_connection_error_handler(handler);
- }
-
private:
// |ViewTreeHost|:
+ void GetToken(const GetTokenCallback& callback) override;
void GetServiceProvider(
mojo::InterfaceRequest<mojo::ServiceProvider> service_provider) override;
void RequestLayout() override;
void SetRoot(uint32_t root_key,
- mojo::ui::ViewTokenPtr root_view_token) override;
- void ResetRoot() override;
+ mojo::ui::ViewOwnerPtr root_view_owner) override;
+ void ResetRoot(mojo::InterfaceRequest<mojo::ui::ViewOwner>
+ transferred_view_owner_request) override;
void LayoutRoot(mojo::ui::ViewLayoutParamsPtr root_layout_params,
const LayoutRootCallback& callback) override;
@@ -47,7 +41,6 @@ class ViewTreeHostImpl : public mojo::ui::ViewTreeHost,
ViewRegistry* const registry_;
ViewTreeState* const state_;
- mojo::Binding<mojo::ui::ViewTreeHost> binding_;
mojo::BindingSet<mojo::ServiceProvider> service_provider_bindings_;
DISALLOW_COPY_AND_ASSIGN(ViewTreeHostImpl);
« no previous file with comments | « services/ui/view_manager/view_stub.cc ('k') | services/ui/view_manager/view_tree_host_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698