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

Side by Side Diff: Source/platform/network/SocketStreamHandleInternal.h

Issue 61773005: Rename WebKit namespace to blink (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 7 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « Source/platform/network/SocketStreamHandle.cpp ('k') | Source/platform/plugins/PluginData.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 18 matching lines...) Expand all
29 */ 29 */
30 30
31 #ifndef SocketStreamHandleInternal_h 31 #ifndef SocketStreamHandleInternal_h
32 #define SocketStreamHandleInternal_h 32 #define SocketStreamHandleInternal_h
33 33
34 #include "platform/network/SocketStreamHandle.h" 34 #include "platform/network/SocketStreamHandle.h"
35 #include "public/platform/WebSocketStreamHandleClient.h" 35 #include "public/platform/WebSocketStreamHandleClient.h"
36 #include "public/platform/WebURL.h" 36 #include "public/platform/WebURL.h"
37 #include "wtf/PassOwnPtr.h" 37 #include "wtf/PassOwnPtr.h"
38 38
39 namespace WebKit { 39 namespace blink {
40 class WebData; 40 class WebData;
41 class WebSocketStreamError; 41 class WebSocketStreamError;
42 class WebSocketStreamHandle; 42 class WebSocketStreamHandle;
43 } 43 }
44 44
45 namespace WebCore { 45 namespace WebCore {
46 46
47 class PLATFORM_EXPORT SocketStreamHandleInternal : public WebKit::WebSocketStrea mHandleClient { 47 class PLATFORM_EXPORT SocketStreamHandleInternal : public blink::WebSocketStream HandleClient {
48 WTF_MAKE_NONCOPYABLE(SocketStreamHandleInternal); 48 WTF_MAKE_NONCOPYABLE(SocketStreamHandleInternal);
49 public: 49 public:
50 static PassOwnPtr<SocketStreamHandleInternal> create(SocketStreamHandle* han dle) 50 static PassOwnPtr<SocketStreamHandleInternal> create(SocketStreamHandle* han dle)
51 { 51 {
52 return adoptPtr(new SocketStreamHandleInternal(handle)); 52 return adoptPtr(new SocketStreamHandleInternal(handle));
53 } 53 }
54 virtual ~SocketStreamHandleInternal(); 54 virtual ~SocketStreamHandleInternal();
55 55
56 void connect(const KURL&); 56 void connect(const KURL&);
57 int send(const char*, int); 57 int send(const char*, int);
58 void close(); 58 void close();
59 59
60 virtual void didOpenStream(WebKit::WebSocketStreamHandle*, int); 60 virtual void didOpenStream(blink::WebSocketStreamHandle*, int);
61 virtual void didSendData(WebKit::WebSocketStreamHandle*, int); 61 virtual void didSendData(blink::WebSocketStreamHandle*, int);
62 virtual void didReceiveData(WebKit::WebSocketStreamHandle*, const WebKit::We bData&); 62 virtual void didReceiveData(blink::WebSocketStreamHandle*, const blink::WebD ata&);
63 virtual void didClose(WebKit::WebSocketStreamHandle*); 63 virtual void didClose(blink::WebSocketStreamHandle*);
64 virtual void didFail(WebKit::WebSocketStreamHandle*, const WebKit::WebSocket StreamError&); 64 virtual void didFail(blink::WebSocketStreamHandle*, const blink::WebSocketSt reamError&);
65 65
66 static WebKit::WebSocketStreamHandle* toWebSocketStreamHandle(SocketStreamHa ndle* handle) 66 static blink::WebSocketStreamHandle* toWebSocketStreamHandle(SocketStreamHan dle* handle)
67 { 67 {
68 if (handle && handle->m_internal) 68 if (handle && handle->m_internal)
69 return handle->m_internal->m_socket.get(); 69 return handle->m_internal->m_socket.get();
70 return 0; 70 return 0;
71 } 71 }
72 72
73 private: 73 private:
74 explicit SocketStreamHandleInternal(SocketStreamHandle*); 74 explicit SocketStreamHandleInternal(SocketStreamHandle*);
75 75
76 SocketStreamHandle* m_handle; 76 SocketStreamHandle* m_handle;
77 OwnPtr<WebKit::WebSocketStreamHandle> m_socket; 77 OwnPtr<blink::WebSocketStreamHandle> m_socket;
78 int m_maxPendingSendAllowed; 78 int m_maxPendingSendAllowed;
79 int m_pendingAmountSent; 79 int m_pendingAmountSent;
80 }; 80 };
81 81
82 } // namespace WebCore 82 } // namespace WebCore
83 83
84 #endif // SocketStreamHandleInternal_h 84 #endif // SocketStreamHandleInternal_h
OLDNEW
« no previous file with comments | « Source/platform/network/SocketStreamHandle.cpp ('k') | Source/platform/plugins/PluginData.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698