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

Side by Side Diff: Source/web/WebSocketImpl.h

Issue 1328773002: Make classes and structures in web fast-allocated. (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 5 years, 3 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 | « Source/web/WebSharedWorkerImpl.h ('k') | Source/web/WebTextCheckingCompletionImpl.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 /* 1 /*
2 * Copyright (C) 2011, 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2011, 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 19 matching lines...) Expand all
30 30
31 #ifndef WebSocketImpl_h 31 #ifndef WebSocketImpl_h
32 #define WebSocketImpl_h 32 #define WebSocketImpl_h
33 33
34 #include "modules/websockets/WebSocketChannelClient.h" 34 #include "modules/websockets/WebSocketChannelClient.h"
35 #include "platform/heap/Handle.h" 35 #include "platform/heap/Handle.h"
36 #include "public/platform/WebCommon.h" 36 #include "public/platform/WebCommon.h"
37 #include "public/platform/WebString.h" 37 #include "public/platform/WebString.h"
38 #include "public/web/WebSocket.h" 38 #include "public/web/WebSocket.h"
39 #include "public/web/WebSocketClient.h" 39 #include "public/web/WebSocketClient.h"
40 #include "wtf/FastAllocBase.h"
40 #include "wtf/OwnPtr.h" 41 #include "wtf/OwnPtr.h"
41 #include "wtf/RefPtr.h" 42 #include "wtf/RefPtr.h"
42 43
43 namespace blink { 44 namespace blink {
44 45
45 class WebDocument; 46 class WebDocument;
46 class WebSocketChannel; 47 class WebSocketChannel;
47 class WebSocketChannelClientProxy; 48 class WebSocketChannelClientProxy;
48 class WebURL; 49 class WebURL;
49 50
50 class WebSocketImpl final : public WebSocket { 51 class WebSocketImpl final : public WebSocket {
52 WTF_MAKE_FAST_ALLOCATED(WebSocketImpl);
51 public: 53 public:
52 WebSocketImpl(const WebDocument&, WebSocketClient*); 54 WebSocketImpl(const WebDocument&, WebSocketClient*);
53 ~WebSocketImpl() override; 55 ~WebSocketImpl() override;
54 56
55 bool isNull() const { return !m_private; } 57 bool isNull() const { return !m_private; }
56 58
57 BinaryType binaryType() const override; 59 BinaryType binaryType() const override;
58 bool setBinaryType(BinaryType) override; 60 bool setBinaryType(BinaryType) override;
59 void connect(const WebURL&, const WebString& protocol) override; 61 void connect(const WebURL&, const WebString& protocol) override;
60 WebString subprotocol() override; 62 WebString subprotocol() override;
(...skipping 23 matching lines...) Expand all
84 WebString m_extensions; 86 WebString m_extensions;
85 bool m_isClosingOrClosed; 87 bool m_isClosingOrClosed;
86 // m_bufferedAmount includes m_bufferedAmountAfterClose. 88 // m_bufferedAmount includes m_bufferedAmountAfterClose.
87 unsigned long m_bufferedAmount; 89 unsigned long m_bufferedAmount;
88 unsigned long m_bufferedAmountAfterClose; 90 unsigned long m_bufferedAmountAfterClose;
89 }; 91 };
90 92
91 } // namespace blink 93 } // namespace blink
92 94
93 #endif // WebWebSocketChannelImpl_h 95 #endif // WebWebSocketChannelImpl_h
OLDNEW
« no previous file with comments | « Source/web/WebSharedWorkerImpl.h ('k') | Source/web/WebTextCheckingCompletionImpl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698