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 898 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
909 | 909 |
910 SessionService* session_service = | 910 SessionService* session_service = |
911 SessionServiceFactory::GetForProfile(profile_); | 911 SessionServiceFactory::GetForProfile(profile_); |
912 if (session_service) { | 912 if (session_service) { |
913 session_service->TabInserted(contents); | 913 session_service->TabInserted(contents); |
914 int new_active_index = tab_strip_model_->active_index(); | 914 int new_active_index = tab_strip_model_->active_index(); |
915 if (index < new_active_index) | 915 if (index < new_active_index) |
916 session_service->SetSelectedTabInWindow(session_id(), | 916 session_service->SetSelectedTabInWindow(session_id(), |
917 new_active_index); | 917 new_active_index); |
918 } | 918 } |
919 | |
920 if (instant_controller_) | |
921 instant_controller_->TabInsertedAt(contents, index, foreground); | |
kmadhusu
2014/06/17 18:29:35
As per our discussion, you are doing this to submi
sidharthms
2014/06/17 21:52:24
Done.
| |
919 } | 922 } |
920 | 923 |
921 void Browser::TabClosingAt(TabStripModel* tab_strip_model, | 924 void Browser::TabClosingAt(TabStripModel* tab_strip_model, |
922 WebContents* contents, | 925 WebContents* contents, |
923 int index) { | 926 int index) { |
924 fullscreen_controller_->OnTabClosing(contents); | 927 fullscreen_controller_->OnTabClosing(contents); |
925 SessionService* session_service = | 928 SessionService* session_service = |
926 SessionServiceFactory::GetForProfile(profile_); | 929 SessionServiceFactory::GetForProfile(profile_); |
927 if (session_service) | 930 if (session_service) |
928 session_service->TabClosing(contents); | 931 session_service->TabClosing(contents); |
(...skipping 1488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2417 if (contents && !allow_js_access) { | 2420 if (contents && !allow_js_access) { |
2418 contents->web_contents()->GetController().LoadURL( | 2421 contents->web_contents()->GetController().LoadURL( |
2419 target_url, | 2422 target_url, |
2420 content::Referrer(), | 2423 content::Referrer(), |
2421 content::PAGE_TRANSITION_LINK, | 2424 content::PAGE_TRANSITION_LINK, |
2422 std::string()); // No extra headers. | 2425 std::string()); // No extra headers. |
2423 } | 2426 } |
2424 | 2427 |
2425 return contents != NULL; | 2428 return contents != NULL; |
2426 } | 2429 } |
OLD | NEW |