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 1430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1441 const gfx::Rect& initial_rect, | 1441 const gfx::Rect& initial_rect, |
1442 bool user_gesture, | 1442 bool user_gesture, |
1443 bool* was_blocked) { | 1443 bool* was_blocked) { |
1444 chrome::AddWebContents(this, source, new_contents, disposition, initial_rect, | 1444 chrome::AddWebContents(this, source, new_contents, disposition, initial_rect, |
1445 user_gesture, was_blocked); | 1445 user_gesture, was_blocked); |
1446 } | 1446 } |
1447 | 1447 |
1448 void Browser::ActivateContents(WebContents* contents, bool user_gesture) { | 1448 void Browser::ActivateContents(WebContents* contents, bool user_gesture) { |
1449 tab_strip_model_->ActivateTabAt( | 1449 tab_strip_model_->ActivateTabAt( |
1450 tab_strip_model_->GetIndexOfWebContents(contents), false); | 1450 tab_strip_model_->GetIndexOfWebContents(contents), false); |
1451 window_->Activate(); | 1451 window_->Activate(user_gesture); |
1452 } | 1452 } |
1453 | 1453 |
1454 void Browser::DeactivateContents(WebContents* contents) { | 1454 void Browser::DeactivateContents(WebContents* contents) { |
1455 window_->Deactivate(); | 1455 window_->Deactivate(); |
1456 } | 1456 } |
1457 | 1457 |
1458 void Browser::LoadingStateChanged(WebContents* source, | 1458 void Browser::LoadingStateChanged(WebContents* source, |
1459 bool to_different_document) { | 1459 bool to_different_document) { |
1460 window_->UpdateLoadingAnimations(tab_strip_model_->TabsAreLoading()); | 1460 window_->UpdateLoadingAnimations(tab_strip_model_->TabsAreLoading()); |
1461 window_->UpdateTitleBar(); | 1461 window_->UpdateTitleBar(); |
(...skipping 1141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2603 if (contents && !allow_js_access) { | 2603 if (contents && !allow_js_access) { |
2604 contents->web_contents()->GetController().LoadURL( | 2604 contents->web_contents()->GetController().LoadURL( |
2605 target_url, | 2605 target_url, |
2606 content::Referrer(), | 2606 content::Referrer(), |
2607 ui::PAGE_TRANSITION_LINK, | 2607 ui::PAGE_TRANSITION_LINK, |
2608 std::string()); // No extra headers. | 2608 std::string()); // No extra headers. |
2609 } | 2609 } |
2610 | 2610 |
2611 return contents != NULL; | 2611 return contents != NULL; |
2612 } | 2612 } |
OLD | NEW |