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

Side by Side Diff: content/child/navigator_connect/navigator_connect_dispatcher.cc

Issue 1192713004: Update client side navigator.connect API to use ServicePortCollection [2/3] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 5 years, 5 months 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 unified diff | Download patch
OLDNEW
(Empty)
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.
4
5 #include "content/child/navigator_connect/navigator_connect_dispatcher.h"
6
7 #include "content/child/navigator_connect/navigator_connect_provider.h"
8 #include "content/common/navigator_connect_messages.h"
9
10 namespace content {
11
12 NavigatorConnectDispatcher::NavigatorConnectDispatcher(ThreadSafeSender* sender)
13 : WorkerThreadMessageFilter(sender) {
14 }
15
16 NavigatorConnectDispatcher::~NavigatorConnectDispatcher() {
17 }
18
19 bool NavigatorConnectDispatcher::ShouldHandleMessage(
20 const IPC::Message& msg) const {
21 return IPC_MESSAGE_CLASS(msg) == NavigatorConnectMsgStart;
22 }
23
24 void NavigatorConnectDispatcher::OnFilteredMessageReceived(
25 const IPC::Message& msg) {
26 NavigatorConnectProvider::ThreadSpecificInstance(
27 thread_safe_sender(), main_thread_task_runner())->OnMessageReceived(msg);
28 }
29
30 bool NavigatorConnectDispatcher::GetWorkerThreadIdForMessage(
31 const IPC::Message& msg,
32 int* ipc_thread_id) {
33 return base::PickleIterator(msg).ReadInt(ipc_thread_id);
34 }
35
36 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698