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 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 28 matching lines...) Expand all Loading... |
39 namespace content { | 39 namespace content { |
40 | 40 |
41 class PpapiBlinkPlatformImpl; | 41 class PpapiBlinkPlatformImpl; |
42 | 42 |
43 class PpapiThread : public ChildThread, | 43 class PpapiThread : public ChildThread, |
44 public ppapi::proxy::PluginDispatcher::PluginDelegate, | 44 public ppapi::proxy::PluginDispatcher::PluginDelegate, |
45 public ppapi::proxy::PluginProxyDelegate { | 45 public ppapi::proxy::PluginProxyDelegate { |
46 public: | 46 public: |
47 PpapiThread(const base::CommandLine& command_line, bool is_broker); | 47 PpapiThread(const base::CommandLine& command_line, bool is_broker); |
48 virtual ~PpapiThread(); | 48 virtual ~PpapiThread(); |
49 virtual void Shutdown() OVERRIDE; | 49 virtual void Shutdown() override; |
50 | 50 |
51 private: | 51 private: |
52 // Make sure the enum list in tools/histogram/histograms.xml is updated with | 52 // Make sure the enum list in tools/histogram/histograms.xml is updated with |
53 // any change in this list. | 53 // any change in this list. |
54 enum LoadResult { | 54 enum LoadResult { |
55 LOAD_SUCCESS, | 55 LOAD_SUCCESS, |
56 LOAD_FAILED, | 56 LOAD_FAILED, |
57 ENTRY_POINT_MISSING, | 57 ENTRY_POINT_MISSING, |
58 INIT_FAILED, | 58 INIT_FAILED, |
59 FILE_MISSING, | 59 FILE_MISSING, |
60 // NOTE: Add new values only immediately above this line. | 60 // NOTE: Add new values only immediately above this line. |
61 LOAD_RESULT_MAX // Boundary value for UMA_HISTOGRAM_ENUMERATION. | 61 LOAD_RESULT_MAX // Boundary value for UMA_HISTOGRAM_ENUMERATION. |
62 }; | 62 }; |
63 | 63 |
64 // ChildThread overrides. | 64 // ChildThread overrides. |
65 virtual bool Send(IPC::Message* msg) OVERRIDE; | 65 virtual bool Send(IPC::Message* msg) override; |
66 virtual bool OnControlMessageReceived(const IPC::Message& msg) OVERRIDE; | 66 virtual bool OnControlMessageReceived(const IPC::Message& msg) override; |
67 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; | 67 virtual void OnChannelConnected(int32 peer_pid) override; |
68 | 68 |
69 // PluginDispatcher::PluginDelegate implementation. | 69 // PluginDispatcher::PluginDelegate implementation. |
70 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() OVERRIDE; | 70 virtual std::set<PP_Instance>* GetGloballySeenInstanceIDSet() override; |
71 virtual base::MessageLoopProxy* GetIPCMessageLoop() OVERRIDE; | 71 virtual base::MessageLoopProxy* GetIPCMessageLoop() override; |
72 virtual base::WaitableEvent* GetShutdownEvent() OVERRIDE; | 72 virtual base::WaitableEvent* GetShutdownEvent() override; |
73 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( | 73 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( |
74 base::PlatformFile handle, | 74 base::PlatformFile handle, |
75 base::ProcessId peer_pid, | 75 base::ProcessId peer_pid, |
76 bool should_close_source) OVERRIDE; | 76 bool should_close_source) override; |
77 virtual uint32 Register( | 77 virtual uint32 Register( |
78 ppapi::proxy::PluginDispatcher* plugin_dispatcher) OVERRIDE; | 78 ppapi::proxy::PluginDispatcher* plugin_dispatcher) override; |
79 virtual void Unregister(uint32 plugin_dispatcher_id) OVERRIDE; | 79 virtual void Unregister(uint32 plugin_dispatcher_id) override; |
80 | 80 |
81 // PluginProxyDelegate. | 81 // PluginProxyDelegate. |
82 // SendToBrowser() is intended to be safe to use on another thread so | 82 // SendToBrowser() is intended to be safe to use on another thread so |
83 // long as the main PpapiThread outlives it. | 83 // long as the main PpapiThread outlives it. |
84 virtual IPC::Sender* GetBrowserSender() OVERRIDE; | 84 virtual IPC::Sender* GetBrowserSender() override; |
85 virtual std::string GetUILanguage() OVERRIDE; | 85 virtual std::string GetUILanguage() override; |
86 virtual void PreCacheFont(const void* logfontw) OVERRIDE; | 86 virtual void PreCacheFont(const void* logfontw) override; |
87 virtual void SetActiveURL(const std::string& url) OVERRIDE; | 87 virtual void SetActiveURL(const std::string& url) override; |
88 virtual PP_Resource CreateBrowserFont( | 88 virtual PP_Resource CreateBrowserFont( |
89 ppapi::proxy::Connection connection, | 89 ppapi::proxy::Connection connection, |
90 PP_Instance instance, | 90 PP_Instance instance, |
91 const PP_BrowserFont_Trusted_Description& desc, | 91 const PP_BrowserFont_Trusted_Description& desc, |
92 const ppapi::Preferences& prefs) OVERRIDE; | 92 const ppapi::Preferences& prefs) override; |
93 | 93 |
94 // Message handlers. | 94 // Message handlers. |
95 void OnLoadPlugin(const base::FilePath& path, | 95 void OnLoadPlugin(const base::FilePath& path, |
96 const ppapi::PpapiPermissions& permissions); | 96 const ppapi::PpapiPermissions& permissions); |
97 void OnCreateChannel(base::ProcessId renderer_pid, | 97 void OnCreateChannel(base::ProcessId renderer_pid, |
98 int renderer_child_id, | 98 int renderer_child_id, |
99 bool incognito); | 99 bool incognito); |
100 void OnSetNetworkState(bool online); | 100 void OnSetNetworkState(bool online); |
101 void OnCrash(); | 101 void OnCrash(); |
102 void OnHang(); | 102 void OnHang(); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 // Caches the handle to the peer process if this is a broker. | 156 // Caches the handle to the peer process if this is a broker. |
157 base::win::ScopedHandle peer_handle_; | 157 base::win::ScopedHandle peer_handle_; |
158 #endif | 158 #endif |
159 | 159 |
160 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); | 160 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); |
161 }; | 161 }; |
162 | 162 |
163 } // namespace content | 163 } // namespace content |
164 | 164 |
165 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ | 165 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ |
OLD | NEW |