Index: services/ui/public/cpp/window.cc |
diff --git a/services/ui/public/cpp/window.cc b/services/ui/public/cpp/window.cc |
index 169863cb3bc6a848b3a206e769961f9c80924211..bd4470907165b1950aa175f34cb955914a6f4006 100644 |
--- a/services/ui/public/cpp/window.cc |
+++ b/services/ui/public/cpp/window.cc |
@@ -13,13 +13,12 @@ |
#include "base/bind.h" |
#include "base/macros.h" |
#include "services/ui/common/transient_window_utils.h" |
-#include "services/ui/public/cpp/compositor_frame_sink.h" |
#include "services/ui/public/cpp/property_type_converters.h" |
#include "services/ui/public/cpp/surface_id_handler.h" |
+#include "services/ui/public/cpp/window_compositor_frame_sink.h" |
#include "services/ui/public/cpp/window_observer.h" |
#include "services/ui/public/cpp/window_private.h" |
#include "services/ui/public/cpp/window_property.h" |
-#include "services/ui/public/cpp/window_surface.h" |
#include "services/ui/public/cpp/window_tracker.h" |
#include "services/ui/public/cpp/window_tree_client.h" |
#include "services/ui/public/interfaces/window_manager.mojom.h" |
@@ -270,23 +269,27 @@ bool Window::IsDrawn() const { |
return parent_ ? parent_->IsDrawn() : parent_drawn_; |
} |
-std::unique_ptr<CompositorFrameSink> Window::RequestCompositorFrameSink( |
- mojom::SurfaceType type, |
+std::unique_ptr<WindowCompositorFrameSink> Window::RequestCompositorFrameSink( |
+ mojom::CompositorFrameSinkType type, |
scoped_refptr<cc::ContextProvider> context_provider) { |
- std::unique_ptr<WindowSurfaceBinding> surface_binding; |
- std::unique_ptr<WindowSurface> surface = |
- WindowSurface::Create(&surface_binding); |
- AttachCompositorFrameSink(type, std::move(surface_binding)); |
- return base::MakeUnique<CompositorFrameSink>(std::move(context_provider), |
- std::move(surface)); |
+ std::unique_ptr<WindowCompositorFrameSinkBinding> |
+ compositor_frame_sink_binding; |
+ std::unique_ptr<WindowCompositorFrameSink> compositor_frame_sink = |
+ WindowCompositorFrameSink::Create(std::move(context_provider), |
+ &compositor_frame_sink_binding); |
+ AttachCompositorFrameSink(type, std::move(compositor_frame_sink_binding)); |
+ return compositor_frame_sink; |
} |
void Window::AttachCompositorFrameSink( |
- mojom::SurfaceType type, |
- std::unique_ptr<WindowSurfaceBinding> surface_binding) { |
- window_tree()->AttachSurface( |
- server_id_, type, std::move(surface_binding->surface_request_), |
- mojo::MakeProxy(std::move(surface_binding->surface_client_))); |
+ mojom::CompositorFrameSinkType type, |
+ std::unique_ptr<WindowCompositorFrameSinkBinding> |
+ compositor_frame_sink_binding) { |
+ window_tree()->AttachCompositorFrameSink( |
+ server_id_, type, |
+ std::move(compositor_frame_sink_binding->compositor_frame_sink_request_), |
+ mojo::MakeProxy(std::move( |
+ compositor_frame_sink_binding->compositor_frame_sink_client_))); |
} |
void Window::ClearSharedProperty(const std::string& name) { |