diff options
author | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 18:15:58 +0000 |
---|---|---|
committer | mpcomplete@chromium.org <mpcomplete@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-10-06 18:15:58 +0000 |
commit | e4dad9fbf5a48cb65d085e49c8f7917c8f31300b (patch) | |
tree | 3df910ad37afd8d633f16cc47d0f4b46f6647fbf /chrome/browser/dom_ui/dom_ui.cc | |
parent | 2a3e3c054891c865540524beb4af96ec68c481ba (diff) | |
download | chromium_src-e4dad9fbf5a48cb65d085e49c8f7917c8f31300b.zip chromium_src-e4dad9fbf5a48cb65d085e49c8f7917c8f31300b.tar.gz chromium_src-e4dad9fbf5a48cb65d085e49c8f7917c8f31300b.tar.bz2 |
Modify extension request IPC messages to pass a ListValue instead of a string.
This allows us to pass binary values through extension requests. I use this in
my next CL to pass SkBitmaps.
BUG=23269
TEST=no
Review URL: http://codereview.chromium.org/251093
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@28130 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/dom_ui/dom_ui.cc')
-rw-r--r-- | chrome/browser/dom_ui/dom_ui.cc | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/chrome/browser/dom_ui/dom_ui.cc b/chrome/browser/dom_ui/dom_ui.cc index 2088427..7f38aef 100644 --- a/chrome/browser/dom_ui/dom_ui.cc +++ b/chrome/browser/dom_ui/dom_ui.cc @@ -35,7 +35,7 @@ DOMUI::~DOMUI() { // DOMUI, public: ------------------------------------------------------------- void DOMUI::ProcessDOMUIMessage(const std::string& message, - const std::string& content, + const Value* content, int request_id, bool has_callback) { // Look up the callback for this message. @@ -44,20 +44,8 @@ void DOMUI::ProcessDOMUIMessage(const std::string& message, if (callback == message_callbacks_.end()) return; - // Convert the content JSON into a Value. - scoped_ptr<Value> value; - if (!content.empty()) { - value.reset(JSONReader::Read(content, false)); - if (!value.get()) { - // The page sent us something that we didn't understand. - // This probably indicates a programming error. - NOTREACHED(); - return; - } - } - // Forward this message and content on. - callback->second->Run(value.get()); + callback->second->Run(content); } void DOMUI::CallJavascriptFunction(const std::wstring& function_name) { |