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

Unified Diff: trunk/src/chrome/browser/extensions/api/messaging/message_service.h

Issue 16336011: Revert 203489 "Replace JSON (de)serialization of extension messa..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 7 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: trunk/src/chrome/browser/extensions/api/messaging/message_service.h
===================================================================
--- trunk/src/chrome/browser/extensions/api/messaging/message_service.h (revision 203729)
+++ trunk/src/chrome/browser/extensions/api/messaging/message_service.h (working copy)
@@ -22,7 +22,6 @@
namespace base {
class DictionaryValue;
-class ListValue;
}
namespace content {
@@ -83,7 +82,7 @@
const std::string& error_message) {}
// Dispatch a message to this end of the communication.
- virtual void DispatchOnMessage(scoped_ptr<base::ListValue> message,
+ virtual void DispatchOnMessage(const std::string& message,
int target_port_id) = 0;
// MessagPorts that target extensions will need to adjust their keepalive
@@ -145,12 +144,12 @@
const std::string& error_message) OVERRIDE;
// Sends a message to the given port.
- void PostMessage(int port_id, scoped_ptr<base::ListValue> message);
+ void PostMessage(int port_id, const std::string& message);
// NativeMessageProcessHost::Client
virtual void PostMessageFromNativeProcess(
int port_id,
- scoped_ptr<base::ListValue> message) OVERRIDE;
+ const std::string& message) OVERRIDE;
private:
friend class MockMessageService;
@@ -206,10 +205,10 @@
CloseChannel(port_id, error_message);
}
void PendingPostMessage(int port_id,
- scoped_ptr<base::ListValue> message,
+ const std::string& message,
extensions::ExtensionHost* host) {
if (host)
- PostMessage(port_id, message.Pass());
+ PostMessage(port_id, message);
}
// ProfileKeyedAPI implementation.

Powered by Google App Engine
This is Rietveld 408576698