diff options
author | nick <nick@chromium.org> | 2015-04-23 07:01:48 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-04-23 14:02:23 +0000 |
commit | e4784434857731fd46a2ecdf0c132561ff6674a3 (patch) | |
tree | e23a46906d8a4c42ea7127f48dc0da48264834e9 /ppapi/host | |
parent | b05b81d7617e11ae4612afc15aab69b6f57293fe (diff) | |
download | chromium_src-e4784434857731fd46a2ecdf0c132561ff6674a3.zip chromium_src-e4784434857731fd46a2ecdf0c132561ff6674a3.tar.gz chromium_src-e4784434857731fd46a2ecdf0c132561ff6674a3.tar.bz2 |
Update {virtual,override} to follow C++11 style in ppapi.
The Google style guide states that only one of {virtual,override,final} should be used for each declaration, since override implies virtual and final implies both virtual and override.
This patch was manually generated using a regex and a text editor.
BUG=417463
Review URL: https://codereview.chromium.org/1097393007
Cr-Commit-Position: refs/heads/master@{#326505}
Diffstat (limited to 'ppapi/host')
-rw-r--r-- | ppapi/host/ppapi_host.h | 6 | ||||
-rw-r--r-- | ppapi/host/resource_host.h | 10 | ||||
-rw-r--r-- | ppapi/host/resource_message_filter.h | 17 | ||||
-rw-r--r-- | ppapi/host/resource_message_filter_unittest.cc | 13 |
4 files changed, 22 insertions, 24 deletions
diff --git a/ppapi/host/ppapi_host.h b/ppapi/host/ppapi_host.h index 3f6e80d..d4361df 100644 --- a/ppapi/host/ppapi_host.h +++ b/ppapi/host/ppapi_host.h @@ -46,15 +46,15 @@ class PPAPI_HOST_EXPORT PpapiHost : public IPC::Sender, public IPC::Listener { // (AddHostFactoryFilter) and instance messages (AddInstanceMessageFilter) // after construction. PpapiHost(IPC::Sender* sender, const PpapiPermissions& perms); - virtual ~PpapiHost(); + ~PpapiHost() override; const PpapiPermissions& permissions() const { return permissions_; } // Sender implementation. Forwards to the sender_. - virtual bool Send(IPC::Message* msg) override; + bool Send(IPC::Message* msg) override; // Listener implementation. - virtual bool OnMessageReceived(const IPC::Message& msg) override; + bool OnMessageReceived(const IPC::Message& msg) override; // Sends the given reply message to the plugin. void SendReply(const ReplyMessageContext& context, diff --git a/ppapi/host/resource_host.h b/ppapi/host/resource_host.h index 517cf0a..6bf4996 100644 --- a/ppapi/host/resource_host.h +++ b/ppapi/host/resource_host.h @@ -31,7 +31,7 @@ class ResourceMessageFilter; class PPAPI_HOST_EXPORT ResourceHost : public ResourceMessageHandler { public: ResourceHost(PpapiHost* host, PP_Instance instance, PP_Resource resource); - virtual ~ResourceHost(); + ~ResourceHost() override; PpapiHost* host() { return host_; } PP_Instance pp_instance() const { return pp_instance_; } @@ -40,8 +40,8 @@ class PPAPI_HOST_EXPORT ResourceHost : public ResourceMessageHandler { // This runs any message filters in |message_filters_|. If the message is not // handled by these filters then the host's own message handler is run. True // is always returned (the message will always be handled in some way). - virtual bool HandleMessage(const IPC::Message& msg, - HostMessageContext* context) override; + bool HandleMessage(const IPC::Message& msg, + HostMessageContext* context) override; // Sets the PP_Resource ID when the plugin attaches to a pending resource // host. This will notify subclasses by calling @@ -51,8 +51,8 @@ class PPAPI_HOST_EXPORT ResourceHost : public ResourceMessageHandler { // PpapiHostMsg_AttachToPendingHost. void SetPPResourceForPendingHost(PP_Resource pp_resource); - virtual void SendReply(const ReplyMessageContext& context, - const IPC::Message& msg) override; + void SendReply(const ReplyMessageContext& context, + const IPC::Message& msg) override; // Simple RTTI. A subclass that is a host for one of these APIs will override // the appropriate function and return true. diff --git a/ppapi/host/resource_message_filter.h b/ppapi/host/resource_message_filter.h index af7a4f6..5488f98 100644 --- a/ppapi/host/resource_message_filter.h +++ b/ppapi/host/resource_message_filter.h @@ -48,16 +48,15 @@ struct PPAPI_HOST_EXPORT ResourceMessageFilterDeleteTraits { // subclass as follows: // class MyMessageFilter : public ResourceMessageFilter { // protected: -// virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( +// scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( // const IPC::Message& message) override { // if (message.type() == MyMessage::ID) // return BrowserThread::GetMessageLoopProxyForThread(BrowserThread::UI); // return NULL; // } // -// virtual int32_t OnResourceMessageReceived( -// const IPC::Message& msg, -// HostMessageContext* context) override { +// int32_t OnResourceMessageReceived(const IPC::Message& msg, +// HostMessageContext* context) override { // IPC_BEGIN_MESSAGE_MAP(MyMessageFilter, msg) // PPAPI_DISPATCH_HOST_RESOURCE_CALL(MyMessage, OnMyMessage) // IPC_END_MESSAGE_MAP() @@ -96,15 +95,15 @@ class PPAPI_HOST_EXPORT ResourceMessageFilter // This will dispatch the message handler on the target thread. It returns // true if the message was handled by this filter and false otherwise. - virtual bool HandleMessage(const IPC::Message& msg, - HostMessageContext* context) override; + bool HandleMessage(const IPC::Message& msg, + HostMessageContext* context) override; // This can be called from any thread. - virtual void SendReply(const ReplyMessageContext& context, - const IPC::Message& msg) override; + void SendReply(const ReplyMessageContext& context, + const IPC::Message& msg) override; protected: - virtual ~ResourceMessageFilter(); + ~ResourceMessageFilter() override; // Please see the comments of |resource_host_| for on which thread it can be // used and when it is NULL. diff --git a/ppapi/host/resource_message_filter_unittest.cc b/ppapi/host/resource_message_filter_unittest.cc index fbd8de4..59bbc59 100644 --- a/ppapi/host/resource_message_filter_unittest.cc +++ b/ppapi/host/resource_message_filter_unittest.cc @@ -59,9 +59,8 @@ class MyResourceHost : public ResourceHost { AddFilter(filter); } - virtual int32_t OnResourceMessageReceived( - const IPC::Message& msg, - HostMessageContext* context) override { + int32_t OnResourceMessageReceived(const IPC::Message& msg, + HostMessageContext* context) override { last_handled_msg_ = msg; if (msg.type() == msg_type_) { context->reply_msg = IPC::Message(0, reply_msg_type_, @@ -71,8 +70,8 @@ class MyResourceHost : public ResourceHost { return PP_ERROR_FAILED; } - virtual void SendReply(const ReplyMessageContext& context, - const IPC::Message& msg) override { + void SendReply(const ReplyMessageContext& context, + const IPC::Message& msg) override { last_reply_msg_ = msg; last_reply_message_loop_ = base::MessageLoop::current(); g_handler_completion.Signal(); @@ -110,14 +109,14 @@ class MyResourceFilter : public ResourceMessageFilter { const IPC::Message& last_handled_msg() const { return last_handled_msg_; } base::MessageLoop* last_message_loop() const { return last_message_loop_; } - virtual scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( + scoped_refptr<base::TaskRunner> OverrideTaskRunnerForMessage( const IPC::Message& msg) override { if (msg.type() == msg_type_) return message_loop_proxy_; return NULL; } - virtual int32_t OnResourceMessageReceived( + int32_t OnResourceMessageReceived( const IPC::Message& msg, HostMessageContext* context) override { last_handled_msg_ = msg; |