egl: Don't query EGL_POST_SUB_BUFFER_SUPPORTED_NV without extension
[chromium-blink-merge.git] / content / child / child_shared_bitmap_manager.h
blobe4d6b4989fd1772d47d37d881108f8dc90be97df
1 // Copyright (c) 2013 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.
5 #ifndef CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
6 #define CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_
8 #include "base/memory/ref_counted.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "base/memory/shared_memory.h"
11 #include "cc/resources/shared_bitmap_manager.h"
12 #include "content/child/thread_safe_sender.h"
14 namespace content {
16 class ChildSharedBitmapManager : public cc::SharedBitmapManager {
17 public:
18 ChildSharedBitmapManager(scoped_refptr<ThreadSafeSender> sender);
19 ~ChildSharedBitmapManager() override;
21 scoped_ptr<cc::SharedBitmap> AllocateSharedBitmap(
22 const gfx::Size& size) override;
23 scoped_ptr<cc::SharedBitmap> GetSharedBitmapFromId(
24 const gfx::Size&,
25 const cc::SharedBitmapId&) override;
26 scoped_ptr<cc::SharedBitmap> GetBitmapForSharedMemory(
27 base::SharedMemory* mem) override;
29 private:
30 scoped_refptr<ThreadSafeSender> sender_;
32 DISALLOW_COPY_AND_ASSIGN(ChildSharedBitmapManager);
35 } // namespace content
37 #endif // CONTENT_CHILD_CHILD_SHARED_BITMAP_MANAGER_H_