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

Side by Side Diff: components/mus/public/cpp/lib/window_surface.cc

Issue 2019833002: Implement StructTraits for various cc and gpu types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: mailbox_name by ref to make windows happy 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 unified diff | Download patch
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "components/mus/public/cpp/window_surface.h" 5 #include "components/mus/public/cpp/window_surface.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "components/mus/public/cpp/surfaces/surfaces_type_converters.h" 8 #include "components/mus/public/cpp/surfaces/surfaces_type_converters.h"
9 #include "components/mus/public/cpp/window_surface_client.h" 9 #include "components/mus/public/cpp/window_surface_client.h"
10 10
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
44 } 44 }
45 45
46 WindowSurface::WindowSurface( 46 WindowSurface::WindowSurface(
47 mojo::InterfacePtrInfo<mojom::Surface> surface_info, 47 mojo::InterfacePtrInfo<mojom::Surface> surface_info,
48 mojo::InterfaceRequest<mojom::SurfaceClient> client_request) 48 mojo::InterfaceRequest<mojom::SurfaceClient> client_request)
49 : client_(nullptr), 49 : client_(nullptr),
50 surface_info_(std::move(surface_info)), 50 surface_info_(std::move(surface_info)),
51 client_request_(std::move(client_request)) {} 51 client_request_(std::move(client_request)) {}
52 52
53 void WindowSurface::ReturnResources( 53 void WindowSurface::ReturnResources(
54 mojo::Array<mojom::ReturnedResourcePtr> resources) { 54 mojo::Array<cc::ReturnedResource> resources) {
55 DCHECK(thread_checker_); 55 DCHECK(thread_checker_);
56 DCHECK(thread_checker_->CalledOnValidThread()); 56 DCHECK(thread_checker_->CalledOnValidThread());
57 if (!client_) 57 if (!client_)
58 return; 58 return;
59 client_->OnResourcesReturned(this, std::move(resources)); 59 client_->OnResourcesReturned(this, std::move(resources));
60 } 60 }
61 61
62 WindowSurfaceBinding::~WindowSurfaceBinding() {} 62 WindowSurfaceBinding::~WindowSurfaceBinding() {}
63 63
64 WindowSurfaceBinding::WindowSurfaceBinding( 64 WindowSurfaceBinding::WindowSurfaceBinding(
65 mojo::InterfaceRequest<mojom::Surface> surface_request, 65 mojo::InterfaceRequest<mojom::Surface> surface_request,
66 mojo::InterfacePtrInfo<mojom::SurfaceClient> surface_client) 66 mojo::InterfacePtrInfo<mojom::SurfaceClient> surface_client)
67 : surface_request_(std::move(surface_request)), 67 : surface_request_(std::move(surface_request)),
68 surface_client_(std::move(surface_client)) {} 68 surface_client_(std::move(surface_client)) {}
69 69
70 } // namespace mus 70 } // namespace mus
OLDNEW
« no previous file with comments | « components/mus/public/cpp/lib/output_surface.cc ('k') | components/mus/public/cpp/output_surface.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698