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

Unified Diff: gpu/command_buffer/service/gles2_cmd_decoder_mock.cc

Issue 2898953002: Remove SupportsWeakPtr inheritance from GLES2Decoder (Closed)
Patch Set: Created 3 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 side-by-side diff with in-line comments
Download patch
Index: gpu/command_buffer/service/gles2_cmd_decoder_mock.cc
diff --git a/gpu/command_buffer/service/gles2_cmd_decoder_mock.cc b/gpu/command_buffer/service/gles2_cmd_decoder_mock.cc
index d7da998daf93fefd761648e0960d9dc66b692ca3..5750b7e1f96b2ad6b6d702eb1b45c8d6384a9697 100644
--- a/gpu/command_buffer/service/gles2_cmd_decoder_mock.cc
+++ b/gpu/command_buffer/service/gles2_cmd_decoder_mock.cc
@@ -9,8 +9,7 @@
namespace gpu {
namespace gles2 {
-MockGLES2Decoder::MockGLES2Decoder()
- : GLES2Decoder() {
+MockGLES2Decoder::MockGLES2Decoder() : GLES2Decoder(), weak_ptr_factory_(this) {
ON_CALL(*this, GetCommandName(testing::_))
.WillByDefault(testing::Return(""));
ON_CALL(*this, MakeCurrent())
@@ -27,5 +26,9 @@ error::Error MockGLES2Decoder::FakeDoCommands(unsigned int num_commands,
num_commands, buffer, num_entries, entries_processed);
}
+base::WeakPtr<GLES2Decoder> MockGLES2Decoder::AsWeakPtr() {
+ return weak_ptr_factory_.GetWeakPtr();
+}
+
} // namespace gles2
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder_mock.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder_passthrough.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698