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 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <algorithm> | 9 #include <algorithm> |
10 #include <string> | 10 #include <string> |
(...skipping 1094 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1105 SessionTabHelper::FromWebContents(new_contents); | 1105 SessionTabHelper::FromWebContents(new_contents); |
1106 session_service->SetLastActiveTime(session_id(), | 1106 session_service->SetLastActiveTime(session_id(), |
1107 session_tab_helper->session_id(), | 1107 session_tab_helper->session_id(), |
1108 base::TimeTicks::Now()); | 1108 base::TimeTicks::Now()); |
1109 } | 1109 } |
1110 | 1110 |
1111 // This needs to be called after notifying SearchDelegate. | 1111 // This needs to be called after notifying SearchDelegate. |
1112 if (instant_controller_) | 1112 if (instant_controller_) |
1113 instant_controller_->ActiveTabChanged(); | 1113 instant_controller_->ActiveTabChanged(); |
1114 | 1114 |
1115 autofill::ChromeAutofillClient::FromWebContents(new_contents)->TabActivated(); | |
1116 SearchTabHelper::FromWebContents(new_contents)->OnTabActivated(); | 1115 SearchTabHelper::FromWebContents(new_contents)->OnTabActivated(); |
1117 } | 1116 } |
1118 | 1117 |
1119 void Browser::TabMoved(WebContents* contents, | 1118 void Browser::TabMoved(WebContents* contents, |
1120 int from_index, | 1119 int from_index, |
1121 int to_index) { | 1120 int to_index) { |
1122 DCHECK(from_index >= 0 && to_index >= 0); | 1121 DCHECK(from_index >= 0 && to_index >= 0); |
1123 // Notify the history service. | 1122 // Notify the history service. |
1124 SyncHistoryWithTabs(std::min(from_index, to_index)); | 1123 SyncHistoryWithTabs(std::min(from_index, to_index)); |
1125 } | 1124 } |
(...skipping 1620 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2746 if (contents && !allow_js_access) { | 2745 if (contents && !allow_js_access) { |
2747 contents->web_contents()->GetController().LoadURL( | 2746 contents->web_contents()->GetController().LoadURL( |
2748 target_url, | 2747 target_url, |
2749 content::Referrer(), | 2748 content::Referrer(), |
2750 ui::PAGE_TRANSITION_LINK, | 2749 ui::PAGE_TRANSITION_LINK, |
2751 std::string()); // No extra headers. | 2750 std::string()); // No extra headers. |
2752 } | 2751 } |
2753 | 2752 |
2754 return contents != NULL; | 2753 return contents != NULL; |
2755 } | 2754 } |
OLD | NEW |