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

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

Issue 3412016: FBTF: Move a bunch of code to the headers and remove includes. (Closed) Base URL: http://src.chromium.org/git/chromium.git
Patch Set: Rebase + fixed windows issues locally Created 10 years, 3 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/json_reader.h" 9 #include "base/json/json_reader.h"
10 #include "base/json/json_writer.h" 10 #include "base/json/json_writer.h"
11 #include "base/values.h" 11 #include "base/values.h"
12 #include "chrome/browser/automation/extension_automation_constants.h" 12 #include "chrome/browser/automation/extension_automation_constants.h"
13 #include "chrome/browser/extensions/extension_function_dispatcher.h" 13 #include "chrome/browser/extensions/extension_function_dispatcher.h"
14 #include "chrome/browser/renderer_host/render_view_host.h" 14 #include "chrome/browser/renderer_host/render_view_host.h"
15 #include "chrome/browser/renderer_host/render_view_host_delegate.h" 15 #include "chrome/browser/renderer_host/render_view_host_delegate.h"
16 #include "chrome/browser/tab_contents/tab_contents.h" 16 #include "chrome/browser/tab_contents/tab_contents.h"
17 #include "chrome/browser/tab_contents/tab_contents_delegate.h" 17 #include "chrome/browser/tab_contents/tab_contents_delegate.h"
18 18
19 TabContents* AutomationExtensionFunction::api_handler_tab_ = NULL; 19 TabContents* AutomationExtensionFunction::api_handler_tab_ = NULL;
20 AutomationExtensionFunction::PendingFunctionsMap 20 AutomationExtensionFunction::PendingFunctionsMap
21 AutomationExtensionFunction::pending_functions_; 21 AutomationExtensionFunction::pending_functions_;
22 22
23 AutomationExtensionFunction::AutomationExtensionFunction() {
24 }
25
23 void AutomationExtensionFunction::SetArgs(const ListValue* args) { 26 void AutomationExtensionFunction::SetArgs(const ListValue* args) {
24 // Need to JSON-encode for sending over the wire to the automation user. 27 // Need to JSON-encode for sending over the wire to the automation user.
25 base::JSONWriter::Write(args, false, &args_); 28 base::JSONWriter::Write(args, false, &args_);
26 } 29 }
27 30
28 const std::string AutomationExtensionFunction::GetResult() { 31 const std::string AutomationExtensionFunction::GetResult() {
29 // Already JSON-encoded, so override the base class's implementation. 32 // Already JSON-encoded, so override the base class's implementation.
30 return json_result_; 33 return json_result_;
31 } 34 }
32 35
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
157 func->SendResponse(success); 160 func->SendResponse(success);
158 } 161 }
159 } 162 }
160 return true; 163 return true;
161 } 164 }
162 } 165 }
163 } 166 }
164 167
165 return false; 168 return false;
166 } 169 }
170
171 AutomationExtensionFunction::~AutomationExtensionFunction() {
172 }
OLDNEW
« no previous file with comments | « chrome/browser/automation/automation_extension_function.h ('k') | chrome/browser/automation/automation_extension_tracker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698