| 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.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 // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 1091 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1102 | 1102 |
| 1103 bool Browser::IsTabStripEditable() const { | 1103 bool Browser::IsTabStripEditable() const { |
| 1104 return window()->IsTabStripEditable(); | 1104 return window()->IsTabStripEditable(); |
| 1105 } | 1105 } |
| 1106 | 1106 |
| 1107 int Browser::GetIndexForInsertionDuringRestore(int relative_index) { | 1107 int Browser::GetIndexForInsertionDuringRestore(int relative_index) { |
| 1108 return (tab_handler_->GetTabStripModel()->insertion_policy() == | 1108 return (tab_handler_->GetTabStripModel()->insertion_policy() == |
| 1109 TabStripModel::INSERT_AFTER) ? tab_count() : relative_index; | 1109 TabStripModel::INSERT_AFTER) ? tab_count() : relative_index; |
| 1110 } | 1110 } |
| 1111 | 1111 |
| 1112 TabContentsWrapper* Browser::AddSelectedTabWithURL(const GURL& url, | 1112 TabContentsWrapper* Browser::AddSelectedTabWithURL( |
| 1113 PageTransition::Type transition) { | 1113 const GURL& url, |
| 1114 PageTransition::Type transition) { |
| 1114 browser::NavigateParams params(this, url, transition); | 1115 browser::NavigateParams params(this, url, transition); |
| 1115 params.disposition = NEW_FOREGROUND_TAB; | 1116 params.disposition = NEW_FOREGROUND_TAB; |
| 1116 browser::Navigate(¶ms); | 1117 browser::Navigate(¶ms); |
| 1117 return params.target_contents; | 1118 return params.target_contents; |
| 1118 } | 1119 } |
| 1119 | 1120 |
| 1120 TabContents* Browser::AddTab(TabContentsWrapper* tab_contents, | 1121 TabContents* Browser::AddTab(TabContentsWrapper* tab_contents, |
| 1121 PageTransition::Type type) { | 1122 PageTransition::Type type) { |
| 1122 tab_handler_->GetTabStripModel()->AddTabContents( | 1123 tab_handler_->GetTabStripModel()->AddTabContents( |
| 1123 tab_contents, -1, type, TabStripModel::ADD_ACTIVE); | 1124 tab_contents, -1, type, TabStripModel::ADD_ACTIVE); |
| (...skipping 3761 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4885 } | 4886 } |
| 4886 | 4887 |
| 4887 void Browser::ShowSyncSetup() { | 4888 void Browser::ShowSyncSetup() { |
| 4888 ProfileSyncService* service = | 4889 ProfileSyncService* service = |
| 4889 profile()->GetOriginalProfile()->GetProfileSyncService(); | 4890 profile()->GetOriginalProfile()->GetProfileSyncService(); |
| 4890 if (service->HasSyncSetupCompleted()) | 4891 if (service->HasSyncSetupCompleted()) |
| 4891 ShowOptionsTab(chrome::kSyncSetupSubPage); | 4892 ShowOptionsTab(chrome::kSyncSetupSubPage); |
| 4892 else | 4893 else |
| 4893 service->ShowLoginDialog(); | 4894 service->ShowLoginDialog(); |
| 4894 } | 4895 } |
| OLD | NEW |