| 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_BROWSER_GPU_BROWSER_NATIVE_PIXMAP_MANAGER_OZONE_H_ | 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_NATIVE_PIXMAP_MANAGER_OZONE_H_ |
| 6 #define CONTENT_BROWSER_GPU_BROWSER_NATIVE_PIXMAP_MANAGER_OZONE_H_ | 6 #define CONTENT_BROWSER_GPU_BROWSER_NATIVE_PIXMAP_MANAGER_OZONE_H_ |
| 7 | 7 |
| 8 #include "base/file_descriptor_posix.h" | 8 #include "base/file_descriptor_posix.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 BrowserMessageFilter* CreateMessageFilter(); | 23 BrowserMessageFilter* CreateMessageFilter(); |
| 24 | 24 |
| 25 typedef base::Callback<void(const base::FileDescriptor& fd)> | 25 typedef base::Callback<void(const base::FileDescriptor& fd)> |
| 26 FileDescriptorCallback; | 26 FileDescriptorCallback; |
| 27 void GetVirtualDeviceForChildProcess(const FileDescriptorCallback& callback); | 27 void GetVirtualDeviceForChildProcess(const FileDescriptorCallback& callback); |
| 28 | 28 |
| 29 // ui::NativePixmapManager: | 29 // ui::NativePixmapManager: |
| 30 void Initialize(const base::FileDescriptor& device_fd) override; | 30 void Initialize(const base::FileDescriptor& device_fd) override; |
| 31 std::vector<Configuration> GetSupportedNativePixmapConfigurations() | 31 std::vector<Configuration> GetSupportedNativePixmapConfigurations() |
| 32 const override; | 32 const override; |
| 33 scoped_refptr<ui::NativePixmap> CreateFromFileDescriptor( |
| 34 base::FileDescriptor handle, |
| 35 gfx::Size size, |
| 36 ui::SurfaceFactoryOzone::BufferFormat format, |
| 37 ui::SurfaceFactoryOzone::BufferUsage usage) override; |
| 33 | 38 |
| 34 private: | 39 private: |
| 35 friend struct BrowserNativePixmapManagerTrait; | 40 friend struct BrowserNativePixmapManagerTrait; |
| 36 BrowserNativePixmapManager(); | 41 BrowserNativePixmapManager(); |
| 37 | 42 |
| 38 scoped_ptr<ui::NativePixmapManager> pixmap_manager_; | 43 scoped_ptr<ui::NativePixmapManager> pixmap_manager_; |
| 39 base::FileDescriptor device_fd_; | 44 base::FileDescriptor device_fd_; |
| 40 | 45 |
| 41 DISALLOW_COPY_AND_ASSIGN(BrowserNativePixmapManager); | 46 DISALLOW_COPY_AND_ASSIGN(BrowserNativePixmapManager); |
| 42 }; | 47 }; |
| 43 | 48 |
| 44 } // namespace content | 49 } // namespace content |
| 45 | 50 |
| 46 #endif // CONTENT_BROWSER_GPU_BROWSER_NATIVE_PIXMAP_MANAGER_OZONE_H_ | 51 #endif // CONTENT_BROWSER_GPU_BROWSER_NATIVE_PIXMAP_MANAGER_OZONE_H_ |
| OLD | NEW |