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

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

Issue 2233023003: content: Don't keep requesting the GpuChannelHost during shutdown. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: timer stop Created 4 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
« no previous file with comments | « no previous file | content/browser/renderer_host/context_provider_factory_impl_android.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 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 // Used to skip GpuChannelHost tests when there can be no GPU process. 43 // Used to skip GpuChannelHost tests when there can be no GPU process.
44 static bool CanUseForTesting(); 44 static bool CanUseForTesting();
45 45
46 // Overridden from gpu::GpuChannelEstablishFactory: 46 // Overridden from gpu::GpuChannelEstablishFactory:
47 // The factory will return a null GpuChannelHost in the callback during
48 // shutdown.
47 void EstablishGpuChannel( 49 void EstablishGpuChannel(
48 const gpu::GpuChannelEstablishedCallback& callback) override; 50 const gpu::GpuChannelEstablishedCallback& callback) override;
49 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override; 51 scoped_refptr<gpu::GpuChannelHost> EstablishGpuChannelSync() override;
50 52
51 private: 53 private:
52 struct CreateRequest; 54 struct CreateRequest;
53 class EstablishRequest; 55 class EstablishRequest;
54 56
55 BrowserGpuChannelHostFactory(); 57 BrowserGpuChannelHostFactory();
56 ~BrowserGpuChannelHostFactory() override; 58 ~BrowserGpuChannelHostFactory() override;
(...skipping 15 matching lines...) Expand all
72 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_; 74 std::vector<gpu::GpuChannelEstablishedCallback> established_callbacks_;
73 75
74 static BrowserGpuChannelHostFactory* instance_; 76 static BrowserGpuChannelHostFactory* instance_;
75 77
76 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory); 78 DISALLOW_COPY_AND_ASSIGN(BrowserGpuChannelHostFactory);
77 }; 79 };
78 80
79 } // namespace content 81 } // namespace content
80 82
81 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_ 83 #endif // CONTENT_BROWSER_GPU_BROWSER_GPU_CHANNEL_HOST_FACTORY_H_
OLDNEW
« no previous file with comments | « no previous file | content/browser/renderer_host/context_provider_factory_impl_android.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698