Index: content/browser/browser_message_filter_peer.h |
diff --git a/content/browser/browser_message_filter_peer.h b/content/browser/browser_message_filter_peer.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..00d9d70480448c0eb86530387fa0ea0446bf15ff |
--- /dev/null |
+++ b/content/browser/browser_message_filter_peer.h |
@@ -0,0 +1,41 @@ |
+// Copyright (c) 2014 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_BROWSER_BROWSER_MESSAGE_FILTER_PEER_H_ |
+#define CONTENT_BROWSER_BROWSER_MESSAGE_FILTER_PEER_H_ |
+ |
+#include "base/process/process.h" |
+#include "content/common/content_export.h" |
+ |
+#if defined(OS_WIN) |
+#include "base/synchronization/lock.h" |
+#endif |
+ |
+namespace content { |
+ |
+class CONTENT_EXPORT BrowserMessageFilterPeer { |
+ public: |
+ BrowserMessageFilterPeer(); |
+ explicit BrowserMessageFilterPeer(base::ProcessId pid); |
+ |
+ void BadMessageReceived(); |
+ base::ProcessHandle GetHandle(); |
+ |
+ base::ProcessId pid() const { return pid_; } |
+ void set_pid(base::ProcessId pid) { pid_ = pid; } |
+ |
+ private: |
+ base::ProcessId pid_; |
+ |
+#if defined(OS_WIN) |
+ base::Lock handle_lock_; |
+ base::ProcessHandle handle_; |
+#endif |
+ |
+ DISALLOW_COPY_AND_ASSIGN(BrowserMessageFilterPeer); |
+}; |
+ |
+} // namespace content |
+ |
+#endif // CONTENT_BROWSER_BROWSER_MESSAGE_FILTER_PEER_H_ |