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

Unified Diff: content/browser/nav_controller/nav_controller_dispatcher_host.cc

Issue 23615009: Stub out initial NavigationController browser implementation (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Add comments, s/peer/registry/ now that blink side is settled Created 7 years, 3 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 side-by-side diff with in-line comments
Download patch
Index: content/browser/nav_controller/nav_controller_dispatcher_host.cc
diff --git a/content/browser/nav_controller/nav_controller_dispatcher_host.cc b/content/browser/nav_controller/nav_controller_dispatcher_host.cc
new file mode 100644
index 0000000000000000000000000000000000000000..0bd0c0f70dcc0f3863b6d35551346a88a129a2ee
--- /dev/null
+++ b/content/browser/nav_controller/nav_controller_dispatcher_host.cc
@@ -0,0 +1,48 @@
+// Copyright 2013 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/browser/nav_controller/nav_controller_dispatcher_host.h"
+
+#include "content/browser/nav_controller/nav_controller_context.h"
+#include "content/common/nav_controller/nav_controller_messages.h"
+#include "ipc/ipc_message_macros.h"
+#include "url/gurl.h"
+
+namespace content {
+
+NavControllerDispatcherHost::NavControllerDispatcherHost(
+ NavControllerContext* context)
+ : context_(context) {}
+
+NavControllerDispatcherHost::~NavControllerDispatcherHost() {}
+
+bool NavControllerDispatcherHost::OnMessageReceived(const IPC::Message& message,
+ bool* message_was_ok) {
+
+ if (IPC_MESSAGE_CLASS(message) != NavControllerMsgStart)
+ return false;
+
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP_EX(
+ NavControllerDispatcherHost, message, *message_was_ok)
+ IPC_MESSAGE_HANDLER(NavControllerHostMsg_RegisterController,
+ OnRegisterController)
+ IPC_MESSAGE_HANDLER(NavControllerHostMsg_UnregisterController,
+ OnUnregisterController)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+
+ return handled;
+}
+
+void NavControllerDispatcherHost::OnRegisterController(int32 registry_id,
+ const string16& scope,
+ const GURL& script_url) {
+}
Tom Sepez 2013/09/13 21:48:34 Are there constraints on what the script_url can b
michaeln 2013/09/13 22:00:02 Actually this is a good example of why it's useful
+
+void NavControllerDispatcherHost::OnUnregisterController(
+ int32 registry_id,
+ const string16& scope) {}
+
+} // namespace content

Powered by Google App Engine
This is Rietveld 408576698