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

Side by Side Diff: content/browser/gpu/browser_gpu_channel_host_factory.h

Issue 2967963002: gpu: Reduce of BrowserGpuChannelHostFactory. (Closed)
Patch Set: tot merge Created 3 years, 5 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) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_GPU_CHANNEL_HOST_FACTORY_H_ 5 #ifndef CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 6 #define CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 26 matching lines...) Expand all
37 std::unique_ptr<base::SharedMemory> AllocateSharedMemory( 37 std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
38 size_t size) override; 38 size_t size) override;
39 39
40 gpu::GpuChannelHost* GetGpuChannel(); 40 gpu::GpuChannelHost* GetGpuChannel();
41 int GetGpuChannelId() { return gpu_client_id_; } 41 int GetGpuChannelId() { return gpu_client_id_; }
42 42
43 // Closes the channel to the GPU process. This should be called before the IO 43 // Closes the channel to the GPU process. This should be called before the IO
44 // thread stops. 44 // thread stops.
45 void CloseChannel(); 45 void CloseChannel();
46 46
47 // Used to skip GpuChannelHost tests when there can be no GPU process.
48 static bool CanUseForTesting();
49
50 // Overridden from gpu::GpuChannelEstablishFactory: 47 // Overridden from gpu::GpuChannelEstablishFactory:
51 // The factory will return a null GpuChannelHost in the callback during 48 // The factory will return a null GpuChannelHost in the callback during
52 // shutdown. 49 // shutdown.
53 void EstablishGpuChannel( 50 void EstablishGpuChannel(
54 const gpu::GpuChannelEstablishedCallback& callback) override; 51 const gpu::GpuChannelEstablishedCallback& callback) override;
55 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override; 52 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override;
56 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; 53 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
57 54
58 private: 55 private:
59 struct CreateRequest; 56 struct CreateRequest;
(...skipping 16 matching lines...) Expand all
76 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_; 73 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_;
77 74
78 static BrowserGpuChannelHostFactory* instance_; 75 static BrowserGpuChannelHostFactory* instance_;
79 76
80 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); 77 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory);
81 }; 78 };
82 79
83 } // namespace content 80 } // namespace content
84 81
85 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 82 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
OLDNEW
« no previous file with comments | « content/browser/browser_main_loop.cc ('k') | content/browser/gpu/browser_gpu_channel_host_factory.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698