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

Side by Side Diff: services/native_viewport/onscreen_context_provider.h

Issue 1682113003: Mojo C++ bindings: Generate InterfaceHandle<> instead of InterfacePtr<>. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: rebase ontop of master, address trung's comments Created 4 years, 10 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 #ifndef SERVICES_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_ 5 #ifndef SERVICES_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_
6 #define SERVICES_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_ 6 #define SERVICES_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_
7 7
8 #include "base/memory/ref_counted.h" 8 #include "base/memory/ref_counted.h"
9 #include "mojo/services/gpu/interfaces/context_provider.mojom.h" 9 #include "mojo/services/gpu/interfaces/context_provider.mojom.h"
10 #include "mojo/services/gpu/interfaces/viewport_parameter_listener.mojom.h" 10 #include "mojo/services/gpu/interfaces/viewport_parameter_listener.mojom.h"
(...skipping 15 matching lines...) Expand all
26 26
27 void Bind(mojo::InterfaceRequest<mojo::ContextProvider> request); 27 void Bind(mojo::InterfaceRequest<mojo::ContextProvider> request);
28 28
29 void SetAcceleratedWidget(gfx::AcceleratedWidget widget); 29 void SetAcceleratedWidget(gfx::AcceleratedWidget widget);
30 void set_surface_configuration( 30 void set_surface_configuration(
31 const gfx::SurfaceConfiguration requested_configuration) { 31 const gfx::SurfaceConfiguration requested_configuration) {
32 requested_configuration_ = requested_configuration; 32 requested_configuration_ = requested_configuration;
33 }; 33 };
34 private: 34 private:
35 // mojo::ContextProvider implementation: 35 // mojo::ContextProvider implementation:
36 void Create(mojo::ViewportParameterListenerPtr viewport_parameter_listener, 36 void Create(mojo::InterfaceHandle<mojo::ViewportParameterListener>
37 viewport_parameter_listener,
37 const CreateCallback& callback) override; 38 const CreateCallback& callback) override;
38 39
39 // gles2::CommandBufferImpl::Observer implementation: 40 // gles2::CommandBufferImpl::Observer implementation:
40 void OnCommandBufferImplDestroyed() override; 41 void OnCommandBufferImplDestroyed() override;
41 42
42 void CreateAndReturnCommandBuffer(); 43 void CreateAndReturnCommandBuffer();
43 44
44 gfx::SurfaceConfiguration requested_configuration_; 45 gfx::SurfaceConfiguration requested_configuration_;
45 gles2::CommandBufferImpl* command_buffer_impl_; 46 gles2::CommandBufferImpl* command_buffer_impl_;
46 scoped_refptr<gles2::GpuState> state_; 47 scoped_refptr<gles2::GpuState> state_;
47 gfx::AcceleratedWidget widget_; 48 gfx::AcceleratedWidget widget_;
48 mojo::ViewportParameterListenerPtr pending_listener_; 49 mojo::ViewportParameterListenerPtr pending_listener_;
49 CreateCallback pending_create_callback_; 50 CreateCallback pending_create_callback_;
50 mojo::Binding<mojo::ContextProvider> binding_; 51 mojo::Binding<mojo::ContextProvider> binding_;
51 52
52 DISALLOW_COPY_AND_ASSIGN(OnscreenContextProvider); 53 DISALLOW_COPY_AND_ASSIGN(OnscreenContextProvider);
53 }; 54 };
54 55
55 } // namespace mojo 56 } // namespace mojo
56 57
57 #endif // SERVICES_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_ 58 #endif // SERVICES_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « services/native_viewport/native_viewport_impl.cc ('k') | services/native_viewport/onscreen_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698