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

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

Issue 1131523007: Move NativeViewport service into view_manager. This is a file move only. Further merging will happe… (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 7 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 COMPONENTS_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_
6 #define COMPONENTS_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_
7
8 #include <set>
9
10 #include "base/memory/ref_counted.h"
11 #include "components/gpu/public/interfaces/context_provider.mojom.h"
12 #include "components/gpu/public/interfaces/viewport_parameter_listener.mojom.h"
13 #include "ui/gfx/native_widget_types.h"
14
15 namespace gles2 {
16 class CommandBufferDriver;
17 class GpuState;
18 }
19
20 namespace native_viewport {
21
22 class OnscreenContextProvider : public mojo::ContextProvider {
23 public:
24 explicit OnscreenContextProvider(const scoped_refptr<gles2::GpuState>& state);
25 ~OnscreenContextProvider() override;
26
27 void Bind(mojo::InterfaceRequest<mojo::ContextProvider> request);
28
29 void SetAcceleratedWidget(gfx::AcceleratedWidget widget);
30
31 private:
32 // mojo::ContextProvider implementation:
33 void Create(mojo::ViewportParameterListenerPtr viewport_parameter_listener,
34 const CreateCallback& callback) override;
35
36 void CreateAndReturnCommandBuffer();
37 void CommandBufferDestroyed(gles2::CommandBufferDriver* command_buffer);
38
39 scoped_refptr<gles2::GpuState> state_;
40 gfx::AcceleratedWidget widget_;
41 mojo::ViewportParameterListenerPtr pending_listener_;
42 CreateCallback pending_create_callback_;
43 mojo::Binding<mojo::ContextProvider> binding_;
44 std::set<gles2::CommandBufferDriver*> command_buffers_;
45
46 DISALLOW_COPY_AND_ASSIGN(OnscreenContextProvider);
47 };
48
49 } // namespace mojo
50
51 #endif // COMPONENTS_NATIVE_VIEWPORT_ONSCREEN_CONTEXT_PROVIDER_H_
OLDNEW
« no previous file with comments | « components/native_viewport/native_viewport_impl.cc ('k') | components/native_viewport/onscreen_context_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698