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

Side by Side Diff: chrome/browser/automation/automation_extension_function.cc

Issue 251093: Modify extension request IPC messages to pass a ListValue instead of a string. (Closed)
Patch Set: notreached messages Created 11 years, 2 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Implements AutomationExtensionFunction. 5 // Implements AutomationExtensionFunction.
6 6
7 #include "chrome/browser/automation/automation_extension_function.h" 7 #include "chrome/browser/automation/automation_extension_function.h"
8 8
9 #include "base/json_reader.h" 9 #include "base/json_reader.h"
10 #include "base/json_writer.h" 10 #include "base/json_writer.h"
11 #include "chrome/browser/automation/extension_automation_constants.h" 11 #include "chrome/browser/automation/extension_automation_constants.h"
12 #include "chrome/browser/extensions/extension_function_dispatcher.h" 12 #include "chrome/browser/extensions/extension_function_dispatcher.h"
13 #include "chrome/browser/renderer_host/render_view_host.h" 13 #include "chrome/browser/renderer_host/render_view_host.h"
14 14
15 bool AutomationExtensionFunction::enabled_ = false; 15 bool AutomationExtensionFunction::enabled_ = false;
16 16
17 void AutomationExtensionFunction::SetArgs(const std::string& args) { 17 void AutomationExtensionFunction::SetArgs(const Value* args) {
18 args_ = args; 18 JSONWriter::Write(args, false, &args_);
19 } 19 }
20 20
21 const std::string AutomationExtensionFunction::GetResult() { 21 const std::string AutomationExtensionFunction::GetResult() {
22 // Our API result passing is done through InterceptMessageFromExternalHost 22 // Our API result passing is done through InterceptMessageFromExternalHost
23 return ""; 23 return "";
24 } 24 }
25 25
26 const std::string AutomationExtensionFunction::GetError() { 26 const std::string AutomationExtensionFunction::GetError() {
27 // Our API result passing is done through InterceptMessageFromExternalHost 27 // Our API result passing is done through InterceptMessageFromExternalHost
28 return ""; 28 return "";
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 // functions, we should use that instead. 105 // functions, we should use that instead.
106 view_host->SendExtensionResponse(request_id, success, 106 view_host->SendExtensionResponse(request_id, success,
107 response, error); 107 response, error);
108 return true; 108 return true;
109 } 109 }
110 } 110 }
111 } 111 }
112 112
113 return false; 113 return false;
114 } 114 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_extension_function.h ('k') | chrome/browser/dom_ui/dom_ui.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698