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

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

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 8 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef SERVICES_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_
6 #define SERVICES_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_
7
8 #include "base/memory/ref_counted.h"
9 #include "third_party/mojo_services/src/gpu/public/interfaces/context_provider.m ojom.h"
10 #include "third_party/mojo_services/src/gpu/public/interfaces/viewport_parameter _listener.mojom.h"
11 #include "ui/gfx/native_widget_types.h"
12
13 namespace gles2 {
14 class GpuState;
15 }
16
17 namespace native_viewport {
18
19 class OnscreenContextProvider : public mojo::ContextProvider {
20 public:
21 explicit OnscreenContextProvider(const scoped_refptr<gles2::GpuState>& state);
22 ~OnscreenContextProvider() override;
23
24 void Bind(mojo::InterfaceRequest<mojo::ContextProvider> request);
25
26 void SetAcceleratedWidget(gfx::AcceleratedWidget widget);
27
28 private:
29 // mojo::ContextProvider implementation:
30 void Create(mojo::ViewportParameterListenerPtr viewport_parameter_listener,
31 const CreateCallback& callback) override;
32
33 void CreateAndReturnCommandBuffer();
34
35 scoped_refptr<gles2::GpuState> state_;
36 gfx::AcceleratedWidget widget_;
37 mojo::ViewportParameterListenerPtr pending_listener_;
38 CreateCallback pending_create_callback_;
39 mojo::Binding<mojo::ContextProvider> binding_;
40
41 DISALLOW_COPY_AND_ASSIGN(OnscreenContextProvider);
42 };
43
44 } // namespace mojo
45
46 #endif // SERVICES_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « mojo/services/native_viewport/native_viewport_impl.cc ('k') | mojo/services/native_viewport/onscreen_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698