[Android WebView] Fix webview perf bot switchover to use org.chromium.webview_shell...
[chromium-blink-merge.git] / content / child / navigator_connect / navigator_connect_dispatcher.cc
blobee5bc3e5c61899fb9ba723c7ff9f0eb848e2e7fd
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "content/child/navigator_connect/navigator_connect_dispatcher.h"
7 #include "content/child/navigator_connect/navigator_connect_provider.h"
8 #include "content/common/navigator_connect_messages.h"
10 namespace content {
12 NavigatorConnectDispatcher::NavigatorConnectDispatcher(ThreadSafeSender* sender)
13 : WorkerThreadMessageFilter(sender) {
16 NavigatorConnectDispatcher::~NavigatorConnectDispatcher() {
19 bool NavigatorConnectDispatcher::ShouldHandleMessage(
20 const IPC::Message& msg) const {
21 return IPC_MESSAGE_CLASS(msg) == NavigatorConnectMsgStart;
24 void NavigatorConnectDispatcher::OnFilteredMessageReceived(
25 const IPC::Message& msg) {
26 NavigatorConnectProvider::ThreadSpecificInstance(
27 thread_safe_sender(), main_thread_task_runner())->OnMessageReceived(msg);
30 bool NavigatorConnectDispatcher::GetWorkerThreadIdForMessage(
31 const IPC::Message& msg,
32 int* ipc_thread_id) {
33 return base::PickleIterator(msg).ReadInt(ipc_thread_id);
36 } // namespace content