| 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 CONTENT_PLUGIN_PLUGIN_THREAD_H_ | 5 #ifndef CONTENT_PLUGIN_PLUGIN_THREAD_H_ |
| 6 #define CONTENT_PLUGIN_PLUGIN_THREAD_H_ | 6 #define CONTENT_PLUGIN_PLUGIN_THREAD_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/macros.h" |
| 9 #include "base/native_library.h" | 12 #include "base/native_library.h" |
| 10 #include "build/build_config.h" | 13 #include "build/build_config.h" |
| 11 #include "content/child/child_thread_impl.h" | 14 #include "content/child/child_thread_impl.h" |
| 12 #include "content/child/npapi/plugin_lib.h" | 15 #include "content/child/npapi/plugin_lib.h" |
| 13 #include "content/plugin/plugin_channel.h" | 16 #include "content/plugin/plugin_channel.h" |
| 14 | 17 |
| 15 #if defined(OS_POSIX) | 18 #if defined(OS_POSIX) |
| 16 #include "base/file_descriptor_posix.h" | 19 #include "base/file_descriptor_posix.h" |
| 17 #endif | 20 #endif |
| 18 | 21 |
| (...skipping 14 matching lines...) Expand all Loading... |
| 33 | 36 |
| 34 // Tells the plugin thread to terminate the process forcefully instead of | 37 // Tells the plugin thread to terminate the process forcefully instead of |
| 35 // exiting cleanly. | 38 // exiting cleanly. |
| 36 void SetForcefullyTerminatePluginProcess(); | 39 void SetForcefullyTerminatePluginProcess(); |
| 37 | 40 |
| 38 private: | 41 private: |
| 39 bool OnControlMessageReceived(const IPC::Message& msg) override; | 42 bool OnControlMessageReceived(const IPC::Message& msg) override; |
| 40 | 43 |
| 41 // Callback for when a channel has been created. | 44 // Callback for when a channel has been created. |
| 42 void OnCreateChannel(int renderer_id, bool incognito); | 45 void OnCreateChannel(int renderer_id, bool incognito); |
| 43 void OnPluginMessage(const std::vector<uint8> &data); | 46 void OnPluginMessage(const std::vector<uint8_t>& data); |
| 44 void OnNotifyRenderersOfPendingShutdown(); | 47 void OnNotifyRenderersOfPendingShutdown(); |
| 45 #if defined(OS_MACOSX) | 48 #if defined(OS_MACOSX) |
| 46 void OnAppActivated(); | 49 void OnAppActivated(); |
| 47 void OnPluginFocusNotify(uint32 instance_id); | 50 void OnPluginFocusNotify(uint32_t instance_id); |
| 48 #endif | 51 #endif |
| 49 | 52 |
| 50 // The plugin module which is preloaded in Init | 53 // The plugin module which is preloaded in Init |
| 51 base::NativeLibrary preloaded_plugin_module_; | 54 base::NativeLibrary preloaded_plugin_module_; |
| 52 | 55 |
| 53 bool forcefully_terminate_plugin_process_; | 56 bool forcefully_terminate_plugin_process_; |
| 54 | 57 |
| 55 scoped_ptr<BlinkPlatformImpl> blink_platform_impl_; | 58 scoped_ptr<BlinkPlatformImpl> blink_platform_impl_; |
| 56 | 59 |
| 57 DISALLOW_COPY_AND_ASSIGN(PluginThread); | 60 DISALLOW_COPY_AND_ASSIGN(PluginThread); |
| 58 }; | 61 }; |
| 59 | 62 |
| 60 } // namespace content | 63 } // namespace content |
| 61 | 64 |
| 62 #endif // CONTENT_PLUGIN_PLUGIN_THREAD_H_ | 65 #endif // CONTENT_PLUGIN_PLUGIN_THREAD_H_ |
| OLD | NEW |