| 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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1036 // Reset the status bubble. | 1036 // Reset the status bubble. |
| 1037 StatusBubble* status_bubble = GetStatusBubble(); | 1037 StatusBubble* status_bubble = GetStatusBubble(); |
| 1038 if (status_bubble) { | 1038 if (status_bubble) { |
| 1039 status_bubble->Hide(); | 1039 status_bubble->Hide(); |
| 1040 | 1040 |
| 1041 // Show the loading state (if any). | 1041 // Show the loading state (if any). |
| 1042 status_bubble->SetStatus(CoreTabHelper::FromWebContents( | 1042 status_bubble->SetStatus(CoreTabHelper::FromWebContents( |
| 1043 tab_strip_model_->GetActiveWebContents())->GetStatusText()); | 1043 tab_strip_model_->GetActiveWebContents())->GetStatusText()); |
| 1044 } | 1044 } |
| 1045 | 1045 |
| 1046 if (old_contents) { |
| 1047 FindTabHelper* find_tab_helper = |
| 1048 FindTabHelper::FromWebContents(old_contents); |
| 1049 find_tab_helper->set_isloading_at_tabchange(old_contents->IsLoading()); |
| 1050 } |
| 1051 |
| 1046 if (HasFindBarController()) { | 1052 if (HasFindBarController()) { |
| 1047 find_bar_controller_->ChangeWebContents(new_contents); | 1053 find_bar_controller_->ChangeWebContents(new_contents); |
| 1048 find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true); | 1054 find_bar_controller_->find_bar()->MoveWindowIfNecessary(gfx::Rect(), true); |
| 1049 } | 1055 } |
| 1050 | 1056 |
| 1051 // Update sessions. Don't force creation of sessions. If sessions doesn't | 1057 // Update sessions. Don't force creation of sessions. If sessions doesn't |
| 1052 // exist, the change will be picked up by sessions when created. | 1058 // exist, the change will be picked up by sessions when created. |
| 1053 SessionService* session_service = | 1059 SessionService* session_service = |
| 1054 SessionServiceFactory::GetForProfileIfExisting(profile_); | 1060 SessionServiceFactory::GetForProfileIfExisting(profile_); |
| 1055 if (session_service && !tab_strip_model_->closing_all()) { | 1061 if (session_service && !tab_strip_model_->closing_all()) { |
| (...skipping 1418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2474 if (contents && !allow_js_access) { | 2480 if (contents && !allow_js_access) { |
| 2475 contents->web_contents()->GetController().LoadURL( | 2481 contents->web_contents()->GetController().LoadURL( |
| 2476 target_url, | 2482 target_url, |
| 2477 content::Referrer(), | 2483 content::Referrer(), |
| 2478 content::PAGE_TRANSITION_LINK, | 2484 content::PAGE_TRANSITION_LINK, |
| 2479 std::string()); // No extra headers. | 2485 std::string()); // No extra headers. |
| 2480 } | 2486 } |
| 2481 | 2487 |
| 2482 return contents != NULL; | 2488 return contents != NULL; |
| 2483 } | 2489 } |
| OLD | NEW |