| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 1288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1299 // actions in the face of slow-to-commit pages. | 1299 // actions in the face of slow-to-commit pages. |
| 1300 if (changed_flags & (content::INVALIDATE_TYPE_URL | | 1300 if (changed_flags & (content::INVALIDATE_TYPE_URL | |
| 1301 content::INVALIDATE_TYPE_LOAD)) | 1301 content::INVALIDATE_TYPE_LOAD)) |
| 1302 command_controller_->TabStateChanged(); | 1302 command_controller_->TabStateChanged(); |
| 1303 } | 1303 } |
| 1304 | 1304 |
| 1305 void Browser::AddNewContents(WebContents* source, | 1305 void Browser::AddNewContents(WebContents* source, |
| 1306 WebContents* new_contents, | 1306 WebContents* new_contents, |
| 1307 WindowOpenDisposition disposition, | 1307 WindowOpenDisposition disposition, |
| 1308 const gfx::Rect& initial_pos, | 1308 const gfx::Rect& initial_pos, |
| 1309 bool user_gesture) { | 1309 bool user_gesture, |
| 1310 bool* was_blocked) { |
| 1310 chrome::AddWebContents(this, source, new_contents, disposition, initial_pos, | 1311 chrome::AddWebContents(this, source, new_contents, disposition, initial_pos, |
| 1311 user_gesture); | 1312 user_gesture, was_blocked); |
| 1312 } | 1313 } |
| 1313 | 1314 |
| 1314 void Browser::ActivateContents(WebContents* contents) { | 1315 void Browser::ActivateContents(WebContents* contents) { |
| 1315 chrome::ActivateTabAt(this, tab_strip_model_->GetIndexOfWebContents(contents), | 1316 chrome::ActivateTabAt(this, tab_strip_model_->GetIndexOfWebContents(contents), |
| 1316 false); | 1317 false); |
| 1317 window_->Activate(); | 1318 window_->Activate(); |
| 1318 } | 1319 } |
| 1319 | 1320 |
| 1320 void Browser::DeactivateContents(WebContents* contents) { | 1321 void Browser::DeactivateContents(WebContents* contents) { |
| 1321 window_->Deactivate(); | 1322 window_->Deactivate(); |
| (...skipping 976 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2298 if (contents && !allow_js_access) { | 2299 if (contents && !allow_js_access) { |
| 2299 contents->web_contents()->GetController().LoadURL( | 2300 contents->web_contents()->GetController().LoadURL( |
| 2300 target_url, | 2301 target_url, |
| 2301 content::Referrer(), | 2302 content::Referrer(), |
| 2302 content::PAGE_TRANSITION_LINK, | 2303 content::PAGE_TRANSITION_LINK, |
| 2303 std::string()); // No extra headers. | 2304 std::string()); // No extra headers. |
| 2304 } | 2305 } |
| 2305 | 2306 |
| 2306 return contents != NULL; | 2307 return contents != NULL; |
| 2307 } | 2308 } |
| OLD | NEW |