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

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

Issue 20333: Call the DidStartLoading/DidStopLoading methods on the WebViewDelegate interf... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 11 years, 10 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-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 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 MSVC_PUSH_WARNING_LEVEL(0); 10 MSVC_PUSH_WARNING_LEVEL(0);
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after
1055 } 1055 }
1056 1056
1057 void WebPluginImpl::didFinishLoading(WebCore::ResourceHandle* handle) { 1057 void WebPluginImpl::didFinishLoading(WebCore::ResourceHandle* handle) {
1058 WebPluginResourceClient* client = GetClientFromHandle(handle); 1058 WebPluginResourceClient* client = GetClientFromHandle(handle);
1059 if (client) { 1059 if (client) {
1060 MultiPartResponseHandlerMap::iterator index = 1060 MultiPartResponseHandlerMap::iterator index =
1061 multi_part_response_map_.find(client); 1061 multi_part_response_map_.find(client);
1062 if (index != multi_part_response_map_.end()) { 1062 if (index != multi_part_response_map_.end()) {
1063 delete (*index).second; 1063 delete (*index).second;
1064 multi_part_response_map_.erase(index); 1064 multi_part_response_map_.erase(index);
1065
1066 WebView* web_view = webframe_->GetView();
1067 web_view->GetDelegate()->DidStopLoading(web_view);
1065 } 1068 }
1066 client->DidFinishLoading(); 1069 client->DidFinishLoading();
1067 } 1070 }
1068 1071
1069 RemoveClient(handle); 1072 RemoveClient(handle);
1070 } 1073 }
1071 1074
1072 void WebPluginImpl::didFail(WebCore::ResourceHandle* handle, 1075 void WebPluginImpl::didFail(WebCore::ResourceHandle* handle,
1073 const WebCore::ResourceError&) { 1076 const WebCore::ResourceError&) {
1074 WebPluginResourceClient* client = GetClientFromHandle(handle); 1077 WebPluginResourceClient* client = GetClientFromHandle(handle);
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
1286 void WebPluginImpl::HandleHttpMultipartResponse( 1289 void WebPluginImpl::HandleHttpMultipartResponse(
1287 const WebCore::ResourceResponse& response, 1290 const WebCore::ResourceResponse& response,
1288 WebPluginResourceClient* client) { 1291 WebPluginResourceClient* client) {
1289 std::string multipart_boundary; 1292 std::string multipart_boundary;
1290 if (!MultipartResponseDelegate::ReadMultipartBoundary( 1293 if (!MultipartResponseDelegate::ReadMultipartBoundary(
1291 response, &multipart_boundary)) { 1294 response, &multipart_boundary)) {
1292 NOTREACHED(); 1295 NOTREACHED();
1293 return; 1296 return;
1294 } 1297 }
1295 1298
1299 WebView* web_view = webframe_->GetView();
1300 web_view->GetDelegate()->DidStartLoading(web_view);
1301
1296 MultiPartResponseClient* multi_part_response_client = 1302 MultiPartResponseClient* multi_part_response_client =
1297 new MultiPartResponseClient(client); 1303 new MultiPartResponseClient(client);
1298 1304
1299 MultipartResponseDelegate* multi_part_response_handler = 1305 MultipartResponseDelegate* multi_part_response_handler =
1300 new MultipartResponseDelegate(multi_part_response_client, NULL, 1306 new MultipartResponseDelegate(multi_part_response_client, NULL,
1301 response, 1307 response,
1302 multipart_boundary); 1308 multipart_boundary);
1303 multi_part_response_map_[client] = multi_part_response_handler; 1309 multi_part_response_map_[client] = multi_part_response_handler;
1304 } 1310 }
1305 1311
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after
1404 client_index = clients_.erase(client_index); 1410 client_index = clients_.erase(client_index);
1405 if (resource_client) 1411 if (resource_client)
1406 resource_client->DidFail(); 1412 resource_client->DidFail();
1407 } 1413 }
1408 1414
1409 // This needs to be called now and not in the destructor since the 1415 // This needs to be called now and not in the destructor since the
1410 // webframe_ might not be valid anymore. 1416 // webframe_ might not be valid anymore.
1411 webframe_->set_plugin_delegate(NULL); 1417 webframe_->set_plugin_delegate(NULL);
1412 webframe_ = NULL; 1418 webframe_ = NULL;
1413 } 1419 }
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