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

Side by Side Diff: chrome/browser/renderer_host/browser_render_process_host.cc

Issue 6610022: Enable speech input by default and remove unused code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "chrome/browser/renderer_host/browser_render_process_host.h" 8 #include "chrome/browser/renderer_host/browser_render_process_host.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
82 #include "content/browser/renderer_host/pepper_file_message_filter.h" 82 #include "content/browser/renderer_host/pepper_file_message_filter.h"
83 #include "content/browser/renderer_host/pepper_message_filter.h" 83 #include "content/browser/renderer_host/pepper_message_filter.h"
84 #include "content/browser/renderer_host/render_message_filter.h" 84 #include "content/browser/renderer_host/render_message_filter.h"
85 #include "content/browser/renderer_host/render_view_host.h" 85 #include "content/browser/renderer_host/render_view_host.h"
86 #include "content/browser/renderer_host/render_view_host_delegate.h" 86 #include "content/browser/renderer_host/render_view_host_delegate.h"
87 #include "content/browser/renderer_host/render_widget_helper.h" 87 #include "content/browser/renderer_host/render_widget_helper.h"
88 #include "content/browser/renderer_host/render_widget_host.h" 88 #include "content/browser/renderer_host/render_widget_host.h"
89 #include "content/browser/renderer_host/resource_message_filter.h" 89 #include "content/browser/renderer_host/resource_message_filter.h"
90 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h" 90 #include "content/browser/renderer_host/socket_stream_dispatcher_host.h"
91 #include "content/browser/speech/speech_input_dispatcher_host.h" 91 #include "content/browser/speech/speech_input_dispatcher_host.h"
92 #include "content/browser/speech/speech_input_manager.h"
93 #include "content/browser/worker_host/worker_message_filter.h" 92 #include "content/browser/worker_host/worker_message_filter.h"
94 #include "grit/generated_resources.h" 93 #include "grit/generated_resources.h"
95 #include "ipc/ipc_logging.h" 94 #include "ipc/ipc_logging.h"
96 #include "ipc/ipc_message.h" 95 #include "ipc/ipc_message.h"
97 #include "ipc/ipc_platform_file.h" 96 #include "ipc/ipc_platform_file.h"
98 #include "ipc/ipc_switches.h" 97 #include "ipc/ipc_switches.h"
99 #include "media/base/media_switches.h" 98 #include "media/base/media_switches.h"
100 #include "ui/base/ui_base_switches.h" 99 #include "ui/base/ui_base_switches.h"
101 #include "webkit/fileapi/file_system_path_manager.h" 100 #include "webkit/fileapi/file_system_path_manager.h"
102 #include "webkit/plugins/plugin_switches.h" 101 #include "webkit/plugins/plugin_switches.h"
(...skipping 714 matching lines...) Expand 10 before | Expand all | Expand 10 after
817 // Loaded extensions. 816 // Loaded extensions.
818 ExtensionService* service = profile()->GetExtensionService(); 817 ExtensionService* service = profile()->GetExtensionService();
819 if (service) { 818 if (service) {
820 for (size_t i = 0; i < service->extensions()->size(); ++i) { 819 for (size_t i = 0; i < service->extensions()->size(); ++i) {
821 Send(new ViewMsg_ExtensionLoaded( 820 Send(new ViewMsg_ExtensionLoaded(
822 ViewMsg_ExtensionLoaded_Params(service->extensions()->at(i)))); 821 ViewMsg_ExtensionLoaded_Params(service->extensions()->at(i))));
823 } 822 }
824 } 823 }
825 } 824 }
826 825
827 void BrowserRenderProcessHost::InitSpeechInput() {
828 Send(new ViewMsg_SpeechInput_SetFeatureEnabled(
829 speech_input::SpeechInputManager::IsFeatureEnabled()));
830 }
831
832 void BrowserRenderProcessHost::SendUserScriptsUpdate( 826 void BrowserRenderProcessHost::SendUserScriptsUpdate(
833 base::SharedMemory *shared_memory) { 827 base::SharedMemory *shared_memory) {
834 // Process is being started asynchronously. We'll end up calling 828 // Process is being started asynchronously. We'll end up calling
835 // InitUserScripts when it's created which will call this again. 829 // InitUserScripts when it's created which will call this again.
836 if (child_process_.get() && child_process_->IsStarting()) 830 if (child_process_.get() && child_process_->IsStarting())
837 return; 831 return;
838 832
839 base::SharedMemoryHandle handle_for_process; 833 base::SharedMemoryHandle handle_for_process;
840 if (!shared_memory->ShareToProcess(GetHandle(), &handle_for_process)) { 834 if (!shared_memory->ShareToProcess(GetHandle(), &handle_for_process)) {
841 // This can legitimately fail if the renderer asserts at startup. 835 // This can legitimately fail if the renderer asserts at startup.
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 } 1149 }
1156 } 1150 }
1157 } 1151 }
1158 1152
1159 void BrowserRenderProcessHost::OnProcessLaunched() { 1153 void BrowserRenderProcessHost::OnProcessLaunched() {
1160 if (child_process_.get()) 1154 if (child_process_.get())
1161 child_process_->SetProcessBackgrounded(backgrounded_); 1155 child_process_->SetProcessBackgrounded(backgrounded_);
1162 1156
1163 Send(new ViewMsg_SetIsIncognitoProcess(profile()->IsOffTheRecord())); 1157 Send(new ViewMsg_SetIsIncognitoProcess(profile()->IsOffTheRecord()));
1164 1158
1165 InitSpeechInput();
1166 InitVisitedLinks(); 1159 InitVisitedLinks();
1167 InitUserScripts(); 1160 InitUserScripts();
1168 InitExtensions(); 1161 InitExtensions();
1169 1162
1170 // We don't want to initialize the spellchecker unless SpellCheckHost has been 1163 // We don't want to initialize the spellchecker unless SpellCheckHost has been
1171 // created. In InitSpellChecker(), we know if GetSpellCheckHost() is NULL 1164 // created. In InitSpellChecker(), we know if GetSpellCheckHost() is NULL
1172 // then the spellchecker has been turned off, but here, we don't know if 1165 // then the spellchecker has been turned off, but here, we don't know if
1173 // it's been turned off or just not loaded yet. 1166 // it's been turned off or just not loaded yet.
1174 if (profile()->GetSpellCheckHost()) 1167 if (profile()->GetSpellCheckHost())
1175 InitSpellChecker(); 1168 InitSpellChecker();
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 IPC::PlatformFileForTransit file; 1279 IPC::PlatformFileForTransit file;
1287 #if defined(OS_POSIX) 1280 #if defined(OS_POSIX)
1288 file = base::FileDescriptor(model_file, false); 1281 file = base::FileDescriptor(model_file, false);
1289 #elif defined(OS_WIN) 1282 #elif defined(OS_WIN)
1290 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0, 1283 ::DuplicateHandle(::GetCurrentProcess(), model_file, GetHandle(), &file, 0,
1291 false, DUPLICATE_SAME_ACCESS); 1284 false, DUPLICATE_SAME_ACCESS);
1292 #endif 1285 #endif
1293 Send(new ViewMsg_SetPhishingModel(file)); 1286 Send(new ViewMsg_SetPhishingModel(file));
1294 } 1287 }
1295 } 1288 }
OLDNEW
« no previous file with comments | « chrome/browser/renderer_host/browser_render_process_host.h ('k') | chrome/browser/speech/speech_input_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698