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

Side by Side Diff: Source/modules/websockets/WebSocketChannel.h

Issue 23992003: blob hacking webcore style (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 /* 1 /*
2 * Copyright (C) 2009 Google Inc. All rights reserved. 2 * Copyright (C) 2009 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 21 matching lines...) Expand all
32 #define WebSocketChannel_h 32 #define WebSocketChannel_h
33 33
34 #include "core/frame/ConsoleTypes.h" 34 #include "core/frame/ConsoleTypes.h"
35 #include "wtf/Forward.h" 35 #include "wtf/Forward.h"
36 #include "wtf/Noncopyable.h" 36 #include "wtf/Noncopyable.h"
37 #include "wtf/PassRefPtr.h" 37 #include "wtf/PassRefPtr.h"
38 #include "wtf/text/WTFString.h" 38 #include "wtf/text/WTFString.h"
39 39
40 namespace WebCore { 40 namespace WebCore {
41 41
42 class Blob; 42 class BlobDataHandle;
43 class KURL; 43 class KURL;
44 class ExecutionContext; 44 class ExecutionContext;
45 class WebSocketChannelClient; 45 class WebSocketChannelClient;
46 46
47 class WebSocketChannel { 47 class WebSocketChannel {
48 WTF_MAKE_NONCOPYABLE(WebSocketChannel); 48 WTF_MAKE_NONCOPYABLE(WebSocketChannel);
49 public: 49 public:
50 WebSocketChannel() { } 50 WebSocketChannel() { }
51 static PassRefPtr<WebSocketChannel> create(ExecutionContext*, WebSocketChann elClient*); 51 static PassRefPtr<WebSocketChannel> create(ExecutionContext*, WebSocketChann elClient*);
52 52
(...skipping 20 matching lines...) Expand all
73 CloseEventCodeTLSHandshake = 1015, 73 CloseEventCodeTLSHandshake = 1015,
74 CloseEventCodeMinimumUserDefined = 3000, 74 CloseEventCodeMinimumUserDefined = 3000,
75 CloseEventCodeMaximumUserDefined = 4999 75 CloseEventCodeMaximumUserDefined = 4999
76 }; 76 };
77 77
78 virtual void connect(const KURL&, const String& protocol) = 0; 78 virtual void connect(const KURL&, const String& protocol) = 0;
79 virtual String subprotocol() = 0; // Will be available after didConnect() ca llback is invoked. 79 virtual String subprotocol() = 0; // Will be available after didConnect() ca llback is invoked.
80 virtual String extensions() = 0; // Will be available after didConnect() cal lback is invoked. 80 virtual String extensions() = 0; // Will be available after didConnect() cal lback is invoked.
81 virtual SendResult send(const String& message) = 0; 81 virtual SendResult send(const String& message) = 0;
82 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by teLength) = 0; 82 virtual SendResult send(const ArrayBuffer&, unsigned byteOffset, unsigned by teLength) = 0;
83 virtual SendResult send(const Blob&) = 0; 83 virtual SendResult send(PassRefPtr<BlobDataHandle>) = 0;
84 virtual unsigned long bufferedAmount() const = 0; 84 virtual unsigned long bufferedAmount() const = 0;
85 virtual void close(int code, const String& reason) = 0; 85 virtual void close(int code, const String& reason) = 0;
86 86
87 // Log the reason text and close the connection. Will call didClose(). 87 // Log the reason text and close the connection. Will call didClose().
88 // The MessageLevel parameter will be used for the level of the message 88 // The MessageLevel parameter will be used for the level of the message
89 // shown at the devtool console. 89 // shown at the devtool console.
90 // sourceURL and lineNumber parameters may be shown with the reason text 90 // sourceURL and lineNumber parameters may be shown with the reason text
91 // at the devtool console. 91 // at the devtool console.
92 // Even if sourceURL and lineNumber are specified, they may be ignored 92 // Even if sourceURL and lineNumber are specified, they may be ignored
93 // and the "current" url and the line number in the sense of 93 // and the "current" url and the line number in the sense of
(...skipping 14 matching lines...) Expand all
108 108
109 protected: 109 protected:
110 virtual ~WebSocketChannel() { } 110 virtual ~WebSocketChannel() { }
111 virtual void refWebSocketChannel() = 0; 111 virtual void refWebSocketChannel() = 0;
112 virtual void derefWebSocketChannel() = 0; 112 virtual void derefWebSocketChannel() = 0;
113 }; 113 };
114 114
115 } // namespace WebCore 115 } // namespace WebCore
116 116
117 #endif // WebSocketChannel_h 117 #endif // WebSocketChannel_h
OLDNEW
« no previous file with comments | « Source/modules/websockets/WebSocket.cpp ('k') | Source/modules/websockets/WorkerThreadableWebSocketChannel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698