| 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 <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 2007 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2018 } | 2018 } |
| 2019 | 2019 |
| 2020 void Browser::OpenSyncMyBookmarksDialog() { | 2020 void Browser::OpenSyncMyBookmarksDialog() { |
| 2021 sync_ui_util::OpenSyncMyBookmarksDialog( | 2021 sync_ui_util::OpenSyncMyBookmarksDialog( |
| 2022 profile_, this, ProfileSyncService::START_FROM_WRENCH); | 2022 profile_, this, ProfileSyncService::START_FROM_WRENCH); |
| 2023 } | 2023 } |
| 2024 | 2024 |
| 2025 void Browser::OpenAboutChromeDialog() { | 2025 void Browser::OpenAboutChromeDialog() { |
| 2026 UserMetrics::RecordAction(UserMetricsAction("AboutChrome")); | 2026 UserMetrics::RecordAction(UserMetricsAction("AboutChrome")); |
| 2027 #if defined(OS_CHROMEOS) | 2027 #if defined(OS_CHROMEOS) |
| 2028 ShowSingletonTab(GURL(chrome::kChromeUIAboutURL)); | 2028 std::string chrome_settings(chrome::kChromeUISettingsURL); |
| 2029 ShowSingletonTab(GURL(chrome_settings.append(chrome::kAboutOptionsSubPage))); |
| 2029 #else | 2030 #else |
| 2030 window_->ShowAboutChromeDialog(); | 2031 window_->ShowAboutChromeDialog(); |
| 2031 #endif | 2032 #endif |
| 2032 } | 2033 } |
| 2033 | 2034 |
| 2034 void Browser::OpenUpdateChromeDialog() { | 2035 void Browser::OpenUpdateChromeDialog() { |
| 2035 UserMetrics::RecordAction(UserMetricsAction("UpdateChrome")); | 2036 UserMetrics::RecordAction(UserMetricsAction("UpdateChrome")); |
| 2036 window_->ShowUpdateChromeDialog(); | 2037 window_->ShowUpdateChromeDialog(); |
| 2037 } | 2038 } |
| 2038 | 2039 |
| (...skipping 2665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4704 TabContents* current_tab = GetSelectedTabContents(); | 4705 TabContents* current_tab = GetSelectedTabContents(); |
| 4705 if (current_tab) { | 4706 if (current_tab) { |
| 4706 content_restrictions = current_tab->content_restrictions(); | 4707 content_restrictions = current_tab->content_restrictions(); |
| 4707 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); | 4708 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); |
| 4708 // See comment in UpdateCommandsForTabState about why we call url(). | 4709 // See comment in UpdateCommandsForTabState about why we call url(). |
| 4709 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) | 4710 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) |
| 4710 content_restrictions |= CONTENT_RESTRICTION_SAVE; | 4711 content_restrictions |= CONTENT_RESTRICTION_SAVE; |
| 4711 } | 4712 } |
| 4712 return content_restrictions; | 4713 return content_restrictions; |
| 4713 } | 4714 } |
| OLD | NEW |