| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/ppb_flash_impl.h" | 5 #include "webkit/plugins/ppapi/ppb_flash_impl.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| 11 #include "base/time.h" | 11 #include "base/time.h" |
| 12 #include "base/utf_string_conversions.h" | 12 #include "base/utf_string_conversions.h" |
| 13 #include "googleurl/src/gurl.h" | 13 #include "googleurl/src/gurl.h" |
| 14 #include "ppapi/c/dev/ppb_font_dev.h" | 14 #include "ppapi/c/dev/ppb_font_dev.h" |
| 15 #include "ppapi/c/private/ppb_flash.h" | 15 #include "ppapi/c/private/ppb_flash.h" |
| 16 #include "ppapi/shared_impl/file_path.h" | 16 #include "ppapi/shared_impl/file_path.h" |
| 17 #include "ppapi/shared_impl/file_type_conversion.h" | 17 #include "ppapi/shared_impl/file_type_conversion.h" |
| 18 #include "ppapi/shared_impl/time_conversion.h" | 18 #include "ppapi/shared_impl/time_conversion.h" |
| 19 #include "ppapi/shared_impl/var.h" | 19 #include "ppapi/shared_impl/var.h" |
| 20 #include "ppapi/thunk/enter.h" | 20 #include "ppapi/thunk/enter.h" |
| 21 #include "ppapi/thunk/ppb_file_ref_api.h" | 21 #include "ppapi/thunk/ppb_file_ref_api.h" |
| 22 #include "ppapi/thunk/ppb_image_data_api.h" | 22 #include "ppapi/thunk/ppb_image_data_api.h" |
| 23 #include "skia/ext/platform_canvas.h" | 23 #include "skia/ext/platform_canvas.h" |
| 24 #include "third_party/skia/include/core/SkCanvas.h" | 24 #include "third_party/skia/include/core/SkCanvas.h" |
| 25 #include "third_party/skia/include/core/SkMatrix.h" | 25 #include "third_party/skia/include/core/SkMatrix.h" |
| 26 #include "third_party/skia/include/core/SkPaint.h" | 26 #include "third_party/skia/include/core/SkPaint.h" |
| 27 #include "third_party/skia/include/core/SkPoint.h" | 27 #include "third_party/skia/include/core/SkPoint.h" |
| 28 #include "third_party/skia/include/core/SkTemplates.h" | 28 #include "third_party/skia/include/core/SkTemplates.h" |
| 29 #include "third_party/skia/include/core/SkTypeface.h" | 29 #include "third_party/skia/include/core/SkTypeface.h" |
| 30 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| 31 #include "third_party/WebKit/Source/WebKit/chromium/public/WebElement.h" |
| 32 #include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginContainer.h" |
| 30 #include "ui/gfx/rect.h" | 33 #include "ui/gfx/rect.h" |
| 31 #include "webkit/glue/clipboard_client.h" | 34 #include "webkit/glue/clipboard_client.h" |
| 32 #include "webkit/glue/scoped_clipboard_writer_glue.h" | 35 #include "webkit/glue/scoped_clipboard_writer_glue.h" |
| 33 #include "webkit/plugins/ppapi/common.h" | 36 #include "webkit/plugins/ppapi/common.h" |
| 34 #include "webkit/plugins/ppapi/host_globals.h" | 37 #include "webkit/plugins/ppapi/host_globals.h" |
| 35 #include "webkit/plugins/ppapi/plugin_delegate.h" | 38 #include "webkit/plugins/ppapi/plugin_delegate.h" |
| 36 #include "webkit/plugins/ppapi/plugin_module.h" | 39 #include "webkit/plugins/ppapi/plugin_module.h" |
| 37 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" | 40 #include "webkit/plugins/ppapi/ppapi_plugin_instance.h" |
| 38 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" | 41 #include "webkit/plugins/ppapi/ppb_file_ref_impl.h" |
| 39 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" | 42 #include "webkit/plugins/ppapi/ppb_url_request_info_impl.h" |
| (...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 return StringVar::StringToPPVar(id); | 245 return StringVar::StringToPPVar(id); |
| 243 } | 246 } |
| 244 | 247 |
| 245 int32_t PPB_Flash_Impl::GetSettingInt(PP_Instance instance, | 248 int32_t PPB_Flash_Impl::GetSettingInt(PP_Instance instance, |
| 246 PP_FlashSetting setting) { | 249 PP_FlashSetting setting) { |
| 247 // No current settings are supported in-process. | 250 // No current settings are supported in-process. |
| 248 return -1; | 251 return -1; |
| 249 } | 252 } |
| 250 | 253 |
| 251 PP_Var PPB_Flash_Impl::GetSetting(PP_Instance instance, | 254 PP_Var PPB_Flash_Impl::GetSetting(PP_Instance instance, |
| 252 PP_FlashSetting setting) { | 255 PP_FlashSetting setting) { |
| 253 // No current settings are supported in-process. | 256 switch(setting) { |
| 254 return PP_MakeUndefined(); | 257 case PP_FLASHSETTING_LSORESTRICTIONS: { |
| 258 return PP_MakeInt32( |
| 259 instance_->delegate()->GetLocalDataRestrictions( |
| 260 instance_->container()->element().document().url(), |
| 261 instance_->plugin_url())); |
| 262 } |
| 263 default: |
| 264 // No other settings are supported in-process. |
| 265 return PP_MakeUndefined(); |
| 266 } |
| 255 } | 267 } |
| 256 | 268 |
| 257 PP_Bool PPB_Flash_Impl::SetCrashData(PP_Instance instance, | 269 PP_Bool PPB_Flash_Impl::SetCrashData(PP_Instance instance, |
| 258 PP_FlashCrashKey key, | 270 PP_FlashCrashKey key, |
| 259 PP_Var value) { | 271 PP_Var value) { |
| 260 // Not implemented in process. | 272 // Not implemented in process. |
| 261 return PP_FALSE; | 273 return PP_FALSE; |
| 262 } | 274 } |
| 263 | 275 |
| 264 | 276 |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 } | 692 } |
| 681 case PP_FLASH_CLIPBOARD_FORMAT_INVALID: | 693 case PP_FLASH_CLIPBOARD_FORMAT_INVALID: |
| 682 break; | 694 break; |
| 683 } | 695 } |
| 684 | 696 |
| 685 return PP_ERROR_BADARGUMENT; | 697 return PP_ERROR_BADARGUMENT; |
| 686 } | 698 } |
| 687 | 699 |
| 688 } // namespace ppapi | 700 } // namespace ppapi |
| 689 } // namespace webkit | 701 } // namespace webkit |
| OLD | NEW |