OLD | NEW |
---|---|
(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 UI_OZONE_PUBLIC_NATIVE_PIXMAP_CLIENT_H_ | |
6 #define UI_OZONE_PUBLIC_NATIVE_PIXMAP_CLIENT_H_ | |
7 | |
8 #include "ui/ozone/ozone_export.h" | |
9 #include "ui/ozone/public/surface_factory_ozone.h" | |
10 | |
11 namespace ui { | |
12 | |
13 // The Ozone interface allows external implementations to hook into Chromium to | |
14 // provide the handle of a system specific surface implementation for Browser | |
15 // and Render process. | |
16 class OZONE_EXPORT NativePixmapClient { | |
reveman
2015/06/05 20:26:07
NativePixmapClient sounds like we'd have one of th
spang
2015/06/05 22:21:23
That sounds good to me.
dshwang
2015/06/08 11:15:14
Done.
| |
17 public: | |
18 NativePixmapClient(); | |
19 virtual ~NativePixmapClient(); | |
20 | |
21 // Initializes the resources necessary. | |
22 static void InitializeIfNeeded(); | |
23 | |
24 static NativePixmapClient* GetInstance(); | |
25 | |
26 struct Configuration { | |
27 SurfaceFactoryOzone::BufferFormat format; | |
28 SurfaceFactoryOzone::BufferUsage usage; | |
29 }; | |
30 | |
31 // Gets supported format/usage configurations. | |
32 virtual std::vector<Configuration> GetSupportedNativePixmapConfigurations() | |
spang
2015/06/05 19:21:54
Is this used from the renderer? (Does it need to m
dshwang
2015/06/08 11:15:14
Currently it's used by browser process. Renderer w
| |
33 const; | |
reveman
2015/06/05 20:26:07
can this be pure virtual?
dshwang
2015/06/08 11:15:14
Done.
| |
34 | |
35 private: | |
36 static void CreateInstance(); | |
37 virtual void Initialize(); | |
38 | |
39 DISALLOW_COPY_AND_ASSIGN(NativePixmapClient); | |
40 }; | |
41 | |
42 } // namespace ui | |
43 | |
44 #endif // UI_OZONE_PUBLIC_NATIVE_PIXMAP_CLIENT_H_ | |
OLD | NEW |