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

Unified Diff: content/child/navigator_connect/navigator_connect_dispatcher.cc

Issue 781723002: Pass navigator.connect calls through to the browser process. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address comments Created 6 years 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 side-by-side diff with in-line comments
Download patch
Index: content/child/navigator_connect/navigator_connect_dispatcher.cc
diff --git a/content/child/geofencing/geofencing_message_filter.cc b/content/child/navigator_connect/navigator_connect_dispatcher.cc
similarity index 52%
copy from content/child/geofencing/geofencing_message_filter.cc
copy to content/child/navigator_connect/navigator_connect_dispatcher.cc
index a8334571d5b4f20eb6ca13f3724c760680ddd31b..f97356b92b6205d48226ff4a611592cf72b0ab8e 100644
--- a/content/child/geofencing/geofencing_message_filter.cc
+++ b/content/child/navigator_connect/navigator_connect_dispatcher.cc
@@ -2,27 +2,27 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "content/child/geofencing/geofencing_message_filter.h"
+#include "content/child/navigator_connect/navigator_connect_dispatcher.h"
#include "base/message_loop/message_loop_proxy.h"
-#include "content/child/geofencing/geofencing_dispatcher.h"
+#include "content/child/navigator_connect/navigator_connect_provider.h"
#include "content/child/thread_safe_sender.h"
#include "content/child/worker_thread_task_runner.h"
-#include "ipc/ipc_message_macros.h"
+#include "content/common/navigator_connect_messages.h"
namespace content {
-GeofencingMessageFilter::GeofencingMessageFilter(ThreadSafeSender* sender)
+NavigatorConnectDispatcher::NavigatorConnectDispatcher(ThreadSafeSender* sender)
: main_thread_loop_proxy_(base::MessageLoopProxy::current()),
thread_safe_sender_(sender) {
}
-GeofencingMessageFilter::~GeofencingMessageFilter() {
+NavigatorConnectDispatcher::~NavigatorConnectDispatcher() {
}
-base::TaskRunner* GeofencingMessageFilter::OverrideTaskRunnerForMessage(
+base::TaskRunner* NavigatorConnectDispatcher::OverrideTaskRunnerForMessage(
const IPC::Message& msg) {
- if (IPC_MESSAGE_CLASS(msg) != GeofencingMsgStart)
+ if (IPC_MESSAGE_CLASS(msg) != NavigatorConnectMsgStart)
return NULL;
int ipc_thread_id = 0;
const bool success = PickleIterator(msg).ReadInt(&ipc_thread_id);
@@ -32,11 +32,11 @@ base::TaskRunner* GeofencingMessageFilter::OverrideTaskRunnerForMessage(
return new WorkerThreadTaskRunner(ipc_thread_id);
}
-bool GeofencingMessageFilter::OnMessageReceived(const IPC::Message& msg) {
- if (IPC_MESSAGE_CLASS(msg) != GeofencingMsgStart)
+bool NavigatorConnectDispatcher::OnMessageReceived(const IPC::Message& msg) {
+ if (IPC_MESSAGE_CLASS(msg) != NavigatorConnectMsgStart)
return false;
- GeofencingDispatcher::GetOrCreateThreadSpecificInstance(
- thread_safe_sender_.get())->OnMessageReceived(msg);
+ NavigatorConnectProvider::ThreadSpecificInstance(thread_safe_sender_.get())
+ ->OnMessageReceived(msg);
return true;
}

Powered by Google App Engine
This is Rietveld 408576698