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 |