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

Unified Diff: services/ui/public/cpp/window.cc

Issue 2430653002: Mus+Ash: Towards Unifying CompositorFrameSink terminology (Closed)
Patch Set: Fix bitmap_uploader Created 4 years, 2 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/public/cpp/window.cc
diff --git a/services/ui/public/cpp/window.cc b/services/ui/public/cpp/window.cc
index 68325bba03528002d7f3f4a0e06c38c86eeec5fe..169863cb3bc6a848b3a206e769961f9c80924211 100644
--- a/services/ui/public/cpp/window.cc
+++ b/services/ui/public/cpp/window.cc
@@ -13,6 +13,7 @@
#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_observer.h"
@@ -269,15 +270,18 @@ bool Window::IsDrawn() const {
return parent_ ? parent_->IsDrawn() : parent_drawn_;
}
-std::unique_ptr<WindowSurface> Window::RequestSurface(mojom::SurfaceType type) {
+std::unique_ptr<CompositorFrameSink> Window::RequestCompositorFrameSink(
+ mojom::SurfaceType type,
+ scoped_refptr<cc::ContextProvider> context_provider) {
std::unique_ptr<WindowSurfaceBinding> surface_binding;
std::unique_ptr<WindowSurface> surface =
WindowSurface::Create(&surface_binding);
- AttachSurface(type, std::move(surface_binding));
- return surface;
+ AttachCompositorFrameSink(type, std::move(surface_binding));
+ return base::MakeUnique<CompositorFrameSink>(std::move(context_provider),
+ std::move(surface));
}
-void Window::AttachSurface(
+void Window::AttachCompositorFrameSink(
mojom::SurfaceType type,
std::unique_ptr<WindowSurfaceBinding> surface_binding) {
window_tree()->AttachSurface(

Powered by Google App Engine
This is Rietveld 408576698