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

Side by Side Diff: content/child/webmessageportchannel_impl.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
« no previous file with comments | « content/child/webcrypto/openssl/sha_openssl.cc ('k') | content/child/websocket_dispatcher.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_ 5 #ifndef CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_
6 #define CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_ 6 #define CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 static std::vector<int> ExtractMessagePortIDs( 45 static std::vector<int> ExtractMessagePortIDs(
46 blink::WebMessagePortChannelArray* channels); 46 blink::WebMessagePortChannelArray* channels);
47 47
48 // Queues received and incoming messages until there are no more in-flight 48 // Queues received and incoming messages until there are no more in-flight
49 // messages, then sends all of them to the browser process. 49 // messages, then sends all of them to the browser process.
50 void QueueMessages(); 50 void QueueMessages();
51 int message_port_id() const { return message_port_id_; } 51 int message_port_id() const { return message_port_id_; }
52 52
53 private: 53 private:
54 friend class base::RefCountedThreadSafe<WebMessagePortChannelImpl>; 54 friend class base::RefCountedThreadSafe<WebMessagePortChannelImpl>;
55 virtual ~WebMessagePortChannelImpl(); 55 ~WebMessagePortChannelImpl() override;
56 56
57 // WebMessagePortChannel implementation. 57 // WebMessagePortChannel implementation.
58 virtual void setClient(blink::WebMessagePortChannelClient* client); 58 virtual void setClient(blink::WebMessagePortChannelClient* client);
59 virtual void destroy(); 59 virtual void destroy();
60 virtual void postMessage(const blink::WebString& message, 60 virtual void postMessage(const blink::WebString& message,
61 blink::WebMessagePortChannelArray* channels); 61 blink::WebMessagePortChannelArray* channels);
62 virtual bool tryGetMessage(blink::WebString* message, 62 virtual bool tryGetMessage(blink::WebString* message,
63 blink::WebMessagePortChannelArray& channels); 63 blink::WebMessagePortChannelArray& channels);
64 64
65 void Init(); 65 void Init();
66 void Entangle(scoped_refptr<WebMessagePortChannelImpl> channel); 66 void Entangle(scoped_refptr<WebMessagePortChannelImpl> channel);
67 void Send(IPC::Message* message); 67 void Send(IPC::Message* message);
68 void PostMessage(const base::string16& message, 68 void PostMessage(const base::string16& message,
69 blink::WebMessagePortChannelArray* channels); 69 blink::WebMessagePortChannelArray* channels);
70 70
71 // IPC::Listener implementation. 71 // IPC::Listener implementation.
72 virtual bool OnMessageReceived(const IPC::Message& message) override; 72 bool OnMessageReceived(const IPC::Message& message) override;
73 73
74 void OnMessage(const base::string16& message, 74 void OnMessage(const base::string16& message,
75 const std::vector<int>& sent_message_port_ids, 75 const std::vector<int>& sent_message_port_ids,
76 const std::vector<int>& new_routing_ids); 76 const std::vector<int>& new_routing_ids);
77 void OnMessagesQueued(); 77 void OnMessagesQueued();
78 78
79 struct Message { 79 struct Message {
80 Message(); 80 Message();
81 ~Message(); 81 ~Message();
82 82
(...skipping 10 matching lines...) Expand all
93 int route_id_; // The routing id for this object. 93 int route_id_; // The routing id for this object.
94 int message_port_id_; // A globally unique identifier for this message port. 94 int message_port_id_; // A globally unique identifier for this message port.
95 scoped_refptr<base::MessageLoopProxy> child_thread_loop_; 95 scoped_refptr<base::MessageLoopProxy> child_thread_loop_;
96 96
97 DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl); 97 DISALLOW_COPY_AND_ASSIGN(WebMessagePortChannelImpl);
98 }; 98 };
99 99
100 } // namespace content 100 } // namespace content
101 101
102 #endif // CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_ 102 #endif // CONTENT_CHILD_WEBMESSAGEPORTCHANNEL_IMPL_H_
OLDNEW
« no previous file with comments | « content/child/webcrypto/openssl/sha_openssl.cc ('k') | content/child/websocket_dispatcher.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698