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

Unified Diff: components/mus/public/cpp/lib/window_surface.cc

Issue 2119963002: Move mus to //services/ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 4 years, 6 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: components/mus/public/cpp/lib/window_surface.cc
diff --git a/components/mus/public/cpp/lib/window_surface.cc b/components/mus/public/cpp/lib/window_surface.cc
deleted file mode 100644
index 1f0b840a1026a8a872742ea89a6c90b809e3c79d..0000000000000000000000000000000000000000
--- a/components/mus/public/cpp/lib/window_surface.cc
+++ /dev/null
@@ -1,69 +0,0 @@
-// Copyright 2015 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#include "components/mus/public/cpp/window_surface.h"
-
-#include "base/memory/ptr_util.h"
-#include "components/mus/public/cpp/window_surface_client.h"
-
-namespace mus {
-
-// static
-std::unique_ptr<WindowSurface> WindowSurface::Create(
- std::unique_ptr<WindowSurfaceBinding>* surface_binding) {
- mojom::SurfacePtr surface;
- mojom::SurfaceClientPtr surface_client;
- mojo::InterfaceRequest<mojom::SurfaceClient> surface_client_request =
- GetProxy(&surface_client);
-
- surface_binding->reset(new WindowSurfaceBinding(
- GetProxy(&surface), surface_client.PassInterface()));
- return base::WrapUnique(new WindowSurface(surface.PassInterface(),
- std::move(surface_client_request)));
-}
-
-WindowSurface::~WindowSurface() {}
-
-void WindowSurface::BindToThread() {
- DCHECK(!thread_checker_);
- thread_checker_.reset(new base::ThreadChecker());
- surface_.Bind(std::move(surface_info_));
- client_binding_.reset(new mojo::Binding<mojom::SurfaceClient>(
- this, std::move(client_request_)));
-}
-
-void WindowSurface::SubmitCompositorFrame(cc::CompositorFrame frame,
- const base::Closure& callback) {
- DCHECK(thread_checker_);
- DCHECK(thread_checker_->CalledOnValidThread());
- if (!surface_)
- return;
- surface_->SubmitCompositorFrame(std::move(frame), callback);
-}
-
-WindowSurface::WindowSurface(
- mojo::InterfacePtrInfo<mojom::Surface> surface_info,
- mojo::InterfaceRequest<mojom::SurfaceClient> client_request)
- : client_(nullptr),
- surface_info_(std::move(surface_info)),
- client_request_(std::move(client_request)) {}
-
-void WindowSurface::ReturnResources(
- mojo::Array<cc::ReturnedResource> resources) {
- DCHECK(thread_checker_);
- DCHECK(thread_checker_->CalledOnValidThread());
- if (!client_)
- return;
- client_->OnResourcesReturned(this, std::move(resources));
-}
-
-WindowSurfaceBinding::~WindowSurfaceBinding() {}
-
-WindowSurfaceBinding::WindowSurfaceBinding(
- mojo::InterfaceRequest<mojom::Surface> surface_request,
- mojo::InterfacePtrInfo<mojom::SurfaceClient> surface_client)
- : surface_request_(std::move(surface_request)),
- surface_client_(std::move(surface_client)) {}
-
-} // namespace mus
« no previous file with comments | « components/mus/public/cpp/lib/window_private.cc ('k') | components/mus/public/cpp/lib/window_tree_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698