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

Side by Side Diff: webkit/glue/webframeloaderclient_impl.cc

Issue 115575: Move ExtraData from WebRequest to WebDataSource.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 7 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) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "config.h" 5 #include "config.h"
6 #include <string> 6 #include <string>
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 10
(...skipping 669 matching lines...) Expand 10 before | Expand all | Expand 10 after
680 ds->AppendRedirect(chain_end); 680 ds->AppendRedirect(chain_end);
681 // Make sure we clear the expected redirect since we just effectively 681 // Make sure we clear the expected redirect since we just effectively
682 // completed it. 682 // completed it.
683 expected_client_redirect_src_ = GURL(); 683 expected_client_redirect_src_ = GURL();
684 expected_client_redirect_dest_ = GURL(); 684 expected_client_redirect_dest_ = GURL();
685 } 685 }
686 686
687 // Regardless of how we got here, we are navigating to a URL so we need to 687 // Regardless of how we got here, we are navigating to a URL so we need to
688 // add it to the redirect chain. 688 // add it to the redirect chain.
689 ds->AppendRedirect(url); 689 ds->AppendRedirect(url);
690
691 // WebKit will re-use requests for in-page navigations, but we want to
692 // think of it as a new request that has a page ID in session history.
693 // This will set the proper page ID, etc. on the request so that the
694 // browser will treat it properly.
695 webframe_->CacheCurrentRequestInfo(ds);
696 } 690 }
697 691
698 bool is_new_navigation; 692 bool is_new_navigation;
699 webview->DidCommitLoad(&is_new_navigation); 693 webview->DidCommitLoad(&is_new_navigation);
700 if (d) { 694 if (d) {
701 d->DidChangeLocationWithinPageForFrame(webview, webframe_, 695 d->DidChangeLocationWithinPageForFrame(webview, webframe_,
702 is_new_navigation); 696 is_new_navigation);
703 } 697 }
704 698
705 if (d) 699 if (d)
(...skipping 634 matching lines...) Expand 10 before | Expand all | Expand 10 after
1340 plg_delegate->DidFinishLoadWithReason(NPRES_DONE); 1334 plg_delegate->DidFinishLoadWithReason(NPRES_DONE);
1341 } 1335 }
1342 void WebFrameLoaderClient::prepareForDataSourceReplacement() { 1336 void WebFrameLoaderClient::prepareForDataSourceReplacement() {
1343 // FIXME 1337 // FIXME
1344 } 1338 }
1345 1339
1346 PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader( 1340 PassRefPtr<DocumentLoader> WebFrameLoaderClient::createDocumentLoader(
1347 const ResourceRequest& request, 1341 const ResourceRequest& request,
1348 const SubstituteData& data) { 1342 const SubstituteData& data) {
1349 RefPtr<WebDataSourceImpl> ds = WebDataSourceImpl::Create(request, data); 1343 RefPtr<WebDataSourceImpl> ds = WebDataSourceImpl::Create(request, data);
1350 webframe_->CacheCurrentRequestInfo(ds.get()); 1344 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate();
1345 if (d)
1346 d->DidCreateDataSource(webframe_, ds.get());
1351 return ds.release(); 1347 return ds.release();
1352 } 1348 }
1353 1349
1354 void WebFrameLoaderClient::setTitle(const String& title, const KURL& url) { 1350 void WebFrameLoaderClient::setTitle(const String& title, const KURL& url) {
1355 // FIXME: monitor for changes in WebFrameLoaderClient.mm 1351 // FIXME: monitor for changes in WebFrameLoaderClient.mm
1356 // FIXME: Set the title of the current history item. HistoryItemImpl's setter 1352 // FIXME: Set the title of the current history item. HistoryItemImpl's setter
1357 // will notify its clients (e.g. the history database) that the title 1353 // will notify its clients (e.g. the history database) that the title
1358 // has changed. 1354 // has changed.
1359 // 1355 //
1360 // e.g.: 1356 // e.g.:
(...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 if (!web_view) { 1661 if (!web_view) {
1666 return NULL; 1662 return NULL;
1667 } 1663 }
1668 WebDevToolsAgentImpl* tools_agent = web_view->GetWebDevToolsAgentImpl(); 1664 WebDevToolsAgentImpl* tools_agent = web_view->GetWebDevToolsAgentImpl();
1669 if (tools_agent) { 1665 if (tools_agent) {
1670 return tools_agent->net_agent_impl(); 1666 return tools_agent->net_agent_impl();
1671 } else { 1667 } else {
1672 return NULL; 1668 return NULL;
1673 } 1669 }
1674 } 1670 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698