| 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 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 814 found_supported_format = true; | 815 found_supported_format = true; |
| 815 *format = PP_PRINTOUTPUTFORMAT_PDF_0_4; | 816 *format = PP_PRINTOUTPUTFORMAT_PDF_0_4; |
| 816 break; | 817 break; |
| 817 } else if (supported_formats[index] == | 818 } else if (supported_formats[index] == |
| 818 PP_PRINTOUTPUTFORMAT_RASTER_0_3) { | 819 PP_PRINTOUTPUTFORMAT_RASTER_0_3) { |
| 819 // We found raster. Keep looking. | 820 // We found raster. Keep looking. |
| 820 found_supported_format = true; | 821 found_supported_format = true; |
| 821 *format = PP_PRINTOUTPUTFORMAT_RASTER_0_4; | 822 *format = PP_PRINTOUTPUTFORMAT_RASTER_0_4; |
| 822 } | 823 } |
| 823 } | 824 } |
| 824 PluginModule::GetCore()->MemFree(supported_formats); | 825 PluginModule::GetMemoryDev()->MemFree(supported_formats); |
| 825 return found_supported_format; | 826 return found_supported_format; |
| 826 } | 827 } |
| 827 return false; | 828 return false; |
| 828 } | 829 } |
| 829 | 830 |
| 830 bool PluginInstance::SupportsPrintInterface() { | 831 bool PluginInstance::SupportsPrintInterface() { |
| 831 PP_PrintOutputFormat_Dev_0_4 format; | 832 PP_PrintOutputFormat_Dev_0_4 format; |
| 832 return GetPreferredPrintOutputFormat(&format); | 833 return GetPreferredPrintOutputFormat(&format); |
| 833 } | 834 } |
| 834 | 835 |
| (...skipping 711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1546 } | 1547 } |
| 1547 delegate()->ZoomLimitsChanged(minimum_factor, maximium_factor); | 1548 delegate()->ZoomLimitsChanged(minimum_factor, maximium_factor); |
| 1548 } | 1549 } |
| 1549 | 1550 |
| 1550 void PluginInstance::PostMessage(PP_Instance instance, PP_Var message) { | 1551 void PluginInstance::PostMessage(PP_Instance instance, PP_Var message) { |
| 1551 message_channel_->PostMessageToJavaScript(message); | 1552 message_channel_->PostMessageToJavaScript(message); |
| 1552 } | 1553 } |
| 1553 | 1554 |
| 1554 } // namespace ppapi | 1555 } // namespace ppapi |
| 1555 } // namespace webkit | 1556 } // namespace webkit |
| OLD | NEW |