| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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/browser.h" | 5 #include "chrome/browser/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 1800 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 AddTabWithURL(help_url, GURL(), PageTransition::AUTO_BOOKMARK, -1, | 1811 AddTabWithURL(help_url, GURL(), PageTransition::AUTO_BOOKMARK, -1, |
| 1812 TabStripModel::ADD_SELECTED, NULL, std::string()); | 1812 TabStripModel::ADD_SELECTED, NULL, std::string()); |
| 1813 } | 1813 } |
| 1814 | 1814 |
| 1815 void Browser::OpenThemeGalleryTabAndActivate() { | 1815 void Browser::OpenThemeGalleryTabAndActivate() { |
| 1816 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)), | 1816 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_THEMES_GALLERY_URL)), |
| 1817 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 1817 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); |
| 1818 window_->Activate(); | 1818 window_->Activate(); |
| 1819 } | 1819 } |
| 1820 | 1820 |
| 1821 void Browser::OpenPrivacyDashboardTabAndActivate() { |
| 1822 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_PRIVACY_DASHBOARD_URL)), |
| 1823 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); |
| 1824 window_->Activate(); |
| 1825 } |
| 1826 |
| 1821 void Browser::OpenAutoFillHelpTabAndActivate() { | 1827 void Browser::OpenAutoFillHelpTabAndActivate() { |
| 1822 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_AUTOFILL_HELP_URL)), | 1828 OpenURL(GURL(l10n_util::GetStringUTF8(IDS_AUTOFILL_HELP_URL)), |
| 1823 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); | 1829 GURL(), NEW_FOREGROUND_TAB, PageTransition::LINK); |
| 1824 window_->Activate(); | 1830 window_->Activate(); |
| 1825 } | 1831 } |
| 1826 | 1832 |
| 1827 #if defined(OS_CHROMEOS) | 1833 #if defined(OS_CHROMEOS) |
| 1828 void Browser::OpenSystemOptionsDialog() { | 1834 void Browser::OpenSystemOptionsDialog() { |
| 1829 UserMetrics::RecordAction(UserMetricsAction("OpenSystemOptionsDialog"), | 1835 UserMetrics::RecordAction(UserMetricsAction("OpenSystemOptionsDialog"), |
| 1830 profile_); | 1836 profile_); |
| (...skipping 2143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3974 } | 3980 } |
| 3975 | 3981 |
| 3976 bool Browser::IsPinned(TabContents* source) { | 3982 bool Browser::IsPinned(TabContents* source) { |
| 3977 int index = tabstrip_model_.GetIndexOfTabContents(source); | 3983 int index = tabstrip_model_.GetIndexOfTabContents(source); |
| 3978 if (index == TabStripModel::kNoTab) { | 3984 if (index == TabStripModel::kNoTab) { |
| 3979 NOTREACHED() << "IsPinned called for tab not in our strip"; | 3985 NOTREACHED() << "IsPinned called for tab not in our strip"; |
| 3980 return false; | 3986 return false; |
| 3981 } | 3987 } |
| 3982 return tabstrip_model_.IsTabPinned(index); | 3988 return tabstrip_model_.IsTabPinned(index); |
| 3983 } | 3989 } |
| OLD | NEW |