Index: content/shell/browser/layout_test/layout_test_message_filter.cc |
diff --git a/content/shell/browser/layout_test/layout_test_message_filter.cc b/content/shell/browser/layout_test/layout_test_message_filter.cc |
index dd09baa22a2d3cd67c4caa466782fae17739f00e..ed8360b55aa353a3a07eeda257e89d0c0edeac4a 100644 |
--- a/content/shell/browser/layout_test/layout_test_message_filter.cc |
+++ b/content/shell/browser/layout_test/layout_test_message_filter.cc |
@@ -8,6 +8,7 @@ |
#include "base/threading/thread_restrictions.h" |
#include "content/public/browser/child_process_security_policy.h" |
#include "content/public/browser/permission_type.h" |
+#include "content/public/test/layouttest_support.h" |
#include "content/shell/browser/layout_test/layout_test_browser_context.h" |
#include "content/shell/browser/layout_test/layout_test_content_browser_client.h" |
#include "content/shell/browser/layout_test/layout_test_notification_manager.h" |
@@ -47,7 +48,8 @@ void LayoutTestMessageFilter::OverrideThreadForMessage( |
*thread = BrowserThread::FILE; |
if (message.type() == LayoutTestHostMsg_SimulateWebNotificationClick::ID || |
message.type() == LayoutTestHostMsg_SetPermission::ID || |
- message.type() == LayoutTestHostMsg_ResetPermissions::ID) |
+ message.type() == LayoutTestHostMsg_ResetPermissions::ID || |
+ message.type() == LayoutTestHostMsg_SetBluetoothAdapter::ID) |
*thread = BrowserThread::UI; |
} |
@@ -66,6 +68,8 @@ bool LayoutTestMessageFilter::OnMessageReceived(const IPC::Message& message) { |
IPC_MESSAGE_HANDLER(LayoutTestHostMsg_DeleteAllCookies, OnDeleteAllCookies) |
IPC_MESSAGE_HANDLER(LayoutTestHostMsg_SetPermission, OnSetPermission) |
IPC_MESSAGE_HANDLER(LayoutTestHostMsg_ResetPermissions, OnResetPermissions) |
+ IPC_MESSAGE_HANDLER(LayoutTestHostMsg_SetBluetoothAdapter, |
+ OnSetBluetoothAdapter) |
IPC_MESSAGE_UNHANDLED(handled = false) |
IPC_END_MESSAGE_MAP() |
@@ -161,4 +165,10 @@ void LayoutTestMessageFilter::OnResetPermissions() { |
->ResetPermissions(); |
} |
+void LayoutTestMessageFilter::OnSetBluetoothAdapter(const std::string& name) { |
+ DCHECK_CURRENTLY_ON(BrowserThread::UI); |
+ // TODO(ortuno): Create mock adapter here. See http://crrev.com/1132943002 |
+ SetBluetoothAdapter(render_process_id_, name); |
+} |
+ |
} // namespace content |