Index: chrome/browser/speech/extension_api/tts_extension_api.cc |
diff --git a/chrome/browser/speech/extension_api/tts_extension_api.cc b/chrome/browser/speech/extension_api/tts_extension_api.cc |
index 8633523fa6ffae976cbafb7cfdc39201ce8c6832..e7b65e175c62026c0ab86247117388c380fb16f0 100644 |
--- a/chrome/browser/speech/extension_api/tts_extension_api.cc |
+++ b/chrome/browser/speech/extension_api/tts_extension_api.cc |
@@ -7,7 +7,6 @@ |
#include <string> |
#include "base/lazy_instance.h" |
-#include "base/memory/weak_ptr.h" |
#include "base/values.h" |
#include "chrome/browser/profiles/profile.h" |
#include "chrome/browser/speech/extension_api/tts_engine_extension_api.h" |
@@ -83,8 +82,7 @@ namespace extensions { |
// One of these is constructed for each utterance, and deleted |
// when the utterance gets any final event. |
class TtsExtensionEventHandler |
- : public UtteranceEventDelegate, |
- public base::SupportsWeakPtr<TtsExtensionEventHandler> { |
+ : public UtteranceEventDelegate { |
public: |
explicit TtsExtensionEventHandler(const std::string& src_extension_id); |
@@ -289,8 +287,7 @@ bool TtsSpeakFunction::RunAsync() { |
utterance->set_desired_event_types(desired_event_types); |
utterance->set_extension_id(voice_extension_id); |
utterance->set_options(options.get()); |
- utterance->set_event_delegate( |
- (new TtsExtensionEventHandler(extension_id()))->AsWeakPtr()); |
+ utterance->set_event_delegate(new TtsExtensionEventHandler(extension_id())); |
TtsController* controller = TtsController::GetInstance(); |
controller->SpeakOrEnqueue(utterance); |