| 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" |
| 11 #include "base/utf_string_conversions.h" | 11 #include "base/utf_string_conversions.h" |
| 12 #include "ppapi/c/dev/ppb_find_dev.h" | 12 #include "ppapi/c/dev/ppb_find_dev.h" |
| 13 #include "ppapi/c/dev/ppb_fullscreen_dev.h" | 13 #include "ppapi/c/dev/ppb_fullscreen_dev.h" |
| 14 #include "ppapi/c/dev/ppb_memory_dev.h" |
| 14 #include "ppapi/c/dev/ppb_zoom_dev.h" | 15 #include "ppapi/c/dev/ppb_zoom_dev.h" |
| 15 #include "ppapi/c/dev/ppp_find_dev.h" | 16 #include "ppapi/c/dev/ppp_find_dev.h" |
| 16 #include "ppapi/c/dev/ppp_selection_dev.h" | 17 #include "ppapi/c/dev/ppp_selection_dev.h" |
| 17 #include "ppapi/c/dev/ppp_zoom_dev.h" | 18 #include "ppapi/c/dev/ppp_zoom_dev.h" |
| 18 #include "ppapi/c/pp_input_event.h" | 19 #include "ppapi/c/pp_input_event.h" |
| 19 #include "ppapi/c/pp_instance.h" | 20 #include "ppapi/c/pp_instance.h" |
| 20 #include "ppapi/c/pp_rect.h" | 21 #include "ppapi/c/pp_rect.h" |
| 21 #include "ppapi/c/pp_resource.h" | 22 #include "ppapi/c/pp_resource.h" |
| 22 #include "ppapi/c/pp_var.h" | 23 #include "ppapi/c/pp_var.h" |
| 23 #include "ppapi/c/ppb_core.h" | 24 #include "ppapi/c/ppb_core.h" |
| (...skipping 796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 820 found_supported_format = true; | 821 found_supported_format = true; |
| 821 *format = PP_PRINTOUTPUTFORMAT_PDF_0_4; | 822 *format = PP_PRINTOUTPUTFORMAT_PDF_0_4; |
| 822 break; | 823 break; |
| 823 } else if (supported_formats[index] == | 824 } else if (supported_formats[index] == |
| 824 PP_PRINTOUTPUTFORMAT_RASTER_0_3) { | 825 PP_PRINTOUTPUTFORMAT_RASTER_0_3) { |
| 825 // We found raster. Keep looking. | 826 // We found raster. Keep looking. |
| 826 found_supported_format = true; | 827 found_supported_format = true; |
| 827 *format = PP_PRINTOUTPUTFORMAT_RASTER_0_4; | 828 *format = PP_PRINTOUTPUTFORMAT_RASTER_0_4; |
| 828 } | 829 } |
| 829 } | 830 } |
| 830 PluginModule::GetCore()->MemFree(supported_formats); | 831 PluginModule::GetMemoryDev()->MemFree(supported_formats); |
| 831 return found_supported_format; | 832 return found_supported_format; |
| 832 } | 833 } |
| 833 return false; | 834 return false; |
| 834 } | 835 } |
| 835 | 836 |
| 836 bool PluginInstance::SupportsPrintInterface() { | 837 bool PluginInstance::SupportsPrintInterface() { |
| 837 PP_PrintOutputFormat_Dev_0_4 format; | 838 PP_PrintOutputFormat_Dev_0_4 format; |
| 838 return GetPreferredPrintOutputFormat(&format); | 839 return GetPreferredPrintOutputFormat(&format); |
| 839 } | 840 } |
| 840 | 841 |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1552 } | 1553 } |
| 1553 delegate()->ZoomLimitsChanged(minimum_factor, maximium_factor); | 1554 delegate()->ZoomLimitsChanged(minimum_factor, maximium_factor); |
| 1554 } | 1555 } |
| 1555 | 1556 |
| 1556 void PluginInstance::PostMessage(PP_Instance instance, PP_Var message) { | 1557 void PluginInstance::PostMessage(PP_Instance instance, PP_Var message) { |
| 1557 message_channel_->PostMessageToJavaScript(message); | 1558 message_channel_->PostMessageToJavaScript(message); |
| 1558 } | 1559 } |
| 1559 | 1560 |
| 1560 } // namespace ppapi | 1561 } // namespace ppapi |
| 1561 } // namespace webkit | 1562 } // namespace webkit |
| OLD | NEW |