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

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

Issue 10690023: Upstream support for WebKit shared timer toggling. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Remove blank line Created 8 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_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after
842 RenderViewImpl* view = RenderViewImpl::FromWebView(frame->view()); 842 RenderViewImpl* view = RenderViewImpl::FromWebView(frame->view());
843 if (view) 843 if (view)
844 routing_id = view->routing_id(); 844 routing_id = view->routing_id();
845 } 845 }
846 } else { 846 } else {
847 DLOG(WARNING) << "Not called within a script context!"; 847 DLOG(WARNING) << "Not called within a script context!";
848 } 848 }
849 return routing_id; 849 return routing_id;
850 } 850 }
851 851
852 void RenderThreadImpl::ToggleWebKitSharedTimer(bool suspend) {
853 if (suspend_webkit_shared_timer_) {
854 EnsureWebKitInitialized();
855 if (suspend) {
856 webkit_platform_support_->SuspendSharedTimer();
857 } else {
858 webkit_platform_support_->ResumeSharedTimer();
859 }
860 }
861 }
862
852 void RenderThreadImpl::DoNotSuspendWebKitSharedTimer() { 863 void RenderThreadImpl::DoNotSuspendWebKitSharedTimer() {
853 suspend_webkit_shared_timer_ = false; 864 suspend_webkit_shared_timer_ = false;
854 } 865 }
855 866
856 void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() { 867 void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() {
857 notify_webkit_of_modal_loop_ = false; 868 notify_webkit_of_modal_loop_ = false;
858 } 869 }
859 870
860 void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const std::string& host, 871 void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const std::string& host,
861 double zoom_level) { 872 double zoom_level) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 1036
1026 scoped_refptr<base::MessageLoopProxy> 1037 scoped_refptr<base::MessageLoopProxy>
1027 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1038 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1028 DCHECK(message_loop() == MessageLoop::current()); 1039 DCHECK(message_loop() == MessageLoop::current());
1029 if (!file_thread_.get()) { 1040 if (!file_thread_.get()) {
1030 file_thread_.reset(new base::Thread("Renderer::FILE")); 1041 file_thread_.reset(new base::Thread("Renderer::FILE"));
1031 file_thread_->Start(); 1042 file_thread_->Start();
1032 } 1043 }
1033 return file_thread_->message_loop_proxy(); 1044 return file_thread_->message_loop_proxy();
1034 } 1045 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698