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

Side by Side Diff: chrome/browser/speech/tts_message_filter.cc

Issue 292443004: Remove IPC_BEGIN_MESSAGE_MAP_EX macro since r270839 made all bad IPCs kill their child processes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 6 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) 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 "base/bind.h" 7 #include "base/bind.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/profiles/profile.h" 9 #include "chrome/browser/profiles/profile.h"
10 #include "chrome/browser/speech/tts_controller.h" 10 #include "chrome/browser/speech/tts_controller.h"
(...skipping 17 matching lines...) Expand all
28 case TtsHostMsg_InitializeVoiceList::ID: 28 case TtsHostMsg_InitializeVoiceList::ID:
29 case TtsHostMsg_Speak::ID: 29 case TtsHostMsg_Speak::ID:
30 case TtsHostMsg_Pause::ID: 30 case TtsHostMsg_Pause::ID:
31 case TtsHostMsg_Resume::ID: 31 case TtsHostMsg_Resume::ID:
32 case TtsHostMsg_Cancel::ID: 32 case TtsHostMsg_Cancel::ID:
33 *thread = BrowserThread::UI; 33 *thread = BrowserThread::UI;
34 break; 34 break;
35 } 35 }
36 } 36 }
37 37
38 bool TtsMessageFilter::OnMessageReceived(const IPC::Message& message, 38 bool TtsMessageFilter::OnMessageReceived(const IPC::Message& message) {
39 bool* message_was_ok) {
40 bool handled = true; 39 bool handled = true;
41 IPC_BEGIN_MESSAGE_MAP_EX(TtsMessageFilter, message, *message_was_ok) 40 IPC_BEGIN_MESSAGE_MAP(TtsMessageFilter, message)
42 IPC_MESSAGE_HANDLER(TtsHostMsg_InitializeVoiceList, OnInitializeVoiceList) 41 IPC_MESSAGE_HANDLER(TtsHostMsg_InitializeVoiceList, OnInitializeVoiceList)
43 IPC_MESSAGE_HANDLER(TtsHostMsg_Speak, OnSpeak) 42 IPC_MESSAGE_HANDLER(TtsHostMsg_Speak, OnSpeak)
44 IPC_MESSAGE_HANDLER(TtsHostMsg_Pause, OnPause) 43 IPC_MESSAGE_HANDLER(TtsHostMsg_Pause, OnPause)
45 IPC_MESSAGE_HANDLER(TtsHostMsg_Resume, OnResume) 44 IPC_MESSAGE_HANDLER(TtsHostMsg_Resume, OnResume)
46 IPC_MESSAGE_HANDLER(TtsHostMsg_Cancel, OnCancel) 45 IPC_MESSAGE_HANDLER(TtsHostMsg_Cancel, OnCancel)
47 IPC_MESSAGE_UNHANDLED(handled = false) 46 IPC_MESSAGE_UNHANDLED(handled = false)
48 IPC_END_MESSAGE_MAP() 47 IPC_END_MESSAGE_MAP()
49 return handled; 48 return handled;
50 } 49 }
51 50
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
154 OnInitializeVoiceList(); 153 OnInitializeVoiceList();
155 } 154 }
156 155
157 void TtsMessageFilter::OnChannelClosingInUIThread() { 156 void TtsMessageFilter::OnChannelClosingInUIThread() {
158 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); 157 CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
159 TtsController::GetInstance()->RemoveVoicesChangedDelegate(this); 158 TtsController::GetInstance()->RemoveVoicesChangedDelegate(this);
160 } 159 }
161 160
162 TtsMessageFilter::~TtsMessageFilter() { 161 TtsMessageFilter::~TtsMessageFilter() {
163 } 162 }
OLDNEW
« no previous file with comments | « chrome/browser/speech/tts_message_filter.h ('k') | chrome/browser/spellchecker/spellcheck_message_filter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698