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

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

Issue 10824068: Cleanup: Remove RenderThreadImpl::RoutingIDForCurrentContext (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 4 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
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 861 matching lines...) Expand 10 before | Expand all | Expand 10 after
872 872
873 // Allow calling this from the compositor thread. 873 // Allow calling this from the compositor thread.
874 if (MessageLoop::current() == message_loop()) 874 if (MessageLoop::current() == message_loop())
875 ChildThread::Send(message); 875 ChildThread::Send(message);
876 else 876 else
877 sync_message_filter()->Send(message); 877 sync_message_filter()->Send(message);
878 878
879 return route_id; 879 return route_id;
880 } 880 }
881 881
882 int32 RenderThreadImpl::RoutingIDForCurrentContext() {
883 int32 routing_id = MSG_ROUTING_CONTROL;
884 if (v8::Context::InContext()) {
885 WebFrame* frame = WebFrame::frameForCurrentContext();
886 if (frame) {
887 RenderViewImpl* view = RenderViewImpl::FromWebView(frame->view());
888 if (view)
889 routing_id = view->routing_id();
890 }
891 } else {
892 DLOG(WARNING) << "Not called within a script context!";
893 }
894 return routing_id;
895 }
896
897 void RenderThreadImpl::DoNotSuspendWebKitSharedTimer() { 882 void RenderThreadImpl::DoNotSuspendWebKitSharedTimer() {
898 suspend_webkit_shared_timer_ = false; 883 suspend_webkit_shared_timer_ = false;
899 } 884 }
900 885
901 void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() { 886 void RenderThreadImpl::DoNotNotifyWebKitOfModalLoop() {
902 notify_webkit_of_modal_loop_ = false; 887 notify_webkit_of_modal_loop_ = false;
903 } 888 }
904 889
905 void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const std::string& host, 890 void RenderThreadImpl::OnSetZoomLevelForCurrentURL(const std::string& host,
906 double zoom_level) { 891 double zoom_level) {
(...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after
1070 1055
1071 scoped_refptr<base::MessageLoopProxy> 1056 scoped_refptr<base::MessageLoopProxy>
1072 RenderThreadImpl::GetFileThreadMessageLoopProxy() { 1057 RenderThreadImpl::GetFileThreadMessageLoopProxy() {
1073 DCHECK(message_loop() == MessageLoop::current()); 1058 DCHECK(message_loop() == MessageLoop::current());
1074 if (!file_thread_.get()) { 1059 if (!file_thread_.get()) {
1075 file_thread_.reset(new base::Thread("Renderer::FILE")); 1060 file_thread_.reset(new base::Thread("Renderer::FILE"));
1076 file_thread_->Start(); 1061 file_thread_->Start();
1077 } 1062 }
1078 return file_thread_->message_loop_proxy(); 1063 return file_thread_->message_loop_proxy();
1079 } 1064 }
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698