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

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

Issue 10383262: RefCounted types should not have public destructors, delegate cleanup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 7 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 | Annotate | Revision Log
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_COMMAND_BUFFER_STUB_H_ 5 #ifndef CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 6 #define CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
7 #pragma once 7 #pragma once
8 8
9 #if defined(ENABLE_GPU) 9 #if defined(ENABLE_GPU)
10 10
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
77 }; 77 };
78 78
79 class GpuCommandBufferStub 79 class GpuCommandBufferStub
80 : public GpuCommandBufferStubBase, 80 : public GpuCommandBufferStubBase,
81 public IPC::Channel::Listener, 81 public IPC::Channel::Listener,
82 public IPC::Message::Sender, 82 public IPC::Message::Sender,
83 public base::SupportsWeakPtr<GpuCommandBufferStub> { 83 public base::SupportsWeakPtr<GpuCommandBufferStub> {
84 public: 84 public:
85 class DestructionObserver { 85 class DestructionObserver {
86 public: 86 public:
87 ~DestructionObserver() {}
88
89 // Called in Destroy(), before the context/surface are released. 87 // Called in Destroy(), before the context/surface are released.
90 virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) = 0; 88 virtual void OnWillDestroyStub(GpuCommandBufferStub* stub) = 0;
89
90 protected:
91 virtual ~DestructionObserver() {}
91 }; 92 };
92 93
93 GpuCommandBufferStub( 94 GpuCommandBufferStub(
94 GpuChannel* channel, 95 GpuChannel* channel,
95 GpuCommandBufferStub* share_group, 96 GpuCommandBufferStub* share_group,
96 const gfx::GLSurfaceHandle& handle, 97 const gfx::GLSurfaceHandle& handle,
97 gpu::gles2::MailboxManager* mailbox_manager, 98 gpu::gles2::MailboxManager* mailbox_manager,
98 const gfx::Size& size, 99 const gfx::Size& size,
99 const gpu::gles2::DisallowedFeatures& disallowed_features, 100 const gpu::gles2::DisallowedFeatures& disallowed_features,
100 const std::string& allowed_extensions, 101 const std::string& allowed_extensions,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
254 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_; 255 IDMap<GpuVideoDecodeAccelerator, IDMapOwnPointer> video_decoders_;
255 256
256 ObserverList<DestructionObserver> destruction_observers_; 257 ObserverList<DestructionObserver> destruction_observers_;
257 258
258 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub); 259 DISALLOW_COPY_AND_ASSIGN(GpuCommandBufferStub);
259 }; 260 };
260 261
261 #endif // defined(ENABLE_GPU) 262 #endif // defined(ENABLE_GPU)
262 263
263 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_ 264 #endif // CONTENT_COMMON_GPU_GPU_COMMAND_BUFFER_STUB_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698