| OLD | NEW |
| 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 1440 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1451 void Browser::ShowRepostFormWarningDialog(WebContents* source) { | 1451 void Browser::ShowRepostFormWarningDialog(WebContents* source) { |
| 1452 TabModalConfirmDialog::Create(new RepostFormWarningController(source), | 1452 TabModalConfirmDialog::Create(new RepostFormWarningController(source), |
| 1453 source); | 1453 source); |
| 1454 } | 1454 } |
| 1455 | 1455 |
| 1456 bool Browser::ShouldCreateWebContents( | 1456 bool Browser::ShouldCreateWebContents( |
| 1457 WebContents* web_contents, | 1457 WebContents* web_contents, |
| 1458 int route_id, | 1458 int route_id, |
| 1459 WindowContainerType window_container_type, | 1459 WindowContainerType window_container_type, |
| 1460 const string16& frame_name, | 1460 const string16& frame_name, |
| 1461 const GURL& target_url) { | 1461 const GURL& target_url, |
| 1462 const WebKit::WebWindowFeatures& web_window_features) { |
| 1462 if (window_container_type == WINDOW_CONTAINER_TYPE_BACKGROUND) { | 1463 if (window_container_type == WINDOW_CONTAINER_TYPE_BACKGROUND) { |
| 1463 // If a BackgroundContents is created, suppress the normal WebContents. | 1464 // If a BackgroundContents is created, suppress the normal WebContents. |
| 1464 return !MaybeCreateBackgroundContents( | 1465 return !MaybeCreateBackgroundContents( |
| 1465 route_id, web_contents, frame_name, target_url); | 1466 route_id, web_contents, frame_name, target_url); |
| 1466 } | 1467 } |
| 1467 | 1468 |
| 1468 return true; | 1469 return true; |
| 1469 } | 1470 } |
| 1470 | 1471 |
| 1471 void Browser::WebContentsCreated(WebContents* source_contents, | 1472 void Browser::WebContentsCreated(WebContents* source_contents, |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2262 if (contents && !allow_js_access) { | 2263 if (contents && !allow_js_access) { |
| 2263 contents->web_contents()->GetController().LoadURL( | 2264 contents->web_contents()->GetController().LoadURL( |
| 2264 target_url, | 2265 target_url, |
| 2265 content::Referrer(), | 2266 content::Referrer(), |
| 2266 content::PAGE_TRANSITION_LINK, | 2267 content::PAGE_TRANSITION_LINK, |
| 2267 std::string()); // No extra headers. | 2268 std::string()); // No extra headers. |
| 2268 } | 2269 } |
| 2269 | 2270 |
| 2270 return contents != NULL; | 2271 return contents != NULL; |
| 2271 } | 2272 } |
| OLD | NEW |