| OLD | NEW |
| 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 CONTENT_CHILD_CHILD_NATIVE_PIXMAP_MANAGER_OZONE_H_ | 5 #ifndef CONTENT_CHILD_CHILD_NATIVE_PIXMAP_MANAGER_OZONE_H_ |
| 6 #define CONTENT_CHILD_CHILD_NATIVE_PIXMAP_MANAGER_OZONE_H_ | 6 #define CONTENT_CHILD_CHILD_NATIVE_PIXMAP_MANAGER_OZONE_H_ |
| 7 | 7 |
| 8 #include "base/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "content/child/thread_safe_sender.h" | 10 #include "content/child/thread_safe_sender.h" |
| 11 #include "ui/ozone/public/native_pixmap_manager.h" | 11 #include "ui/ozone/public/native_pixmap_manager.h" |
| 12 | 12 |
| 13 namespace content { | 13 namespace content { |
| 14 | 14 |
| 15 class ChildNativePixmapManager : public ui::NativePixmapManager { | 15 class ChildNativePixmapManager : public ui::NativePixmapManager { |
| 16 public: | 16 public: |
| 17 static scoped_ptr<ChildNativePixmapManager> Create(ThreadSafeSender* sender); | 17 static scoped_ptr<ChildNativePixmapManager> Create(ThreadSafeSender* sender); |
| 18 | 18 |
| 19 ~ChildNativePixmapManager() override; | 19 ~ChildNativePixmapManager() override; |
| 20 | 20 |
| 21 // ui::NativePixmapManager: | 21 // ui::NativePixmapManager: |
| 22 void Initialize(const base::FileDescriptor& device_fd) override; | 22 void Initialize(const base::FileDescriptor& device_fd) override; |
| 23 std::vector<Configuration> GetSupportedNativePixmapConfigurations() | 23 std::vector<Configuration> GetSupportedNativePixmapConfigurations() |
| 24 const override; | 24 const override; |
| 25 scoped_refptr<ui::NativePixmap> CreateFromFileDescriptor( |
| 26 base::FileDescriptor handle, |
| 27 gfx::Size size, |
| 28 ui::SurfaceFactoryOzone::BufferFormat format, |
| 29 ui::SurfaceFactoryOzone::BufferUsage usage) override; |
| 25 | 30 |
| 26 private: | 31 private: |
| 27 ChildNativePixmapManager(); | 32 ChildNativePixmapManager(); |
| 28 | 33 |
| 29 scoped_ptr<ui::NativePixmapManager> pixmap_manager_; | 34 scoped_ptr<ui::NativePixmapManager> pixmap_manager_; |
| 30 | 35 |
| 31 DISALLOW_COPY_AND_ASSIGN(ChildNativePixmapManager); | 36 DISALLOW_COPY_AND_ASSIGN(ChildNativePixmapManager); |
| 32 }; | 37 }; |
| 33 | 38 |
| 34 } // namespace content | 39 } // namespace content |
| 35 | 40 |
| 36 #endif // CONTENT_CHILD_CHILD_NATIVE_PIXMAP_MANAGER_OZONE_H_ | 41 #endif // CONTENT_CHILD_CHILD_NATIVE_PIXMAP_MANAGER_OZONE_H_ |
| OLD | NEW |