| 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_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 5 #ifndef CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
| 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 6 #define CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <map> | 9 #include <map> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 virtual uint32 Register( | 57 virtual uint32 Register( |
| 58 ppapi::proxy::PluginDispatcher* plugin_dispatcher) OVERRIDE; | 58 ppapi::proxy::PluginDispatcher* plugin_dispatcher) OVERRIDE; |
| 59 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; | 59 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; |
| 60 | 60 |
| 61 // PluginProxyDelegate. | 61 // PluginProxyDelegate. |
| 62 // SendToBrowser() is intended to be safe to use on another thread so | 62 // SendToBrowser() is intended to be safe to use on another thread so |
| 63 // long as the main PpapiThread outlives it. | 63 // long as the main PpapiThread outlives it. |
| 64 virtual bool SendToBrowser(IPC::Message* msg) OVERRIDE; | 64 virtual bool SendToBrowser(IPC::Message* msg) OVERRIDE; |
| 65 virtual std::string GetUILanguage() OVERRIDE; | 65 virtual std::string GetUILanguage() OVERRIDE; |
| 66 virtual void PreCacheFont(const void* logfontw) OVERRIDE; | 66 virtual void PreCacheFont(const void* logfontw) OVERRIDE; |
| 67 virtual void SetActiveURL(const GURL& url) OVERRIDE; |
| 67 | 68 |
| 68 // Message handlers. | 69 // Message handlers. |
| 69 void OnMsgLoadPlugin(const FilePath& path); | 70 void OnMsgLoadPlugin(const FilePath& path); |
| 70 void OnMsgCreateChannel(int renderer_id, | 71 void OnMsgCreateChannel(int renderer_id, |
| 71 bool incognito); | 72 bool incognito); |
| 72 void OnMsgSetNetworkState(bool online); | 73 void OnMsgSetNetworkState(bool online); |
| 73 void OnPluginDispatcherMessageReceived(const IPC::Message& msg); | 74 void OnPluginDispatcherMessageReceived(const IPC::Message& msg); |
| 74 | 75 |
| 75 // Sets up the channel to the given renderer. On success, returns true and | 76 // Sets up the channel to the given renderer. On success, returns true and |
| 76 // fills the given ChannelHandle with the information from the new channel. | 77 // fills the given ChannelHandle with the information from the new channel. |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 115 | 116 |
| 116 #if defined(OS_WIN) | 117 #if defined(OS_WIN) |
| 117 // Caches the handle to the peer process if this is a broker. | 118 // Caches the handle to the peer process if this is a broker. |
| 118 base::win::ScopedHandle peer_handle_; | 119 base::win::ScopedHandle peer_handle_; |
| 119 #endif | 120 #endif |
| 120 | 121 |
| 121 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); | 122 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); |
| 122 }; | 123 }; |
| 123 | 124 |
| 124 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 125 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
| OLD | NEW |