| 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" |
| (...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 242 return StringVar::StringToPPVar(id); | 242 return StringVar::StringToPPVar(id); |
| 243 } | 243 } |
| 244 | 244 |
| 245 int32_t PPB_Flash_Impl::GetSettingInt(PP_Instance instance, | 245 int32_t PPB_Flash_Impl::GetSettingInt(PP_Instance instance, |
| 246 PP_FlashSetting setting) { | 246 PP_FlashSetting setting) { |
| 247 // No current settings are supported in-process. | 247 // No current settings are supported in-process. |
| 248 return -1; | 248 return -1; |
| 249 } | 249 } |
| 250 | 250 |
| 251 PP_Var PPB_Flash_Impl::GetSetting(PP_Instance instance, | 251 PP_Var PPB_Flash_Impl::GetSetting(PP_Instance instance, |
| 252 PP_FlashSetting setting) { | 252 PP_FlashSetting setting) { |
| 253 // No current settings are supported in-process. | 253 switch(setting) { |
| 254 return PP_MakeUndefined(); | 254 case PP_FLASHSETTING_LSORESTRICTIONS: { |
| 255 bool block_access = false; |
| 256 bool in_memory = false; |
| 257 instance_->delegate()->GetLocalDataRestrictions( |
| 258 instance_->plugin_url(), &block_access, &in_memory); |
| 259 if (block_access) |
| 260 return PP_MakeInt32(PP_FLASHLSORESTRICTIONS_BLOCK); |
| 261 |
| 262 if (in_memory) |
| 263 return PP_MakeInt32(PP_FLASHLSORESTRICTIONS_IN_MEMORY); |
| 264 |
| 265 return PP_MakeInt32(PP_FLASHLSORESTRICTIONS_NONE); |
| 266 } |
| 267 default: |
| 268 // No other settings are supported in-process. |
| 269 return PP_MakeUndefined(); |
| 270 } |
| 255 } | 271 } |
| 256 | 272 |
| 257 PP_Bool PPB_Flash_Impl::SetCrashData(PP_Instance instance, | 273 PP_Bool PPB_Flash_Impl::SetCrashData(PP_Instance instance, |
| 258 PP_FlashCrashKey key, | 274 PP_FlashCrashKey key, |
| 259 PP_Var value) { | 275 PP_Var value) { |
| 260 // Not implemented in process. | 276 // Not implemented in process. |
| 261 return PP_FALSE; | 277 return PP_FALSE; |
| 262 } | 278 } |
| 263 | 279 |
| 264 | 280 |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 680 } | 696 } |
| 681 case PP_FLASH_CLIPBOARD_FORMAT_INVALID: | 697 case PP_FLASH_CLIPBOARD_FORMAT_INVALID: |
| 682 break; | 698 break; |
| 683 } | 699 } |
| 684 | 700 |
| 685 return PP_ERROR_BADARGUMENT; | 701 return PP_ERROR_BADARGUMENT; |
| 686 } | 702 } |
| 687 | 703 |
| 688 } // namespace ppapi | 704 } // namespace ppapi |
| 689 } // namespace webkit | 705 } // namespace webkit |
| OLD | NEW |