summaryrefslogtreecommitdiff
path: root/chromium/content/child/bluetooth/bluetooth_message_filter.cc
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@theqtcompany.com>2015-06-18 14:10:49 +0200
committerOswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>2015-06-18 13:53:24 +0000
commit813fbf95af77a531c57a8c497345ad2c61d475b3 (patch)
tree821b2c8de8365f21b6c9ba17a236fb3006a1d506 /chromium/content/child/bluetooth/bluetooth_message_filter.cc
parentaf6588f8d723931a298c995fa97259bb7f7deb55 (diff)
downloadqtwebengine-chromium-813fbf95af77a531c57a8c497345ad2c61d475b3.tar.gz
BASELINE: Update chromium to 44.0.2403.47
Change-Id: Ie056fedba95cf5e5c76b30c4b2c80fca4764aa2f Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Diffstat (limited to 'chromium/content/child/bluetooth/bluetooth_message_filter.cc')
-rw-r--r--chromium/content/child/bluetooth/bluetooth_message_filter.cc37
1 files changed, 37 insertions, 0 deletions
diff --git a/chromium/content/child/bluetooth/bluetooth_message_filter.cc b/chromium/content/child/bluetooth/bluetooth_message_filter.cc
new file mode 100644
index 00000000000..554e3c30711
--- /dev/null
+++ b/chromium/content/child/bluetooth/bluetooth_message_filter.cc
@@ -0,0 +1,37 @@
+// Copyright 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.
+
+#include "content/child/bluetooth/bluetooth_message_filter.h"
+
+#include "content/child/bluetooth/bluetooth_dispatcher.h"
+#include "content/child/thread_safe_sender.h"
+#include "ipc/ipc_message_macros.h"
+
+namespace content {
+
+BluetoothMessageFilter::BluetoothMessageFilter(ThreadSafeSender* sender)
+ : WorkerThreadMessageFilter(sender) {
+}
+
+BluetoothMessageFilter::~BluetoothMessageFilter() {
+}
+
+bool BluetoothMessageFilter::ShouldHandleMessage(
+ const IPC::Message& msg) const {
+ return IPC_MESSAGE_CLASS(msg) == BluetoothMsgStart;
+}
+
+void BluetoothMessageFilter::OnFilteredMessageReceived(
+ const IPC::Message& msg) {
+ BluetoothDispatcher::GetOrCreateThreadSpecificInstance(thread_safe_sender())
+ ->OnMessageReceived(msg);
+}
+
+bool BluetoothMessageFilter::GetWorkerThreadIdForMessage(
+ const IPC::Message& msg,
+ int* ipc_thread_id) {
+ return PickleIterator(msg).ReadInt(ipc_thread_id);
+}
+
+} // namespace content