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

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

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 #ifndef CHROME_BROWSER_SPEECH_TTS_MESSAGE_FILTER_H_ 5 #ifndef CHROME_BROWSER_SPEECH_TTS_MESSAGE_FILTER_H_
6 #define CHROME_BROWSER_SPEECH_TTS_MESSAGE_FILTER_H_ 6 #define CHROME_BROWSER_SPEECH_TTS_MESSAGE_FILTER_H_
7 7
8 #include "base/memory/weak_ptr.h" 8 #include "base/memory/weak_ptr.h"
9 #include "chrome/browser/speech/tts_controller.h" 9 #include "chrome/browser/speech/tts_controller.h"
10 #include "chrome/common/tts_messages.h" 10 #include "chrome/common/tts_messages.h"
11 #include "content/public/browser/browser_message_filter.h" 11 #include "content/public/browser/browser_message_filter.h"
12 12
13 class Profile; 13 class Profile;
14 14
15 class TtsMessageFilter 15 class TtsMessageFilter
16 : public content::BrowserMessageFilter, 16 : public content::BrowserMessageFilter,
17 public UtteranceEventDelegate, 17 public UtteranceEventDelegate,
18 public VoicesChangedDelegate, 18 public VoicesChangedDelegate,
19 public base::SupportsWeakPtr<TtsMessageFilter> { 19 public base::SupportsWeakPtr<TtsMessageFilter> {
20 public: 20 public:
21 TtsMessageFilter(int render_process_id, Profile* profile); 21 TtsMessageFilter(int render_process_id, Profile* profile);
22 22
23 // content::BrowserMessageFilter implementation. 23 // content::BrowserMessageFilter implementation.
24 virtual void OverrideThreadForMessage( 24 virtual void OverrideThreadForMessage(
25 const IPC::Message& message, 25 const IPC::Message& message,
26 content::BrowserThread::ID* thread) OVERRIDE; 26 content::BrowserThread::ID* thread) OVERRIDE;
27 virtual bool OnMessageReceived(const IPC::Message& message, 27 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
28 bool* message_was_ok) OVERRIDE;
29 virtual void OnChannelClosing() OVERRIDE; 28 virtual void OnChannelClosing() OVERRIDE;
30 29
31 // UtteranceEventDelegate implementation. 30 // UtteranceEventDelegate implementation.
32 virtual void OnTtsEvent(Utterance* utterance, 31 virtual void OnTtsEvent(Utterance* utterance,
33 TtsEventType event_type, 32 TtsEventType event_type,
34 int char_index, 33 int char_index,
35 const std::string& error_message) OVERRIDE; 34 const std::string& error_message) OVERRIDE;
36 35
37 // VoicesChangedDelegate implementation. 36 // VoicesChangedDelegate implementation.
38 virtual void OnVoicesChanged() OVERRIDE; 37 virtual void OnVoicesChanged() OVERRIDE;
39 38
40 private: 39 private:
41 virtual ~TtsMessageFilter(); 40 virtual ~TtsMessageFilter();
42 41
43 void OnInitializeVoiceList(); 42 void OnInitializeVoiceList();
44 void OnSpeak(const TtsUtteranceRequest& utterance); 43 void OnSpeak(const TtsUtteranceRequest& utterance);
45 void OnPause(); 44 void OnPause();
46 void OnResume(); 45 void OnResume();
47 void OnCancel(); 46 void OnCancel();
48 47
49 void OnChannelClosingInUIThread(); 48 void OnChannelClosingInUIThread();
50 49
51 int render_process_id_; 50 int render_process_id_;
52 Profile* profile_; 51 Profile* profile_;
53 52
54 DISALLOW_COPY_AND_ASSIGN(TtsMessageFilter); 53 DISALLOW_COPY_AND_ASSIGN(TtsMessageFilter);
55 }; 54 };
56 55
57 #endif // CHROME_BROWSER_SPEECH_TTS_MESSAGE_FILTER_H_ 56 #endif // CHROME_BROWSER_SPEECH_TTS_MESSAGE_FILTER_H_
OLDNEW
« no previous file with comments | « chrome/browser/signin/principals_message_filter.cc ('k') | chrome/browser/speech/tts_message_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698