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

Side by Side Diff: chrome/browser/ui/browser.cc

Issue 11193051: To fix the cross-site post submission bug. Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Android API, Helper Function and Include_rules Created 8 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 #include "chrome/browser/ui/browser.h" 5 #include "chrome/browser/ui/browser.h"
6 6
7 #if defined(OS_WIN) 7 #if defined(OS_WIN)
8 #include <windows.h> 8 #include <windows.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #endif // defined(OS_WIN) 10 #endif // defined(OS_WIN)
(...skipping 1298 matching lines...) Expand 10 before | Expand all | Expand 10 after
1309 nav_params.extra_headers = params.extra_headers; 1309 nav_params.extra_headers = params.extra_headers;
1310 nav_params.disposition = params.disposition; 1310 nav_params.disposition = params.disposition;
1311 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE; 1311 nav_params.tabstrip_add_types = TabStripModel::ADD_NONE;
1312 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW; 1312 nav_params.window_action = chrome::NavigateParams::SHOW_WINDOW;
1313 nav_params.user_gesture = true; 1313 nav_params.user_gesture = true;
1314 nav_params.override_encoding = params.override_encoding; 1314 nav_params.override_encoding = params.override_encoding;
1315 nav_params.is_renderer_initiated = params.is_renderer_initiated; 1315 nav_params.is_renderer_initiated = params.is_renderer_initiated;
1316 nav_params.transferred_global_request_id = 1316 nav_params.transferred_global_request_id =
1317 params.transferred_global_request_id; 1317 params.transferred_global_request_id;
1318 nav_params.is_cross_site_redirect = params.is_cross_site_redirect; 1318 nav_params.is_cross_site_redirect = params.is_cross_site_redirect;
1319
1320 if (params.transition == content::PAGE_TRANSITION_FORM_SUBMIT) {
1321 nav_params.post_data = params.browser_initiated_post_data;
1322 }
1323
1319 chrome::Navigate(&nav_params); 1324 chrome::Navigate(&nav_params);
1320 1325
1321 return nav_params.target_contents ? 1326 return nav_params.target_contents ?
1322 nav_params.target_contents->web_contents() : NULL; 1327 nav_params.target_contents->web_contents() : NULL;
1323 } 1328 }
1324 1329
1325 void Browser::NavigationStateChanged(const WebContents* source, 1330 void Browser::NavigationStateChanged(const WebContents* source,
1326 unsigned changed_flags) { 1331 unsigned changed_flags) {
1327 // Only update the UI when something visible has changed. 1332 // Only update the UI when something visible has changed.
1328 if (changed_flags) 1333 if (changed_flags)
(...skipping 1056 matching lines...) Expand 10 before | Expand all | Expand 10 after
2385 if (contents && !allow_js_access) { 2390 if (contents && !allow_js_access) {
2386 contents->web_contents()->GetController().LoadURL( 2391 contents->web_contents()->GetController().LoadURL(
2387 target_url, 2392 target_url,
2388 content::Referrer(), 2393 content::Referrer(),
2389 content::PAGE_TRANSITION_LINK, 2394 content::PAGE_TRANSITION_LINK,
2390 std::string()); // No extra headers. 2395 std::string()); // No extra headers.
2391 } 2396 }
2392 2397
2393 return contents != NULL; 2398 return contents != NULL;
2394 } 2399 }
OLDNEW
« no previous file with comments | « chrome/browser/extensions/isolated_app_browsertest.cc ('k') | chrome/browser/ui/browser_navigator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698