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

Side by Side Diff: content/browser/aura/no_transport_image_transport_factory.h

Issue 22935009: Add content::SurfaceCapturer (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@screencast_stride
Patch Set: 89e2665f Rebase. Created 7 years, 4 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
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 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 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_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
6 #define CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_ 6 #define CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "content/browser/aura/image_transport_factory.h" 9 #include "content/browser/aura/image_transport_factory.h"
10 10
11 namespace content { 11 namespace content {
12 12
13 // An ImageTransportFactory that disables transport. 13 // An ImageTransportFactory that disables transport.
14 class NoTransportImageTransportFactory : public ImageTransportFactory { 14 class NoTransportImageTransportFactory : public ImageTransportFactory {
15 public: 15 public:
16 explicit NoTransportImageTransportFactory( 16 explicit NoTransportImageTransportFactory(
17 ui::ContextFactory* context_factory); 17 ui::ContextFactory* context_factory);
18 virtual ~NoTransportImageTransportFactory(); 18 virtual ~NoTransportImageTransportFactory();
19 19
20 // ImageTransportFactory implementation. 20 // ImageTransportFactory implementation.
21 virtual ui::ContextFactory* AsContextFactory() OVERRIDE; 21 virtual ui::ContextFactory* AsContextFactory() OVERRIDE;
22 virtual SurfaceCapturingContextFactory* AsSurfaceCapturingContextFactory()
23 OVERRIDE;
22 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() OVERRIDE; 24 virtual gfx::GLSurfaceHandle CreateSharedSurfaceHandle() OVERRIDE;
23 virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface) 25 virtual void DestroySharedSurfaceHandle(gfx::GLSurfaceHandle surface)
24 OVERRIDE; 26 OVERRIDE;
25 virtual scoped_refptr<ui::Texture> CreateTransportClient( 27 virtual scoped_refptr<ui::Texture> CreateTransportClient(
26 float device_scale_factor) OVERRIDE; 28 float device_scale_factor) OVERRIDE;
27 virtual scoped_refptr<ui::Texture> CreateOwnedTexture( 29 virtual scoped_refptr<ui::Texture> CreateOwnedTexture(
28 const gfx::Size& size, 30 const gfx::Size& size,
29 float device_scale_factor, 31 float device_scale_factor,
30 unsigned int texture_id) OVERRIDE; 32 unsigned int texture_id) OVERRIDE;
31 virtual GLHelper* GetGLHelper() OVERRIDE; 33 virtual GLHelper* GetGLHelper() OVERRIDE;
32 virtual uint32 InsertSyncPoint() OVERRIDE; 34 virtual uint32 InsertSyncPoint() OVERRIDE;
33 virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE; 35 virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE;
34 virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE; 36 virtual void AddObserver(ImageTransportFactoryObserver* observer) OVERRIDE;
35 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) OVERRIDE; 37 virtual void RemoveObserver(ImageTransportFactoryObserver* observer) OVERRIDE;
36 38
37 private: 39 private:
38 scoped_ptr<ui::ContextFactory> context_factory_; 40 scoped_ptr<ui::ContextFactory> context_factory_;
39 41
40 DISALLOW_COPY_AND_ASSIGN(NoTransportImageTransportFactory); 42 DISALLOW_COPY_AND_ASSIGN(NoTransportImageTransportFactory);
41 }; 43 };
42 44
43 } // namespace content 45 } // namespace content
44 46
45 #endif // CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_ 47 #endif // CONTENT_BROWSER_AURA_NO_TRANSPORT_IMAGE_TRANSPORT_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698