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

Side by Side Diff: mojo/aura/surface_binding.cc

Issue 667223002: Mojo: More virtual/override style fixes in mojo/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 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 unified diff | Download patch
« no previous file with comments | « mojo/aura/screen_mojo.h ('k') | mojo/aura/surface_context_factory.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "mojo/aura/surface_binding.h" 5 #include "mojo/aura/surface_binding.h"
6 6
7 #include <map> 7 #include <map>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "base/lazy_instance.h" 10 #include "base/lazy_instance.h"
(...skipping 17 matching lines...) Expand all
28 #include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h" 28 #include "mojo/services/public/interfaces/surfaces/surfaces_service.mojom.h"
29 29
30 namespace mojo { 30 namespace mojo {
31 namespace { 31 namespace {
32 32
33 // SurfaceclientImpl ----------------------------------------------------------- 33 // SurfaceclientImpl -----------------------------------------------------------
34 34
35 class SurfaceClientImpl : public SurfaceClient { 35 class SurfaceClientImpl : public SurfaceClient {
36 public: 36 public:
37 SurfaceClientImpl() {} 37 SurfaceClientImpl() {}
38 virtual ~SurfaceClientImpl() {} 38 ~SurfaceClientImpl() override {}
39 39
40 // SurfaceClient: 40 // SurfaceClient:
41 virtual void ReturnResources(Array<ReturnedResourcePtr> resources) override { 41 void ReturnResources(Array<ReturnedResourcePtr> resources) override {
42 // TODO (sky|jamesr): figure out right way to recycle resources. 42 // TODO (sky|jamesr): figure out right way to recycle resources.
43 } 43 }
44 44
45 private: 45 private:
46 DISALLOW_COPY_AND_ASSIGN(SurfaceClientImpl); 46 DISALLOW_COPY_AND_ASSIGN(SurfaceClientImpl);
47 }; 47 };
48 48
49 // OutputSurface --------------------------------------------------------------- 49 // OutputSurface ---------------------------------------------------------------
50 50
51 // OutputSurface implementation for a view. Pushes the surface id to View when 51 // OutputSurface implementation for a view. Pushes the surface id to View when
52 // appropriate. 52 // appropriate.
53 class OutputSurfaceImpl : public cc::OutputSurface { 53 class OutputSurfaceImpl : public cc::OutputSurface {
54 public: 54 public:
55 OutputSurfaceImpl(View* view, 55 OutputSurfaceImpl(View* view,
56 const scoped_refptr<cc::ContextProvider>& context_provider, 56 const scoped_refptr<cc::ContextProvider>& context_provider,
57 Surface* surface, 57 Surface* surface,
58 cc::SurfaceIdAllocator* id_allocator); 58 cc::SurfaceIdAllocator* id_allocator);
59 virtual ~OutputSurfaceImpl(); 59 ~OutputSurfaceImpl() override;
60 60
61 // cc::OutputSurface: 61 // cc::OutputSurface:
62 virtual void SwapBuffers(cc::CompositorFrame* frame) override; 62 void SwapBuffers(cc::CompositorFrame* frame) override;
63 63
64 private: 64 private:
65 View* view_; 65 View* view_;
66 Surface* surface_; 66 Surface* surface_;
67 cc::SurfaceIdAllocator* id_allocator_; 67 cc::SurfaceIdAllocator* id_allocator_;
68 cc::SurfaceId surface_id_; 68 cc::SurfaceId surface_id_;
69 gfx::Size surface_size_; 69 gfx::Size surface_size_;
70 70
71 DISALLOW_COPY_AND_ASSIGN(OutputSurfaceImpl); 71 DISALLOW_COPY_AND_ASSIGN(OutputSurfaceImpl);
72 }; 72 };
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after
242 } 242 }
243 243
244 SurfaceBinding::~SurfaceBinding() { 244 SurfaceBinding::~SurfaceBinding() {
245 } 245 }
246 246
247 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() { 247 scoped_ptr<cc::OutputSurface> SurfaceBinding::CreateOutputSurface() {
248 return state_->CreateOutputSurface(view_); 248 return state_->CreateOutputSurface(view_);
249 } 249 }
250 250
251 } // namespace mojo 251 } // namespace mojo
OLDNEW
« no previous file with comments | « mojo/aura/screen_mojo.h ('k') | mojo/aura/surface_context_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698