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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 501703002: Hook up loading signal to ResourceScheduler. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@zhen_visibility
Patch Set: Nit. Created 6 years, 3 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
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/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 for (std::vector<base::FilePath>::const_iterator file = files.begin(); 834 for (std::vector<base::FilePath>::const_iterator file = files.begin();
835 file != files.end(); ++file) { 835 file != files.end(); ++file) {
836 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile( 836 ChildProcessSecurityPolicyImpl::GetInstance()->GrantReadFile(
837 GetProcess()->GetID(), *file); 837 GetProcess()->GetID(), *file);
838 } 838 }
839 Send(new ViewMsg_EnumerateDirectoryResponse(GetRoutingID(), 839 Send(new ViewMsg_EnumerateDirectoryResponse(GetRoutingID(),
840 request_id, 840 request_id,
841 files)); 841 files));
842 } 842 }
843 843
844 void RenderViewHostImpl::SetIsLoading(bool is_loading) {
845 if (ResourceDispatcherHostImpl::Get()) {
846 BrowserThread::PostTask(
847 BrowserThread::IO,
848 FROM_HERE,
849 base::Bind(&ResourceDispatcherHostImpl::OnRenderViewHostSetIsLoading,
850 base::Unretained(ResourceDispatcherHostImpl::Get()),
851 GetProcess()->GetID(),
852 GetRoutingID(),
853 is_loading));
854 }
855 RenderWidgetHostImpl::SetIsLoading(is_loading);
856 }
857
844 void RenderViewHostImpl::LoadStateChanged( 858 void RenderViewHostImpl::LoadStateChanged(
845 const GURL& url, 859 const GURL& url,
846 const net::LoadStateWithParam& load_state, 860 const net::LoadStateWithParam& load_state,
847 uint64 upload_position, 861 uint64 upload_position,
848 uint64 upload_size) { 862 uint64 upload_size) {
849 delegate_->LoadStateChanged(url, load_state, upload_position, upload_size); 863 delegate_->LoadStateChanged(url, load_state, upload_position, upload_size);
850 } 864 }
851 865
852 bool RenderViewHostImpl::SuddenTerminationAllowed() const { 866 bool RenderViewHostImpl::SuddenTerminationAllowed() const {
853 return sudden_termination_allowed_ || 867 return sudden_termination_allowed_ ||
(...skipping 646 matching lines...) Expand 10 before | Expand all | Expand 10 after
1500 FrameTree* frame_tree = delegate_->GetFrameTree(); 1514 FrameTree* frame_tree = delegate_->GetFrameTree();
1501 1515
1502 frame_tree->ResetForMainFrameSwap(); 1516 frame_tree->ResetForMainFrameSwap();
1503 } 1517 }
1504 1518
1505 void RenderViewHostImpl::SelectWordAroundCaret() { 1519 void RenderViewHostImpl::SelectWordAroundCaret() {
1506 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); 1520 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID()));
1507 } 1521 }
1508 1522
1509 } // namespace content 1523 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_view_host_impl.h ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698