| 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 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_ |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
| 11 #include "build/build_config.h" | 11 #include "build/build_config.h" |
| 12 #include "ppapi/shared_impl/ppb_flash_shared.h" | 12 #include "ppapi/shared_impl/ppb_flash_shared.h" |
| 13 | 13 |
| 14 class ScopedClipboardWriterGlue; | |
| 15 | |
| 16 namespace webkit_glue { | |
| 17 class ClipboardClient; | |
| 18 } | |
| 19 | |
| 20 namespace webkit { | 14 namespace webkit { |
| 21 namespace ppapi { | 15 namespace ppapi { |
| 22 | 16 |
| 23 class PluginInstance; | 17 class PluginInstance; |
| 24 | 18 |
| 25 class PPB_Flash_Impl : public ::ppapi::PPB_Flash_Shared { | 19 class PPB_Flash_Impl : public ::ppapi::PPB_Flash_Shared { |
| 26 public: | 20 public: |
| 27 explicit PPB_Flash_Impl(PluginInstance* instance); | 21 explicit PPB_Flash_Impl(PluginInstance* instance); |
| 28 virtual ~PPB_Flash_Impl(); | 22 virtual ~PPB_Flash_Impl(); |
| 29 | 23 |
| (...skipping 28 matching lines...) Expand all Loading... |
| 58 const PP_Rect* rect) OVERRIDE; | 52 const PP_Rect* rect) OVERRIDE; |
| 59 virtual void UpdateActivity(PP_Instance instance) OVERRIDE; | 53 virtual void UpdateActivity(PP_Instance instance) OVERRIDE; |
| 60 virtual PP_Var GetDeviceID(PP_Instance instance) OVERRIDE; | 54 virtual PP_Var GetDeviceID(PP_Instance instance) OVERRIDE; |
| 61 virtual int32_t GetSettingInt(PP_Instance instance, | 55 virtual int32_t GetSettingInt(PP_Instance instance, |
| 62 PP_FlashSetting setting) OVERRIDE; | 56 PP_FlashSetting setting) OVERRIDE; |
| 63 virtual PP_Var GetSetting(PP_Instance instance, | 57 virtual PP_Var GetSetting(PP_Instance instance, |
| 64 PP_FlashSetting setting) OVERRIDE; | 58 PP_FlashSetting setting) OVERRIDE; |
| 65 virtual PP_Bool SetCrashData(PP_Instance instance, | 59 virtual PP_Bool SetCrashData(PP_Instance instance, |
| 66 PP_FlashCrashKey key, | 60 PP_FlashCrashKey key, |
| 67 PP_Var value) OVERRIDE; | 61 PP_Var value) OVERRIDE; |
| 68 virtual PP_Bool IsClipboardFormatAvailable( | |
| 69 PP_Instance instance, | |
| 70 PP_Flash_Clipboard_Type clipboard_type, | |
| 71 PP_Flash_Clipboard_Format format) OVERRIDE; | |
| 72 virtual PP_Var ReadClipboardData(PP_Instance instance, | |
| 73 PP_Flash_Clipboard_Type clipboard_type, | |
| 74 PP_Flash_Clipboard_Format format) OVERRIDE; | |
| 75 virtual int32_t WriteClipboardData(PP_Instance instance, | |
| 76 PP_Flash_Clipboard_Type clipboard_type, | |
| 77 uint32_t data_item_count, | |
| 78 const PP_Flash_Clipboard_Format formats[], | |
| 79 const PP_Var data_items[]) OVERRIDE; | |
| 80 virtual bool CreateThreadAdapterForInstance(PP_Instance instance) OVERRIDE; | 62 virtual bool CreateThreadAdapterForInstance(PP_Instance instance) OVERRIDE; |
| 81 virtual void ClearThreadAdapterForInstance(PP_Instance instance) OVERRIDE; | 63 virtual void ClearThreadAdapterForInstance(PP_Instance instance) OVERRIDE; |
| 82 virtual int32_t OpenFile(PP_Instance instance, | 64 virtual int32_t OpenFile(PP_Instance instance, |
| 83 const char* path, | 65 const char* path, |
| 84 int32_t mode, | 66 int32_t mode, |
| 85 PP_FileHandle* file) OVERRIDE; | 67 PP_FileHandle* file) OVERRIDE; |
| 86 virtual int32_t RenameFile(PP_Instance instance, | 68 virtual int32_t RenameFile(PP_Instance instance, |
| 87 const char* path_from, | 69 const char* path_from, |
| 88 const char* path_to) OVERRIDE; | 70 const char* path_to) OVERRIDE; |
| 89 virtual int32_t DeleteFileOrDir(PP_Instance instance, | 71 virtual int32_t DeleteFileOrDir(PP_Instance instance, |
| (...skipping 15 matching lines...) Expand all Loading... |
| 105 virtual int32_t QueryFileRef(PP_Instance instance, | 87 virtual int32_t QueryFileRef(PP_Instance instance, |
| 106 PP_Resource file_ref, | 88 PP_Resource file_ref, |
| 107 PP_FileInfo* info) OVERRIDE; | 89 PP_FileInfo* info) OVERRIDE; |
| 108 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; | 90 virtual PP_Bool FlashIsFullscreen(PP_Instance instance) OVERRIDE; |
| 109 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, | 91 virtual PP_Bool FlashSetFullscreen(PP_Instance instance, |
| 110 PP_Bool fullscreen) OVERRIDE; | 92 PP_Bool fullscreen) OVERRIDE; |
| 111 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, | 93 virtual PP_Bool FlashGetScreenSize(PP_Instance instance, |
| 112 PP_Size* size) OVERRIDE; | 94 PP_Size* size) OVERRIDE; |
| 113 | 95 |
| 114 private: | 96 private: |
| 115 // Call to ensure that the clipboard_client is properly initialized. Returns | |
| 116 // true on success. On failure, you should not use the client. | |
| 117 bool InitClipboard(); | |
| 118 | |
| 119 int32_t WriteClipboardDataItem(const PP_Flash_Clipboard_Format format, | |
| 120 const PP_Var& data, | |
| 121 ScopedClipboardWriterGlue* scw); | |
| 122 | |
| 123 PluginInstance* instance_; | 97 PluginInstance* instance_; |
| 124 | 98 |
| 125 // This object is lazily created by InitClipboard. | |
| 126 scoped_ptr<webkit_glue::ClipboardClient> clipboard_client_; | |
| 127 | |
| 128 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Impl); | 99 DISALLOW_COPY_AND_ASSIGN(PPB_Flash_Impl); |
| 129 }; | 100 }; |
| 130 | 101 |
| 131 } // namespace ppapi | 102 } // namespace ppapi |
| 132 } // namespace webkit | 103 } // namespace webkit |
| 133 | 104 |
| 134 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_ | 105 #endif // WEBKIT_PLUGINS_PPAPI_PPB_FLASH_IMPL_H_ |
| OLD | NEW |