| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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_init.h" | 5 #include "chrome/browser/ui/browser_init.h" |
| 6 | 6 |
| 7 #include <algorithm> // For max(). | 7 #include <algorithm> // For max(). |
| 8 | 8 |
| 9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
| 10 #include "base/environment.h" | 10 #include "base/environment.h" |
| (...skipping 1068 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1079 continue; | 1079 continue; |
| 1080 | 1080 |
| 1081 int add_types = first_tab ? TabStripModel::ADD_ACTIVE : | 1081 int add_types = first_tab ? TabStripModel::ADD_ACTIVE : |
| 1082 TabStripModel::ADD_NONE; | 1082 TabStripModel::ADD_NONE; |
| 1083 add_types |= TabStripModel::ADD_FORCE_INDEX; | 1083 add_types |= TabStripModel::ADD_FORCE_INDEX; |
| 1084 if (tabs[i].is_pinned) | 1084 if (tabs[i].is_pinned) |
| 1085 add_types |= TabStripModel::ADD_PINNED; | 1085 add_types |= TabStripModel::ADD_PINNED; |
| 1086 int index = browser->GetIndexForInsertionDuringRestore(i); | 1086 int index = browser->GetIndexForInsertionDuringRestore(i); |
| 1087 | 1087 |
| 1088 browser::NavigateParams params(browser, tabs[i].url, | 1088 browser::NavigateParams params(browser, tabs[i].url, |
| 1089 PageTransition::START_PAGE); | 1089 content::PAGE_TRANSITION_START_PAGE); |
| 1090 params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; | 1090 params.disposition = first_tab ? NEW_FOREGROUND_TAB : NEW_BACKGROUND_TAB; |
| 1091 params.tabstrip_index = index; | 1091 params.tabstrip_index = index; |
| 1092 params.tabstrip_add_types = add_types; | 1092 params.tabstrip_add_types = add_types; |
| 1093 params.extension_app_id = tabs[i].app_id; | 1093 params.extension_app_id = tabs[i].app_id; |
| 1094 browser::Navigate(¶ms); | 1094 browser::Navigate(¶ms); |
| 1095 | 1095 |
| 1096 first_tab = false; | 1096 first_tab = false; |
| 1097 } | 1097 } |
| 1098 browser->window()->Show(); | 1098 browser->window()->Show(); |
| 1099 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial | 1099 // TODO(jcampan): http://crbug.com/8123 we should not need to set the initial |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 *link_offset = text.size(); | 1194 *link_offset = text.size(); |
| 1195 return text; | 1195 return text; |
| 1196 } | 1196 } |
| 1197 | 1197 |
| 1198 string16 LearnMoreInfoBar::GetLinkText() const { | 1198 string16 LearnMoreInfoBar::GetLinkText() const { |
| 1199 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 1199 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); |
| 1200 } | 1200 } |
| 1201 | 1201 |
| 1202 bool LearnMoreInfoBar::LinkClicked(WindowOpenDisposition disposition) { | 1202 bool LearnMoreInfoBar::LinkClicked(WindowOpenDisposition disposition) { |
| 1203 owner()->tab_contents()->OpenURL(learn_more_url_, GURL(), disposition, | 1203 owner()->tab_contents()->OpenURL(learn_more_url_, GURL(), disposition, |
| 1204 PageTransition::LINK); | 1204 content::PAGE_TRANSITION_LINK); |
| 1205 return false; | 1205 return false; |
| 1206 } | 1206 } |
| 1207 | 1207 |
| 1208 // This is the page which provides information on DNS certificate provenance | 1208 // This is the page which provides information on DNS certificate provenance |
| 1209 // checking. | 1209 // checking. |
| 1210 void BrowserInit::LaunchWithProfile:: | 1210 void BrowserInit::LaunchWithProfile:: |
| 1211 AddDNSCertProvenanceCheckingWarningInfoBarIfNecessary( | 1211 AddDNSCertProvenanceCheckingWarningInfoBarIfNecessary( |
| 1212 TabContentsWrapper* tab) { | 1212 TabContentsWrapper* tab) { |
| 1213 if (!command_line_.HasSwitch(switches::kEnableDNSCertProvenanceChecking)) | 1213 if (!command_line_.HasSwitch(switches::kEnableDNSCertProvenanceChecking)) |
| 1214 return; | 1214 return; |
| (...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1533 if (!automation->InitializeChannel(channel_id)) | 1533 if (!automation->InitializeChannel(channel_id)) |
| 1534 return false; | 1534 return false; |
| 1535 automation->SetExpectedTabCount(expected_tabs); | 1535 automation->SetExpectedTabCount(expected_tabs); |
| 1536 | 1536 |
| 1537 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); | 1537 AutomationProviderList* list = g_browser_process->GetAutomationProviderList(); |
| 1538 DCHECK(list); | 1538 DCHECK(list); |
| 1539 list->AddProvider(automation); | 1539 list->AddProvider(automation); |
| 1540 | 1540 |
| 1541 return true; | 1541 return true; |
| 1542 } | 1542 } |
| OLD | NEW |