Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(256)

Side by Side Diff: content/ppapi_plugin/ppapi_thread.h

Issue 671663002: Standardize usage of virtual/override/final in content/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 27 matching lines...) Expand all
38 38
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 ~PpapiThread() override;
49 virtual void Shutdown() override; 49 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 bool Send(IPC::Message* msg) override;
66 virtual bool OnControlMessageReceived(const IPC::Message& msg) override; 66 bool OnControlMessageReceived(const IPC::Message& msg) override;
67 virtual void OnChannelConnected(int32 peer_pid) override; 67 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 std::set<PP_Instance>* GetGloballySeenInstanceIDSet() override;
71 virtual base::MessageLoopProxy* GetIPCMessageLoop() override; 71 base::MessageLoopProxy* GetIPCMessageLoop() override;
72 virtual base::WaitableEvent* GetShutdownEvent() override; 72 base::WaitableEvent* GetShutdownEvent() override;
73 virtual IPC::PlatformFileForTransit ShareHandleWithRemote( 73 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 uint32 Register(ppapi::proxy::PluginDispatcher* plugin_dispatcher) override;
78 ppapi::proxy::PluginDispatcher* plugin_dispatcher) override; 78 void Unregister(uint32 plugin_dispatcher_id) override;
79 virtual void Unregister(uint32 plugin_dispatcher_id) override;
80 79
81 // PluginProxyDelegate. 80 // PluginProxyDelegate.
82 // SendToBrowser() is intended to be safe to use on another thread so 81 // SendToBrowser() is intended to be safe to use on another thread so
83 // long as the main PpapiThread outlives it. 82 // long as the main PpapiThread outlives it.
84 virtual IPC::Sender* GetBrowserSender() override; 83 IPC::Sender* GetBrowserSender() override;
85 virtual std::string GetUILanguage() override; 84 std::string GetUILanguage() override;
86 virtual void PreCacheFont(const void* logfontw) override; 85 void PreCacheFont(const void* logfontw) override;
87 virtual void SetActiveURL(const std::string& url) override; 86 void SetActiveURL(const std::string& url) override;
88 virtual PP_Resource CreateBrowserFont( 87 PP_Resource CreateBrowserFont(ppapi::proxy::Connection connection,
89 ppapi::proxy::Connection connection, 88 PP_Instance instance,
90 PP_Instance instance, 89 const PP_BrowserFont_Trusted_Description& desc,
91 const PP_BrowserFont_Trusted_Description& desc, 90 const ppapi::Preferences& prefs) override;
92 const ppapi::Preferences& prefs) override;
93 91
94 // Message handlers. 92 // Message handlers.
95 void OnLoadPlugin(const base::FilePath& path, 93 void OnLoadPlugin(const base::FilePath& path,
96 const ppapi::PpapiPermissions& permissions); 94 const ppapi::PpapiPermissions& permissions);
97 void OnCreateChannel(base::ProcessId renderer_pid, 95 void OnCreateChannel(base::ProcessId renderer_pid,
98 int renderer_child_id, 96 int renderer_child_id,
99 bool incognito); 97 bool incognito);
100 void OnSetNetworkState(bool online); 98 void OnSetNetworkState(bool online);
101 void OnCrash(); 99 void OnCrash();
102 void OnHang(); 100 void OnHang();
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 // Caches the handle to the peer process if this is a broker. 154 // Caches the handle to the peer process if this is a broker.
157 base::win::ScopedHandle peer_handle_; 155 base::win::ScopedHandle peer_handle_;
158 #endif 156 #endif
159 157
160 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread); 158 DISALLOW_IMPLICIT_CONSTRUCTORS(PpapiThread);
161 }; 159 };
162 160
163 } // namespace content 161 } // namespace content
164 162
165 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_ 163 #endif // CONTENT_PPAPI_PLUGIN_PPAPI_THREAD_H_
OLDNEW
« no previous file with comments | « content/ppapi_plugin/plugin_process_dispatcher.h ('k') | content/public/browser/browser_child_process_host.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698