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 #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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "base/file_path.h" | 9 #include "base/file_path.h" |
10 #include "base/native_library.h" | 10 #include "base/native_library.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 // process and WebPluginDelegateStub in this thread through IPC messages. | 22 // process and WebPluginDelegateStub in this thread through IPC messages. |
23 class PluginThread : public ChildThread { | 23 class PluginThread : public ChildThread { |
24 public: | 24 public: |
25 PluginThread(); | 25 PluginThread(); |
26 virtual ~PluginThread(); | 26 virtual ~PluginThread(); |
27 | 27 |
28 // Returns the one plugin thread. | 28 // Returns the one plugin thread. |
29 static PluginThread* current(); | 29 static PluginThread* current(); |
30 | 30 |
31 private: | 31 private: |
32 virtual bool OnControlMessageReceived(const IPC::Message& msg); | 32 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; |
33 | 33 |
34 // Callback for when a channel has been created. | 34 // Callback for when a channel has been created. |
35 void OnCreateChannel(int renderer_id, bool incognito); | 35 void OnCreateChannel(int renderer_id, bool incognito); |
36 void OnPluginMessage(const std::vector<uint8> &data); | 36 void OnPluginMessage(const std::vector<uint8> &data); |
37 void OnNotifyRenderersOfPendingShutdown(); | 37 void OnNotifyRenderersOfPendingShutdown(); |
38 #if defined(OS_MACOSX) | 38 #if defined(OS_MACOSX) |
39 void OnAppActivated(); | 39 void OnAppActivated(); |
40 void OnPluginFocusNotify(uint32 instance_id); | 40 void OnPluginFocusNotify(uint32 instance_id); |
41 #endif | 41 #endif |
42 | 42 |
43 // The plugin module which is preloaded in Init | 43 // The plugin module which is preloaded in Init |
44 base::NativeLibrary preloaded_plugin_module_; | 44 base::NativeLibrary preloaded_plugin_module_; |
45 | 45 |
46 DISALLOW_COPY_AND_ASSIGN(PluginThread); | 46 DISALLOW_COPY_AND_ASSIGN(PluginThread); |
47 }; | 47 }; |
48 | 48 |
49 #endif // CONTENT_PLUGIN_PLUGIN_THREAD_H_ | 49 #endif // CONTENT_PLUGIN_PLUGIN_THREAD_H_ |
OLD | NEW |