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

Side by Side Diff: content/renderer/speech_input_dispatcher.cc

Issue 8220006: Rename RenderView to RenderViewImpl. Update Chrome's DEPS so that it can't include the RenderView... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 2 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "content/renderer/speech_input_dispatcher.h" 5 #include "content/renderer/speech_input_dispatcher.h"
6 6
7 #include "base/utf_string_conversions.h" 7 #include "base/utf_string_conversions.h"
8 #include "content/common/speech_input_messages.h" 8 #include "content/common/speech_input_messages.h"
9 #include "content/renderer/render_view.h" 9 #include "content/renderer/render_view_impl.h"
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" 11 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h"
12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" 12 #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h" 13 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputElement.h"
14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h" 14 #include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h" 15 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h" 16 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSpeechInputListene r.h" 17 #include "third_party/WebKit/Source/WebKit/chromium/public/WebSpeechInputListene r.h"
18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 18 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h" 19 #include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
20 20
21 using WebKit::WebDocument; 21 using WebKit::WebDocument;
22 using WebKit::WebElement; 22 using WebKit::WebElement;
23 using WebKit::WebFrame; 23 using WebKit::WebFrame;
24 using WebKit::WebInputElement; 24 using WebKit::WebInputElement;
25 using WebKit::WebNode; 25 using WebKit::WebNode;
26 using WebKit::WebView; 26 using WebKit::WebView;
27 27
28 SpeechInputDispatcher::SpeechInputDispatcher( 28 SpeechInputDispatcher::SpeechInputDispatcher(
29 RenderView* render_view, 29 RenderViewImpl* render_view,
30 WebKit::WebSpeechInputListener* listener) 30 WebKit::WebSpeechInputListener* listener)
31 : content::RenderViewObserver(render_view), 31 : content::RenderViewObserver(render_view),
32 listener_(listener) { 32 listener_(listener) {
33 } 33 }
34 34
35 bool SpeechInputDispatcher::OnMessageReceived(const IPC::Message& message) { 35 bool SpeechInputDispatcher::OnMessageReceived(const IPC::Message& message) {
36 bool handled = true; 36 bool handled = true;
37 IPC_BEGIN_MESSAGE_MAP(SpeechInputDispatcher, message) 37 IPC_BEGIN_MESSAGE_MAP(SpeechInputDispatcher, message)
38 IPC_MESSAGE_HANDLER(SpeechInputMsg_SetRecognitionResult, 38 IPC_MESSAGE_HANDLER(SpeechInputMsg_SetRecognitionResult,
39 OnSpeechRecognitionResult) 39 OnSpeechRecognitionResult)
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 return; 131 return;
132 if (!input_element->isSpeechInputEnabled()) 132 if (!input_element->isSpeechInputEnabled())
133 return; 133 return;
134 134
135 if (input_element->getSpeechInputState() == WebInputElement::Idle) { 135 if (input_element->getSpeechInputState() == WebInputElement::Idle) {
136 input_element->startSpeechInput(); 136 input_element->startSpeechInput();
137 } else { 137 } else {
138 input_element->stopSpeechInput(); 138 input_element->stopSpeechInput();
139 } 139 }
140 } 140 }
OLDNEW
« no previous file with comments | « content/renderer/speech_input_dispatcher.h ('k') | content/renderer/text_input_client_observer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698