 Chromium Code Reviews
 Chromium Code Reviews Issue 634483003:
  replace OVERRIDE and FINAL with override and final in mojo/  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 634483003:
  replace OVERRIDE and FINAL with override and final in mojo/  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| OLD | NEW | 
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 MOJO_SERVICES_NETWORK_WEB_SOCKET_IMPL_H_ | 5 #ifndef MOJO_SERVICES_NETWORK_WEB_SOCKET_IMPL_H_ | 
| 6 #define MOJO_SERVICES_NETWORK_WEB_SOCKET_IMPL_H_ | 6 #define MOJO_SERVICES_NETWORK_WEB_SOCKET_IMPL_H_ | 
| 7 | 7 | 
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" | 
| 
viettrungluu
2014/10/06 16:12:21
"
 
Mostyn Bramley-Moore
2014/10/06 17:13:34
Done.
 | |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" | 
| 10 #include "mojo/public/cpp/bindings/interface_impl.h" | 10 #include "mojo/public/cpp/bindings/interface_impl.h" | 
| 11 #include "mojo/services/public/interfaces/network/web_socket.mojom.h" | 11 #include "mojo/services/public/interfaces/network/web_socket.mojom.h" | 
| 12 | 12 | 
| 13 namespace net { | 13 namespace net { | 
| 14 class WebSocketChannel; | 14 class WebSocketChannel; | 
| 15 } // namespace net | 15 } // namespace net | 
| 16 | 16 | 
| 17 namespace mojo { | 17 namespace mojo { | 
| 18 class NetworkContext; | 18 class NetworkContext; | 
| 19 class WebSocketReadQueue; | 19 class WebSocketReadQueue; | 
| 20 | 20 | 
| 21 // Forms a bridge between the WebSocket mojo interface and the net::WebSocket | 21 // Forms a bridge between the WebSocket mojo interface and the net::WebSocket | 
| 22 // implementation. | 22 // implementation. | 
| 23 class WebSocketImpl : public InterfaceImpl<WebSocket> { | 23 class WebSocketImpl : public InterfaceImpl<WebSocket> { | 
| 24 public: | 24 public: | 
| 25 explicit WebSocketImpl(NetworkContext* context); | 25 explicit WebSocketImpl(NetworkContext* context); | 
| 26 virtual ~WebSocketImpl(); | 26 virtual ~WebSocketImpl(); | 
| 27 | 27 | 
| 28 private: | 28 private: | 
| 29 // WebSocket methods: | 29 // WebSocket methods: | 
| 30 virtual void Connect(const String& url, | 30 virtual void Connect(const String& url, | 
| 31 Array<String> protocols, | 31 Array<String> protocols, | 
| 32 const String& origin, | 32 const String& origin, | 
| 33 ScopedDataPipeConsumerHandle send_stream, | 33 ScopedDataPipeConsumerHandle send_stream, | 
| 34 WebSocketClientPtr client) OVERRIDE; | 34 WebSocketClientPtr client) override; | 
| 35 virtual void Send(bool fin, | 35 virtual void Send(bool fin, | 
| 36 WebSocket::MessageType type, | 36 WebSocket::MessageType type, | 
| 37 uint32_t num_bytes) OVERRIDE; | 37 uint32_t num_bytes) override; | 
| 38 virtual void FlowControl(int64_t quota) OVERRIDE; | 38 virtual void FlowControl(int64_t quota) override; | 
| 39 virtual void Close(uint16_t code, const String& reason) OVERRIDE; | 39 virtual void Close(uint16_t code, const String& reason) override; | 
| 40 | 40 | 
| 41 // Called with the data to send once it has been read from |send_stream_|. | 41 // Called with the data to send once it has been read from |send_stream_|. | 
| 42 void DidReadFromSendStream(bool fin, | 42 void DidReadFromSendStream(bool fin, | 
| 43 WebSocket::MessageType type, | 43 WebSocket::MessageType type, | 
| 44 uint32_t num_bytes, | 44 uint32_t num_bytes, | 
| 45 const char* data); | 45 const char* data); | 
| 46 | 46 | 
| 47 // The channel we use to send events to the network. | 47 // The channel we use to send events to the network. | 
| 48 scoped_ptr<net::WebSocketChannel> channel_; | 48 scoped_ptr<net::WebSocketChannel> channel_; | 
| 49 ScopedDataPipeConsumerHandle send_stream_; | 49 ScopedDataPipeConsumerHandle send_stream_; | 
| 50 scoped_ptr<WebSocketReadQueue> read_queue_; | 50 scoped_ptr<WebSocketReadQueue> read_queue_; | 
| 51 NetworkContext* context_; | 51 NetworkContext* context_; | 
| 52 }; | 52 }; | 
| 53 | 53 | 
| 54 } // namespace mojo | 54 } // namespace mojo | 
| 55 | 55 | 
| 56 #endif // MOJO_SERVICES_NETWORK_WEB_SOCKET_IMPL_H_ | 56 #endif // MOJO_SERVICES_NETWORK_WEB_SOCKET_IMPL_H_ | 
| OLD | NEW |