summaryrefslogtreecommitdiffstats
path: root/chrome_frame/chrome_frame_automation.cc
diff options
context:
space:
mode:
authorjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-21 17:35:08 +0000
committerjam@chromium.org <jam@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-21 17:35:08 +0000
commit3b3ec721627391f78747d19bd3cc87792e0210a8 (patch)
tree63db7ee2728988eaf7f445417276daa22aab23f9 /chrome_frame/chrome_frame_automation.cc
parent78e7603d28966adf4d1305e00cdc27ef07ebcc3b (diff)
downloadchromium_src-3b3ec721627391f78747d19bd3cc87792e0210a8.zip
chromium_src-3b3ec721627391f78747d19bd3cc87792e0210a8.tar.gz
chromium_src-3b3ec721627391f78747d19bd3cc87792e0210a8.tar.bz2
Update automation messages to use the new way of declaring message structs, to cut back on unnecessary code.
Review URL: http://codereview.chromium.org/8356020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@106734 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome_frame/chrome_frame_automation.cc')
-rw-r--r--chrome_frame/chrome_frame_automation.cc42
1 files changed, 21 insertions, 21 deletions
diff --git a/chrome_frame/chrome_frame_automation.cc b/chrome_frame/chrome_frame_automation.cc
index 2415932..61f6ce1 100644
--- a/chrome_frame/chrome_frame_automation.cc
+++ b/chrome_frame/chrome_frame_automation.cc
@@ -767,7 +767,6 @@ void ChromeFrameAutomationClient::FindInPage(const std::wstring& search_string,
// the SyncMessageReplyDispatcher to avoid concerns about blocking
// synchronous messages.
AutomationMsg_Find_Params params;
- params.unused = 0;
params.search_string = WideToUTF16Hack(search_string);
params.find_next = find_next;
params.match_case = (match_case == CASE_SENSITIVE);
@@ -798,18 +797,18 @@ void ChromeFrameAutomationClient::CreateExternalTab() {
navigate_after_initialization_ = false;
}
- const ExternalTabSettings settings(
- m_hWnd,
- gfx::Rect(),
- WS_CHILD,
- chrome_launch_params_->incognito(),
- !use_chrome_network_,
- handle_top_level_requests_,
- chrome_launch_params_->url(),
- chrome_launch_params_->referrer(),
- // Infobars disabled in widget mode.
- !chrome_launch_params_->widget_mode(),
- chrome_launch_params_->route_all_top_level_navigations());
+ ExternalTabSettings settings;
+ settings.parent = m_hWnd;
+ settings.style = WS_CHILD;
+ settings.is_incognito = chrome_launch_params_->incognito();
+ settings.load_requests_via_automation = !use_chrome_network_;
+ settings.handle_top_level_requests = handle_top_level_requests_;
+ settings.initial_url = chrome_launch_params_->url();
+ settings.referrer = chrome_launch_params_->referrer();
+ // Infobars disabled in widget mode.
+ settings.infobars_enabled = !chrome_launch_params_->widget_mode();
+ settings.route_all_top_level_navigations =
+ chrome_launch_params_->route_all_top_level_navigations();
UMA_HISTOGRAM_CUSTOM_COUNTS(
"ChromeFrame.HostNetworking", !use_chrome_network_, 0, 1, 2);
@@ -1242,14 +1241,15 @@ void ChromeFrameAutomationClient::OnResponseStarted(int request_id,
const char* mime_type, const char* headers, int size,
base::Time last_modified, const std::string& redirect_url,
int redirect_status, const net::HostPortPair& socket_address) {
- const AutomationURLResponse response(
- mime_type,
- headers ? headers : "",
- size,
- last_modified,
- redirect_url,
- redirect_status,
- socket_address);
+ AutomationURLResponse response;
+ response.mime_type = mime_type;
+ if (headers)
+ response.headers = headers;
+ response.content_length = size;
+ response.last_modified = last_modified;
+ response.redirect_url = redirect_url;
+ response.redirect_status = redirect_status;
+ response.socket_address = socket_address;
automation_server_->Send(new AutomationMsg_RequestStarted(
tab_->handle(), request_id, response));