| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 #include "chrome/browser/speech/tts_message_filter.h" | 5 #include "chrome/browser/speech/tts_message_filter.h" |
| 6 | 6 |
| 7 #include <stddef.h> |
| 8 |
| 7 #include "base/bind.h" | 9 #include "base/bind.h" |
| 8 #include "base/logging.h" | 10 #include "base/logging.h" |
| 9 #include "chrome/browser/chrome_notification_types.h" | 11 #include "chrome/browser/chrome_notification_types.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 12 #include "chrome/browser/profiles/profile.h" |
| 11 #include "chrome/common/tts_messages.h" | 13 #include "chrome/common/tts_messages.h" |
| 12 #include "content/public/browser/browser_context.h" | 14 #include "content/public/browser/browser_context.h" |
| 13 #include "content/public/browser/notification_service.h" | 15 #include "content/public/browser/notification_service.h" |
| 14 #include "content/public/browser/render_process_host.h" | 16 #include "content/public/browser/render_process_host.h" |
| 15 | 17 |
| 16 using content::BrowserThread; | 18 using content::BrowserThread; |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 TtsController::GetInstance()->RemoveUtteranceEventDelegate(this); | 207 TtsController::GetInstance()->RemoveUtteranceEventDelegate(this); |
| 206 } | 208 } |
| 207 | 209 |
| 208 void TtsMessageFilter::Observe( | 210 void TtsMessageFilter::Observe( |
| 209 int type, | 211 int type, |
| 210 const content::NotificationSource& source, | 212 const content::NotificationSource& source, |
| 211 const content::NotificationDetails& details) { | 213 const content::NotificationDetails& details) { |
| 212 browser_context_ = nullptr; | 214 browser_context_ = nullptr; |
| 213 notification_registrar_.RemoveAll(); | 215 notification_registrar_.RemoveAll(); |
| 214 } | 216 } |
| OLD | NEW |