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

Unified Diff: chrome/renderer/tts_dispatcher.h

Issue 15031002: Implement TTS dispatcher using RenderProcessObserver instead of MessageFilter. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/renderer/tts_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/renderer/tts_dispatcher.h
diff --git a/chrome/renderer/tts_dispatcher.h b/chrome/renderer/tts_dispatcher.h
index 77433e71df50c1a2f63213808a159a08f5a75100..bbebe6d920a65da89401ca8f6caa1e191b8fca78 100644
--- a/chrome/renderer/tts_dispatcher.h
+++ b/chrome/renderer/tts_dispatcher.h
@@ -8,13 +8,16 @@
#include <vector>
#include "base/basictypes.h"
+#include "base/compiler_specific.h"
#include "base/hash_tables.h"
-#include "content/public/renderer/render_view.h"
-#include "ipc/ipc_channel_proxy.h"
+#include "content/public/renderer/render_process_observer.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebSpeechSynthesizer.h"
#include "third_party/WebKit/Source/Platform/chromium/public/WebSpeechSynthesizerClient.h"
-class RenderViewImpl;
+namespace IPC {
+class Message;
+}
+
struct TtsVoice;
// TtsDispatcher is a delegate for methods used by WebKit for
@@ -22,15 +25,15 @@ struct TtsVoice;
// TtsDispatcherHost (owned by RenderViewHost).
class TtsDispatcher
: public WebKit::WebSpeechSynthesizer,
- public IPC::ChannelProxy::MessageFilter {
+ public content::RenderProcessObserver {
public:
explicit TtsDispatcher(WebKit::WebSpeechSynthesizerClient* client);
private:
virtual ~TtsDispatcher();
- // IPC::ChannelProxy::MessageFilter override.
- virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+ // RenderProcessObserver override.
+ virtual bool OnControlMessageReceived(const IPC::Message& message) OVERRIDE;
// WebKit::WebSpeechSynthesizer implementation.
virtual void updateVoiceList() OVERRIDE;
@@ -59,11 +62,6 @@ class TtsDispatcher
// Weak reference, this will be valid as long as this object exists.
WebKit::WebSpeechSynthesizerClient* synthesizer_client_;
- // Message loop for the main render thread. Utilized to
- // ensure that callbacks into WebKit happen on the main thread
- // instead of the originating IO thread.
- scoped_refptr<base::MessageLoopProxy> main_loop_;
-
// Next utterance id, used to map response IPCs to utterance objects.
static int next_utterance_id_;
« no previous file with comments | « no previous file | chrome/renderer/tts_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698