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

Side by Side Diff: content/common/gpu/gpu_channel.h

Issue 565833002: Refactoring the weak_ptr_factory order in src/content/common (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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_COMMON_GPU_GPU_CHANNEL_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_CHANNEL_H_
6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_ 6 #define CONTENT_COMMON_GPU_GPU_CHANNEL_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <string> 9 #include <string>
10 10
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap; 210 typedef IDMap<GpuCommandBufferStub, IDMapOwnPointer> StubMap;
211 StubMap stubs_; 211 StubMap stubs_;
212 212
213 bool log_messages_; // True if we should log sent and received messages. 213 bool log_messages_; // True if we should log sent and received messages.
214 gpu::gles2::DisallowedFeatures disallowed_features_; 214 gpu::gles2::DisallowedFeatures disallowed_features_;
215 GpuWatchdog* watchdog_; 215 GpuWatchdog* watchdog_;
216 bool software_; 216 bool software_;
217 bool handle_messages_scheduled_; 217 bool handle_messages_scheduled_;
218 IPC::Message* currently_processing_message_; 218 IPC::Message* currently_processing_message_;
219 219
220 base::WeakPtrFactory<GpuChannel> weak_factory_;
221
222 scoped_refptr<GpuChannelMessageFilter> filter_; 220 scoped_refptr<GpuChannelMessageFilter> filter_;
223 scoped_refptr<base::MessageLoopProxy> io_message_loop_; 221 scoped_refptr<base::MessageLoopProxy> io_message_loop_;
224 scoped_ptr<DevToolsGpuAgent> devtools_gpu_agent_; 222 scoped_ptr<DevToolsGpuAgent> devtools_gpu_agent_;
225 223
226 size_t num_stubs_descheduled_; 224 size_t num_stubs_descheduled_;
227 225
228 bool allow_future_sync_points_; 226 bool allow_future_sync_points_;
229 227
228 // Member variables should appear before the WeakPtrFactory, to ensure
229 // that any WeakPtrs to Controller are invalidated before its members
230 // variable's destructors are executed, rendering them invalid.
231 base::WeakPtrFactory<GpuChannel> weak_factory_;
232
230 DISALLOW_COPY_AND_ASSIGN(GpuChannel); 233 DISALLOW_COPY_AND_ASSIGN(GpuChannel);
231 }; 234 };
232 235
233 } // namespace content 236 } // namespace content
234 237
235 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_ 238 #endif // CONTENT_COMMON_GPU_GPU_CHANNEL_H_
OLDNEW
« no previous file with comments | « content/common/gpu/client/webgraphicscontext3d_command_buffer_impl.cc ('k') | content/common/gpu/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698