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

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

Issue 222153002: Disallow connecting an insecure WebSocket from a secure page. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebase Created 6 years, 8 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 | Annotate | Revision Log
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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after
68 CloseEventCodeInvalidFramePayloadData = 1007, 68 CloseEventCodeInvalidFramePayloadData = 1007,
69 CloseEventCodePolicyViolation = 1008, 69 CloseEventCodePolicyViolation = 1008,
70 CloseEventCodeMessageTooBig = 1009, 70 CloseEventCodeMessageTooBig = 1009,
71 CloseEventCodeMandatoryExt = 1010, 71 CloseEventCodeMandatoryExt = 1010,
72 CloseEventCodeInternalError = 1011, 72 CloseEventCodeInternalError = 1011,
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 bool 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(PassRefPtr<BlobDataHandle>) = 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
(...skipping 19 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