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

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

Issue 415433002: Turn webspeech on/off when tab goes fore/background (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix the issue for webrtc 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 3546 matching lines...) Expand 10 before | Expand all | Expand 10 after
3557 return false; 3557 return false;
3558 return webview()->hasTouchEventHandlersAt(point); 3558 return webview()->hasTouchEventHandlersAt(point);
3559 } 3559 }
3560 3560
3561 void RenderViewImpl::OnWasHidden() { 3561 void RenderViewImpl::OnWasHidden() {
3562 RenderWidget::OnWasHidden(); 3562 RenderWidget::OnWasHidden();
3563 3563
3564 #if defined(OS_ANDROID) && defined(ENABLE_WEBRTC) 3564 #if defined(OS_ANDROID) && defined(ENABLE_WEBRTC)
3565 RenderThreadImpl::current()->video_capture_impl_manager()-> 3565 RenderThreadImpl::current()->video_capture_impl_manager()->
3566 SuspendDevices(true); 3566 SuspendDevices(true);
3567 speech_recognition_dispatcher_->AbortAllRecognitions();
3567 #endif 3568 #endif
3568 3569
3569 if (webview()) 3570 if (webview())
3570 webview()->setVisibilityState(visibilityState(), false); 3571 webview()->setVisibilityState(visibilityState(), false);
3571 3572
3572 #if defined(ENABLE_PLUGINS) 3573 #if defined(ENABLE_PLUGINS)
3573 for (PepperPluginSet::iterator i = active_pepper_instances_.begin(); 3574 for (PepperPluginSet::iterator i = active_pepper_instances_.begin();
3574 i != active_pepper_instances_.end(); ++i) 3575 i != active_pepper_instances_.end(); ++i)
3575 (*i)->PageVisibilityChanged(false); 3576 (*i)->PageVisibilityChanged(false);
3576 3577
(...skipping 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
4300 std::vector<gfx::Size> sizes; 4301 std::vector<gfx::Size> sizes;
4301 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes); 4302 ConvertToFaviconSizes(icon_urls[i].sizes(), &sizes);
4302 if (!url.isEmpty()) 4303 if (!url.isEmpty())
4303 urls.push_back( 4304 urls.push_back(
4304 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes)); 4305 FaviconURL(url, ToFaviconType(icon_urls[i].iconType()), sizes));
4305 } 4306 }
4306 SendUpdateFaviconURL(urls); 4307 SendUpdateFaviconURL(urls);
4307 } 4308 }
4308 4309
4309 } // namespace content 4310 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698