| OLD | NEW |
| 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/renderer/npapi/webplugin_impl.h" | 5 #include "content/renderer/npapi/webplugin_impl.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/debug/crash_logging.h" | 9 #include "base/debug/crash_logging.h" |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 1340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1351 WebPluginResourceClient* resource_client = | 1351 WebPluginResourceClient* resource_client = |
| 1352 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); | 1352 delegate_->CreateSeekableResourceClient(resource_id, range_request_id); |
| 1353 InitiateHTTPRequest( | 1353 InitiateHTTPRequest( |
| 1354 resource_id, resource_client, complete_url, "GET", NULL, 0, range_info, | 1354 resource_id, resource_client, complete_url, "GET", NULL, 0, range_info, |
| 1355 load_manually_ ? NO_REFERRER : PLUGIN_SRC, false, false); | 1355 load_manually_ ? NO_REFERRER : PLUGIN_SRC, false, false); |
| 1356 } | 1356 } |
| 1357 | 1357 |
| 1358 void WebPluginImpl::DidStartLoading() { | 1358 void WebPluginImpl::DidStartLoading() { |
| 1359 if (render_view_.get()) { | 1359 if (render_view_.get()) { |
| 1360 // TODO(darin): Make is_loading_ be a counter! | 1360 // TODO(darin): Make is_loading_ be a counter! |
| 1361 render_view_->didStartLoading(); | 1361 render_view_->DidStartLoading(); |
| 1362 } | 1362 } |
| 1363 } | 1363 } |
| 1364 | 1364 |
| 1365 void WebPluginImpl::DidStopLoading() { | 1365 void WebPluginImpl::DidStopLoading() { |
| 1366 if (render_view_.get()) { | 1366 if (render_view_.get()) { |
| 1367 // TODO(darin): Make is_loading_ be a counter! | 1367 // TODO(darin): Make is_loading_ be a counter! |
| 1368 render_view_->didStopLoading(); | 1368 render_view_->DidStopLoading(); |
| 1369 } | 1369 } |
| 1370 } | 1370 } |
| 1371 | 1371 |
| 1372 void WebPluginImpl::SetDeferResourceLoading(unsigned long resource_id, | 1372 void WebPluginImpl::SetDeferResourceLoading(unsigned long resource_id, |
| 1373 bool defer) { | 1373 bool defer) { |
| 1374 std::vector<ClientInfo>::iterator client_index = clients_.begin(); | 1374 std::vector<ClientInfo>::iterator client_index = clients_.begin(); |
| 1375 while (client_index != clients_.end()) { | 1375 while (client_index != clients_.end()) { |
| 1376 ClientInfo& client_info = *client_index; | 1376 ClientInfo& client_info = *client_index; |
| 1377 | 1377 |
| 1378 if (client_info.id == resource_id) { | 1378 if (client_info.id == resource_id) { |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1535 case PLUGIN_SRC: | 1535 case PLUGIN_SRC: |
| 1536 webframe_->setReferrerForRequest(*request, plugin_url_); | 1536 webframe_->setReferrerForRequest(*request, plugin_url_); |
| 1537 break; | 1537 break; |
| 1538 | 1538 |
| 1539 default: | 1539 default: |
| 1540 break; | 1540 break; |
| 1541 } | 1541 } |
| 1542 } | 1542 } |
| 1543 | 1543 |
| 1544 } // namespace content | 1544 } // namespace content |
| OLD | NEW |