OLD | NEW |
---|---|
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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/pepper_plugin_delegate_impl.h" | 5 #include "content/renderer/pepper_plugin_delegate_impl.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <queue> | 8 #include <queue> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1415 | 1415 |
1416 void PepperPluginDelegateImpl::DidStopLoading() { | 1416 void PepperPluginDelegateImpl::DidStopLoading() { |
1417 render_view_->DidStopLoadingForPlugin(); | 1417 render_view_->DidStopLoadingForPlugin(); |
1418 } | 1418 } |
1419 | 1419 |
1420 void PepperPluginDelegateImpl::SetContentRestriction(int restrictions) { | 1420 void PepperPluginDelegateImpl::SetContentRestriction(int restrictions) { |
1421 render_view_->Send(new ViewHostMsg_UpdateContentRestrictions( | 1421 render_view_->Send(new ViewHostMsg_UpdateContentRestrictions( |
1422 render_view_->routing_id(), restrictions)); | 1422 render_view_->routing_id(), restrictions)); |
1423 } | 1423 } |
1424 | 1424 |
1425 void PepperPluginDelegateImpl::HasUnsupportedFeature() { | |
1426 render_view_->Send(new ViewHostMsg_PDFHasUnsupportedFeature( | |
1427 render_view_->routing_id())); | |
1428 } | |
1429 | |
1430 void PepperPluginDelegateImpl::SaveURLAs(const GURL& url) { | 1425 void PepperPluginDelegateImpl::SaveURLAs(const GURL& url) { |
1431 render_view_->Send(new ViewHostMsg_SaveURLAs( | 1426 render_view_->Send(new ViewHostMsg_SaveURLAs( |
1432 render_view_->routing_id(), url)); | 1427 render_view_->routing_id(), url)); |
1433 } | 1428 } |
1434 | 1429 |
1435 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() { | 1430 P2PSocketDispatcher* PepperPluginDelegateImpl::GetP2PSocketDispatcher() { |
1436 return render_view_->p2p_socket_dispatcher(); | 1431 return render_view_->p2p_socket_dispatcher(); |
1437 } | 1432 } |
1438 | 1433 |
1439 webkit_glue::P2PTransport* PepperPluginDelegateImpl::CreateP2PTransport() { | 1434 webkit_glue::P2PTransport* PepperPluginDelegateImpl::CreateP2PTransport() { |
(...skipping 30 matching lines...) Expand all Loading... | |
1470 DLOG(WARNING) << "Browser failed to allocate shared memory"; | 1465 DLOG(WARNING) << "Browser failed to allocate shared memory"; |
1471 return NULL; | 1466 return NULL; |
1472 } | 1467 } |
1473 return new base::SharedMemory(handle, false); | 1468 return new base::SharedMemory(handle, false); |
1474 } | 1469 } |
1475 | 1470 |
1476 ppapi::Preferences PepperPluginDelegateImpl::GetPreferences() { | 1471 ppapi::Preferences PepperPluginDelegateImpl::GetPreferences() { |
1477 return ppapi::Preferences(render_view_->webkit_preferences()); | 1472 return ppapi::Preferences(render_view_->webkit_preferences()); |
1478 } | 1473 } |
1479 | 1474 |
1475 int PepperPluginDelegateImpl::GetRenderViewRoutingId() const { | |
1476 return render_view_ ? render_view_->routing_id() : 0; | |
jam
2011/08/23 02:44:30
are you sure you need to handle the NULL render_vi
ananta
2011/08/23 18:14:03
Removed the NULL check
| |
1477 } | |
1478 | |
1480 void PepperPluginDelegateImpl::PublishInitialPolicy( | 1479 void PepperPluginDelegateImpl::PublishInitialPolicy( |
1481 scoped_refptr<webkit::ppapi::PluginInstance> instance, | 1480 scoped_refptr<webkit::ppapi::PluginInstance> instance, |
1482 const std::string& policy) { | 1481 const std::string& policy) { |
1483 instance->HandlePolicyUpdate(policy); | 1482 instance->HandlePolicyUpdate(policy); |
1484 } | 1483 } |
OLD | NEW |