summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/notifications/balloon_view_host.cc
diff options
context:
space:
mode:
Diffstat (limited to 'chrome/browser/chromeos/notifications/balloon_view_host.cc')
-rw-r--r--chrome/browser/chromeos/notifications/balloon_view_host.cc23
1 files changed, 17 insertions, 6 deletions
diff --git a/chrome/browser/chromeos/notifications/balloon_view_host.cc b/chrome/browser/chromeos/notifications/balloon_view_host.cc
index 1e9be4f..a341f18 100644
--- a/chrome/browser/chromeos/notifications/balloon_view_host.cc
+++ b/chrome/browser/chromeos/notifications/balloon_view_host.cc
@@ -7,6 +7,9 @@
#include "base/stl_util-inl.h"
#include "base/values.h"
#include "chrome/common/extensions/extension_messages.h"
+#include "content/common/view_messages.h"
+#include "ipc/ipc_message.h"
+#include "ipc/ipc_message_macros.h"
namespace chromeos {
@@ -15,6 +18,15 @@ BalloonViewHost::~BalloonViewHost() {
message_callbacks_.end());
}
+bool BalloonViewHost::OnMessageReceived(const IPC::Message& message) {
+ bool handled = true;
+ IPC_BEGIN_MESSAGE_MAP(BalloonViewHost, message)
+ IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
+ IPC_MESSAGE_UNHANDLED(handled = false)
+ IPC_END_MESSAGE_MAP()
+ return handled;
+}
+
bool BalloonViewHost::AddWebUIMessageCallback(
const std::string& message,
MessageCallback* callback) {
@@ -25,18 +37,17 @@ bool BalloonViewHost::AddWebUIMessageCallback(
return ret.second;
}
-void BalloonViewHost::ProcessWebUIMessage(
- const ExtensionHostMsg_DomMessage_Params& params) {
- ::BalloonViewHost::ProcessWebUIMessage(params);
-
+void BalloonViewHost::OnWebUISend(const GURL& source_url,
+ const std::string& name,
+ const ListValue& args) {
// Look up the callback for this message.
MessageCallbackMap::const_iterator callback =
- message_callbacks_.find(params.name);
+ message_callbacks_.find(name);
if (callback == message_callbacks_.end())
return;
// Run callback.
- callback->second->Run(&params.arguments);
+ callback->second->Run(&args);
}
} // namespace chromeos