| Index: content/browser/loader_delegate_impl.cc
|
| diff --git a/content/browser/loader_delegate_impl.cc b/content/browser/loader_delegate_impl.cc
|
| new file mode 100644
|
| index 0000000000000000000000000000000000000000..e2366b00e1447808f24dad0dbdd955274f4329c0
|
| --- /dev/null
|
| +++ b/content/browser/loader_delegate_impl.cc
|
| @@ -0,0 +1,40 @@
|
| +// Copyright 2016 The Chromium Authors. All rights reserved.
|
| +// Use of this source code is governed by a BSD-style license that can be
|
| +// found in the LICENSE file.
|
| +
|
| +#include "content/browser/loader_delegate_impl.h"
|
| +
|
| +#include "content/browser/renderer_host/render_view_host_impl.h"
|
| +#include "content/public/browser/browser_thread.h"
|
| +
|
| +namespace content {
|
| +
|
| +LoaderDelegateImpl::~LoaderDelegateImpl() {}
|
| +
|
| +void LoaderDelegateImpl::LoadStateChanged(
|
| + const GlobalRoutingID& routing_id,
|
| + const GURL& url,
|
| + const net::LoadStateWithParam& load_state,
|
| + uint64_t upload_position,
|
| + uint64_t upload_size) {
|
| + BrowserThread::PostTask(
|
| + BrowserThread::UI, FROM_HERE,
|
| + base::Bind(&LoaderDelegateImpl::NotifyLoadStateChangedOnUI,
|
| + base::Unretained(this), routing_id, url, load_state,
|
| + upload_position, upload_size));
|
| +}
|
| +
|
| +void LoaderDelegateImpl::NotifyLoadStateChangedOnUI(
|
| + const GlobalRoutingID& routing_id,
|
| + const GURL& url,
|
| + const net::LoadStateWithParam& load_state,
|
| + uint64_t upload_position,
|
| + uint64_t upload_size) {
|
| + RenderViewHostImpl* view =
|
| + RenderViewHostImpl::FromID(routing_id.child_id, routing_id.route_id);
|
| + if (view)
|
| + view->LoadStateChanged(url, load_state, upload_position, upload_size);
|
| +}
|
| +
|
| +} // namespace content
|
| +
|
|
|