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

Side by Side Diff: chrome/plugin/webplugin_proxy.cc

Issue 435044: Send resource load notifications from plugins to devtools agent (Closed)
Patch Set: Sync with trunk Created 11 years 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
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | chrome/renderer/webplugin_delegate_pepper.h » ('j') | 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) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "chrome/plugin/webplugin_proxy.h" 5 #include "chrome/plugin/webplugin_proxy.h"
6 6
7 #include "build/build_config.h" 7 #include "build/build_config.h"
8 8
9 #include "app/gfx/canvas.h" 9 #include "app/gfx/canvas.h"
10 #if defined(OS_WIN) 10 #if defined(OS_WIN)
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 DuplicateHandle(GetCurrentProcess(), pump_messages_event, 89 DuplicateHandle(GetCurrentProcess(), pump_messages_event,
90 channel_->renderer_handle(), 90 channel_->renderer_handle(),
91 &pump_messages_event_for_renderer, 91 &pump_messages_event_for_renderer,
92 0, FALSE, DUPLICATE_SAME_ACCESS); 92 0, FALSE, DUPLICATE_SAME_ACCESS);
93 DCHECK(pump_messages_event_for_renderer != NULL); 93 DCHECK(pump_messages_event_for_renderer != NULL);
94 Send(new PluginHostMsg_SetWindowlessPumpEvent( 94 Send(new PluginHostMsg_SetWindowlessPumpEvent(
95 route_id_, pump_messages_event_for_renderer)); 95 route_id_, pump_messages_event_for_renderer));
96 } 96 }
97 #endif 97 #endif
98 98
99 void WebPluginProxy::CancelResource(int id) { 99 void WebPluginProxy::CancelResource(unsigned long id) {
100 Send(new PluginHostMsg_CancelResource(route_id_, id)); 100 Send(new PluginHostMsg_CancelResource(route_id_, id));
101 resource_clients_.erase(id); 101 resource_clients_.erase(id);
102 } 102 }
103 103
104 void WebPluginProxy::Invalidate() { 104 void WebPluginProxy::Invalidate() {
105 gfx::Rect rect(0, 0, 105 gfx::Rect rect(0, 0,
106 delegate_->GetRect().width(), 106 delegate_->GetRect().width(),
107 delegate_->GetRect().height()); 107 delegate_->GetRect().height());
108 InvalidateRect(rect); 108 InvalidateRect(rect);
109 } 109 }
(...skipping 465 matching lines...) Expand 10 before | Expand all | Expand 10 after
575 const char* range_info, 575 const char* range_info,
576 intptr_t existing_stream, 576 intptr_t existing_stream,
577 bool notify_needed, 577 bool notify_needed,
578 intptr_t notify_data) { 578 intptr_t notify_data) {
579 579
580 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url, 580 Send(new PluginHostMsg_InitiateHTTPRangeRequest(route_id_, url,
581 range_info, existing_stream, 581 range_info, existing_stream,
582 notify_needed, notify_data)); 582 notify_needed, notify_data));
583 } 583 }
584 584
585 void WebPluginProxy::SetDeferResourceLoading(int resource_id, bool defer) { 585 void WebPluginProxy::SetDeferResourceLoading(unsigned long resource_id,
586 bool defer) {
586 Send(new PluginHostMsg_DeferResourceLoading(route_id_, resource_id, defer)); 587 Send(new PluginHostMsg_DeferResourceLoading(route_id_, resource_id, defer));
587 } 588 }
588 589
589 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) { 590 void WebPluginProxy::OnPaint(const gfx::Rect& damaged_rect) {
590 child_process_logging::SetActiveURL(page_url_); 591 child_process_logging::SetActiveURL(page_url_);
591 592
592 Paint(damaged_rect); 593 Paint(damaged_rect);
593 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect)); 594 Send(new PluginHostMsg_InvalidateRect(route_id_, damaged_rect));
594 } 595 }
595 596
596 bool WebPluginProxy::IsOffTheRecord() { 597 bool WebPluginProxy::IsOffTheRecord() {
597 return channel_->off_the_record(); 598 return channel_->off_the_record();
598 } 599 }
599 600
600 void WebPluginProxy::ResourceClientDeleted( 601 void WebPluginProxy::ResourceClientDeleted(
601 WebPluginResourceClient* resource_client) { 602 WebPluginResourceClient* resource_client) {
602 ResourceClientMap::iterator index = resource_clients_.begin(); 603 ResourceClientMap::iterator index = resource_clients_.begin();
603 while (index != resource_clients_.end()) { 604 while (index != resource_clients_.end()) {
604 WebPluginResourceClient* client = (*index).second; 605 WebPluginResourceClient* client = (*index).second;
605 606
606 if (client == resource_client) { 607 if (client == resource_client) {
607 resource_clients_.erase(index++); 608 resource_clients_.erase(index++);
608 } else { 609 } else {
609 index++; 610 index++;
610 } 611 }
611 } 612 }
612 } 613 }
OLDNEW
« no previous file with comments | « chrome/plugin/webplugin_proxy.h ('k') | chrome/renderer/webplugin_delegate_pepper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698