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

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 636863003: Make SpeechRecognition per RenderFrame instead of per RenderView. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fixes threading issues Created 6 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/browser/web_contents/web_contents_impl.h" 5 #include "content/browser/web_contents/web_contents_impl.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 #include "content/browser/message_port_service.h" 45 #include "content/browser/message_port_service.h"
46 #include "content/browser/plugin_content_origin_whitelist.h" 46 #include "content/browser/plugin_content_origin_whitelist.h"
47 #include "content/browser/power_save_blocker_impl.h" 47 #include "content/browser/power_save_blocker_impl.h"
48 #include "content/browser/renderer_host/render_process_host_impl.h" 48 #include "content/browser/renderer_host/render_process_host_impl.h"
49 #include "content/browser/renderer_host/render_view_host_delegate_view.h" 49 #include "content/browser/renderer_host/render_view_host_delegate_view.h"
50 #include "content/browser/renderer_host/render_view_host_impl.h" 50 #include "content/browser/renderer_host/render_view_host_impl.h"
51 #include "content/browser/renderer_host/render_widget_host_impl.h" 51 #include "content/browser/renderer_host/render_widget_host_impl.h"
52 #include "content/browser/renderer_host/render_widget_host_view_base.h" 52 #include "content/browser/renderer_host/render_widget_host_view_base.h"
53 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h" 53 #include "content/browser/screen_orientation/screen_orientation_dispatcher_host_ impl.h"
54 #include "content/browser/site_instance_impl.h" 54 #include "content/browser/site_instance_impl.h"
55 #include "content/browser/speech/speech_recognition_dispatcher_host.h"
55 #include "content/browser/web_contents/web_contents_view_guest.h" 56 #include "content/browser/web_contents/web_contents_view_guest.h"
56 #include "content/browser/webui/generic_handler.h" 57 #include "content/browser/webui/generic_handler.h"
57 #include "content/browser/webui/web_ui_controller_factory_registry.h" 58 #include "content/browser/webui/web_ui_controller_factory_registry.h"
58 #include "content/browser/webui/web_ui_impl.h" 59 #include "content/browser/webui/web_ui_impl.h"
59 #include "content/common/browser_plugin/browser_plugin_constants.h" 60 #include "content/common/browser_plugin/browser_plugin_constants.h"
60 #include "content/common/browser_plugin/browser_plugin_messages.h" 61 #include "content/common/browser_plugin/browser_plugin_messages.h"
61 #include "content/common/frame_messages.h" 62 #include "content/common/frame_messages.h"
62 #include "content/common/image_messages.h" 63 #include "content/common/image_messages.h"
63 #include "content/common/input_messages.h" 64 #include "content/common/input_messages.h"
64 #include "content/common/ssl_status_serialization.h" 65 #include "content/common/ssl_status_serialization.h"
(...skipping 1121 matching lines...) Expand 10 before | Expand all | Expand 10 after
1186 1187
1187 registrar_.Add(this, 1188 registrar_.Add(this,
1188 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED, 1189 NOTIFICATION_RENDER_WIDGET_HOST_DESTROYED,
1189 NotificationService::AllBrowserContextsAndSources()); 1190 NotificationService::AllBrowserContextsAndSources());
1190 1191
1191 screen_orientation_dispatcher_host_.reset( 1192 screen_orientation_dispatcher_host_.reset(
1192 new ScreenOrientationDispatcherHostImpl(this)); 1193 new ScreenOrientationDispatcherHostImpl(this));
1193 1194
1194 manifest_manager_host_.reset(new ManifestManagerHost(this)); 1195 manifest_manager_host_.reset(new ManifestManagerHost(this));
1195 1196
1197 speech_recognition_dispatcher_host_.reset(
1198 new SpeechRecognitionDispatcherHost(this));
1199
1196 #if defined(OS_ANDROID) 1200 #if defined(OS_ANDROID)
1197 date_time_chooser_.reset(new DateTimeChooserAndroid()); 1201 date_time_chooser_.reset(new DateTimeChooserAndroid());
1198 #endif 1202 #endif
1199 } 1203 }
1200 1204
1201 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) { 1205 void WebContentsImpl::OnWebContentsDestroyed(WebContentsImpl* web_contents) {
1202 RemoveDestructionObserver(web_contents); 1206 RemoveDestructionObserver(web_contents);
1203 1207
1204 // Clear the opener if it has been closed. 1208 // Clear the opener if it has been closed.
1205 if (web_contents == opener_) { 1209 if (web_contents == opener_) {
(...skipping 3152 matching lines...) Expand 10 before | Expand all | Expand 10 after
4358 node->render_manager()->ResumeResponseDeferredAtStart(); 4362 node->render_manager()->ResumeResponseDeferredAtStart();
4359 } 4363 }
4360 4364
4361 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) { 4365 void WebContentsImpl::SetForceDisableOverscrollContent(bool force_disable) {
4362 force_disable_overscroll_content_ = force_disable; 4366 force_disable_overscroll_content_ = force_disable;
4363 if (view_) 4367 if (view_)
4364 view_->SetOverscrollControllerEnabled(CanOverscrollContent()); 4368 view_->SetOverscrollControllerEnabled(CanOverscrollContent());
4365 } 4369 }
4366 4370
4367 } // namespace content 4371 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698