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

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

Issue 2633053002: Remove the MessageLoop::DestructionObserver from mojo bindings. (Closed)
Patch Set: rebase Created 3 years, 10 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 22 matching lines...) Expand all
33 // Overridden from gpu::GpuChannelHostFactory: 33 // Overridden from gpu::GpuChannelHostFactory:
34 bool IsMainThread() override; 34 bool IsMainThread() override;
35 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override; 35 scoped_refptr<base::SingleThreadTaskRunner> GetIOThreadTaskRunner() override;
36 std::unique_ptr<base::SharedMemory> AllocateSharedMemory( 36 std::unique_ptr<base::SharedMemory> AllocateSharedMemory(
37 size_t size) override; 37 size_t size) override;
38 38
39 int GpuProcessHostId() { return gpu_host_id_; } 39 int GpuProcessHostId() { return gpu_host_id_; }
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
44 // thread stops.
45 void CloseChannel();
46
43 // Used to skip GpuChannelHost tests when there can be no GPU process. 47 // Used to skip GpuChannelHost tests when there can be no GPU process.
44 static bool CanUseForTesting(); 48 static bool CanUseForTesting();
45 49
46 // Overridden from gpu::GpuChannelEstablishFactory: 50 // Overridden from gpu::GpuChannelEstablishFactory:
47 // The factory will return a null GpuChannelHost in the callback during 51 // The factory will return a null GpuChannelHost in the callback during
48 // shutdown. 52 // shutdown.
49 void EstablishGpuChannel( 53 void EstablishGpuChannel(
50 const gpu::GpuChannelEstablishedCallback& callback) override; 54 const gpu::GpuChannelEstablishedCallback& callback) override;
51 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override; 55 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override;
52 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; 56 gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override;
(...skipping 22 matching lines...) Expand all
75 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_; 79 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_;
76 80
77 static BrowserGpuChannelHostFactory* instance_; 81 static BrowserGpuChannelHostFactory* instance_;
78 82
79 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); 83 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory);
80 }; 84 };
81 85
82 } // namespace content 86 } // namespace content
83 87
84 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 88 #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