Chromium Code Reviews| 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 |