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 "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 5 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/message_loop.h" | 9 #include "base/message_loop.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 PPP_INPUT_EVENT_INTERFACE)); | 693 PPP_INPUT_EVENT_INTERFACE)); |
694 } | 694 } |
695 return !!plugin_input_event_interface_; | 695 return !!plugin_input_event_interface_; |
696 } | 696 } |
697 | 697 |
698 bool PluginInstance::LoadMessagingInterface() { | 698 bool PluginInstance::LoadMessagingInterface() { |
699 if (!checked_for_plugin_messaging_interface_) { | 699 if (!checked_for_plugin_messaging_interface_) { |
700 checked_for_plugin_messaging_interface_ = true; | 700 checked_for_plugin_messaging_interface_ = true; |
701 plugin_messaging_interface_ = | 701 plugin_messaging_interface_ = |
702 static_cast<const PPP_Messaging*>(module_->GetPluginInterface( | 702 static_cast<const PPP_Messaging*>(module_->GetPluginInterface( |
703 PPP_MESSAGING_INTERFACE_1_0)); | 703 PPP_MESSAGING_INTERFACE)); |
704 // TODO(dmichael): Remove support for 0.1. | |
705 if (!plugin_messaging_interface_) { | |
706 plugin_messaging_interface_ = | |
707 static_cast<const PPP_Messaging*>(module_->GetPluginInterface( | |
708 PPP_MESSAGING_INTERFACE_0_1)); | |
709 } | |
710 } | 704 } |
711 | 705 |
712 return !!plugin_messaging_interface_; | 706 return !!plugin_messaging_interface_; |
713 } | 707 } |
714 | 708 |
715 bool PluginInstance::LoadPdfInterface() { | 709 bool PluginInstance::LoadPdfInterface() { |
716 if (!plugin_pdf_interface_) { | 710 if (!plugin_pdf_interface_) { |
717 plugin_pdf_interface_ = | 711 plugin_pdf_interface_ = |
718 static_cast<const PPP_Pdf*>(module_->GetPluginInterface( | 712 static_cast<const PPP_Pdf*>(module_->GetPluginInterface( |
719 PPP_PDF_INTERFACE)); | 713 PPP_PDF_INTERFACE)); |
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1552 } | 1546 } |
1553 delegate()->ZoomLimitsChanged(minimum_factor, maximium_factor); | 1547 delegate()->ZoomLimitsChanged(minimum_factor, maximium_factor); |
1554 } | 1548 } |
1555 | 1549 |
1556 void PluginInstance::PostMessage(PP_Instance instance, PP_Var message) { | 1550 void PluginInstance::PostMessage(PP_Instance instance, PP_Var message) { |
1557 message_channel_->PostMessageToJavaScript(message); | 1551 message_channel_->PostMessageToJavaScript(message); |
1558 } | 1552 } |
1559 | 1553 |
1560 } // namespace ppapi | 1554 } // namespace ppapi |
1561 } // namespace webkit | 1555 } // namespace webkit |
OLD | NEW |