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

Unified Diff: content/public/common/socket_permission_request.h

Issue 10993078: Use extensions socket permission for TCP/UDP socket APIs in Pepper (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixed Android build Created 8 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 side-by-side diff with in-line comments
Download patch
Index: content/public/common/socket_permission_request.h
diff --git a/content/public/common/socket_permission_request.h b/content/public/common/socket_permission_request.h
new file mode 100644
index 0000000000000000000000000000000000000000..2743eebc6644500c96bb6662d3c921c71ebb0cb9
--- /dev/null
+++ b/content/public/common/socket_permission_request.h
@@ -0,0 +1,38 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_PUBLIC_COMMON_SOCKET_PERMISSION_REQUEST_H_
+#define CONTENT_PUBLIC_COMMON_SOCKET_PERMISSION_REQUEST_H_
+
+#include <string>
+
+namespace content {
+
+// This module provides helper types for checking socket permission.
+
+struct SocketPermissionRequest {
+ enum OperationType {
+ NONE = 0,
+ TCP_CONNECT,
+ TCP_LISTEN,
+ UDP_BIND,
+ UDP_SEND_TO,
+ };
+
+ SocketPermissionRequest(OperationType type,
+ const std::string& host,
+ int port)
+ : type(type),
+ host(host),
+ port(port) {
+ }
+
+ OperationType type;
+ std::string host;
+ int port;
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_COMMON_SOCKET_PERMISSION_REQUEST_H_
« no previous file with comments | « content/public/browser/content_browser_client.cc ('k') | content/renderer/pepper/pepper_plugin_delegate_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698