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

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

Issue 415933002: Turn webspeech on/off when tab goes fore/background (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge the previous change Created 6 years, 5 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) 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/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 9
10 #include "base/auto_reset.h" 10 #include "base/auto_reset.h"
(...skipping 3240 matching lines...) Expand 10 before | Expand all | Expand 10 after
3251 return false; 3251 return false;
3252 return webview()->hasTouchEventHandlersAt(point); 3252 return webview()->hasTouchEventHandlersAt(point);
3253 } 3253 }
3254 3254
3255 void RenderViewImpl::OnWasHidden() { 3255 void RenderViewImpl::OnWasHidden() {
3256 RenderWidget::OnWasHidden(); 3256 RenderWidget::OnWasHidden();
3257 3257
3258 #if defined(OS_ANDROID) && defined(ENABLE_WEBRTC) 3258 #if defined(OS_ANDROID) && defined(ENABLE_WEBRTC)
3259 RenderThreadImpl::current()->video_capture_impl_manager()-> 3259 RenderThreadImpl::current()->video_capture_impl_manager()->
3260 SuspendDevices(true); 3260 SuspendDevices(true);
3261 if (speech_recognition_dispatcher_)
3262 speech_recognition_dispatcher_->AbortAllRecognitions();
3261 #endif 3263 #endif
3262 3264
3263 if (webview()) 3265 if (webview())
3264 webview()->setVisibilityState(visibilityState(), false); 3266 webview()->setVisibilityState(visibilityState(), false);
3265 3267
3266 #if defined(ENABLE_PLUGINS) 3268 #if defined(ENABLE_PLUGINS)
3267 for (PepperPluginSet::iterator i = active_pepper_instances_.begin(); 3269 for (PepperPluginSet::iterator i = active_pepper_instances_.begin();
3268 i != active_pepper_instances_.end(); ++i) 3270 i != active_pepper_instances_.end(); ++i)
3269 (*i)->PageVisibilityChanged(false); 3271 (*i)->PageVisibilityChanged(false);
3270 3272
(...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after
3982 std::vector<gfx::Size> sizes; 3984 std::vector<gfx::Size> sizes;
3983 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 3985 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
3984 if (!url.isEmpty()) 3986 if (!url.isEmpty())
3985 urls.push_back( 3987 urls.push_back(
3986 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 3988 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
3987 } 3989 }
3988 SendUpdateFaviconURL(urls); 3990 SendUpdateFaviconURL(urls);
3989 } 3991 }
3990 3992
3991 } // namespace content 3993 } // namespace content
OLDNEW
« no previous file with comments | « content/common/speech_recognition_messages.h ('k') | content/renderer/speech_recognition_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698