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

Unified Diff: public/platform/WebRTCKeyType.h

Issue 1311853005: RTCCertificate and RTCPeerConnection.generateCertificate added to JavaScript (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Addressed jochen's comments 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « public/platform/WebRTCConfiguration.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: public/platform/WebRTCKeyType.h
diff --git a/Source/core/layout/compositing/CompositedSelection.h b/public/platform/WebRTCKeyType.h
similarity index 63%
copy from Source/core/layout/compositing/CompositedSelection.h
copy to public/platform/WebRTCKeyType.h
index f265d566c3a28d02a51806706287e0da6a904a44..e93fb3b549f3b60d4925250ffaa1508267ca6dbe 100644
--- a/Source/core/layout/compositing/CompositedSelection.h
+++ b/public/platform/WebRTCKeyType.h
@@ -28,36 +28,41 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef CompositedSelection_h
-#define CompositedSelection_h
-
-#include "core/editing/SelectionType.h"
-#include "core/layout/compositing/CompositedSelectionBound.h"
-#include "platform/geometry/FloatPoint.h"
-#include "platform/graphics/GraphicsLayer.h"
-#include "wtf/Allocator.h"
+#ifndef WebRTCKeyType_h
+#define WebRTCKeyType_h
namespace blink {
-// The active selection region, containing compositing data for the selection
-// end points as well as metadata for the selection region.
-// See |WebSelection|.
-struct CompositedSelection {
- STACK_ALLOCATED();
- CompositedSelection()
- : type(NoSelection)
- , isEditable(false)
- , isEmptyTextFormControl(false)
+// Corresponds to KeyTypeFamily in webrtc.
+enum WebRTCKeyFamily { KeyFamilyRsa, KeyFamilyEcdsa, KeyFamilyLast };
hbos_chromium 2015/09/21 16:12:22 Should even this enum be in its own header?
+
+// Corresponds to KeyType in webrtc.
+class WebRTCKeyType {
+public:
+ static WebRTCKeyType createRSA(int modulusLength = 1024)
+ {
+ return WebRTCKeyType(KeyFamilyRsa, modulusLength);
+ }
+ static WebRTCKeyType createECDSA()
{
+ return WebRTCKeyType(KeyFamilyEcdsa);
}
- SelectionType type;
- CompositedSelectionBound start;
- CompositedSelectionBound end;
- bool isEditable;
- bool isEmptyTextFormControl;
+ explicit WebRTCKeyType(WebRTCKeyFamily family = KeyFamilyRsa)
+ : WebRTCKeyType(family, family == KeyFamilyRsa ? 1024 : 0) {}
+
+ WebRTCKeyFamily family() const { return m_family; }
+
+private:
+ WebRTCKeyType(WebRTCKeyFamily family, int parameter)
+ : m_family(family), m_parameter(parameter) {}
+
+ WebRTCKeyFamily m_family;
+ // For RSA: modulusLength.
+ // For ECDSA: N/A (curve id in the future).
+ int m_parameter;
};
} // namespace blink
-#endif // CompositedSelection_h
+#endif // WebRTCKeyType_h
« no previous file with comments | « public/platform/WebRTCConfiguration.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698