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

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

Issue 165286: Stop resource loading for WebCore::MediaDocument... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 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 | « no previous file | 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) 2006-2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2009 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 6
7 #include <string> 7 #include <string>
8 #include <vector> 8 #include <vector>
9 9
10 #include "Chrome.h" 10 #include "Chrome.h"
(...skipping 964 matching lines...) Expand 10 before | Expand all | Expand 10 after
975 } 975 }
976 976
977 // Called whenever data is received. 977 // Called whenever data is received.
978 void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, const char* dat a, int length) { 978 void WebFrameLoaderClient::committedLoad(DocumentLoader* loader, const char* dat a, int length) {
979 if (!plugin_widget_.get()) { 979 if (!plugin_widget_.get()) {
980 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); 980 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate();
981 if (d) 981 if (d)
982 d->DidReceiveDocumentData(webframe_, data, length); 982 d->DidReceiveDocumentData(webframe_, data, length);
983 } 983 }
984 984
985 // If we are sending data to WebCore::MediaDocument, we should stop here
darin (slow to review) 2009/08/14 00:15:37 One more tweak I would make: move this code to th
Alpha Left Google 2009/08/14 00:32:13 Yes, it is the first bit of data that triggers the
darin (slow to review) 2009/08/14 07:30:44 OK, that makes sense. Thanks!
986 // and cancel the request.
987 if (webframe_->frame()->document() &&
988 webframe_->frame()->document()->isMediaDocument()) {
989 loader->cancelMainResourceLoad(
990 pluginWillHandleLoadError(loader->response()));
991 }
992
985 // The plugin widget could have been created in the webframe_->DidReceiveData 993 // The plugin widget could have been created in the webframe_->DidReceiveData
986 // function. 994 // function.
987 if (plugin_widget_.get()) { 995 if (plugin_widget_.get()) {
988 if (!sent_initial_response_to_plugin_) { 996 if (!sent_initial_response_to_plugin_) {
989 sent_initial_response_to_plugin_ = true; 997 sent_initial_response_to_plugin_ = true;
990 plugin_widget_->didReceiveResponse( 998 plugin_widget_->didReceiveResponse(
991 webframe_->frame()->loader()->activeDocumentLoader()->response()); 999 webframe_->frame()->loader()->activeDocumentLoader()->response());
992 } 1000 }
993 plugin_widget_->didReceiveData(data, length); 1001 plugin_widget_->didReceiveData(data, length);
994 } 1002 }
(...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after
1428 1436
1429 std::string offset_str = url.ExtractFileName(); 1437 std::string offset_str = url.ExtractFileName();
1430 int offset; 1438 int offset;
1431 if (!StringToInt(offset_str, &offset)) 1439 if (!StringToInt(offset_str, &offset))
1432 return; 1440 return;
1433 1441
1434 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate(); 1442 WebViewDelegate* d = webframe_->GetWebViewImpl()->delegate();
1435 if (d) 1443 if (d)
1436 d->NavigateBackForwardSoon(offset); 1444 d->NavigateBackForwardSoon(offset);
1437 } 1445 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698