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 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1722 DevToolsManager::GetInstance()->ToggleDevToolsWindow( | 1722 DevToolsManager::GetInstance()->ToggleDevToolsWindow( |
1723 GetSelectedTabContents()->render_view_host(), action); | 1723 GetSelectedTabContents()->render_view_host(), action); |
1724 } | 1724 } |
1725 | 1725 |
1726 void Browser::OpenTaskManager() { | 1726 void Browser::OpenTaskManager() { |
1727 UserMetrics::RecordAction(UserMetricsAction("TaskManager"), profile_); | 1727 UserMetrics::RecordAction(UserMetricsAction("TaskManager"), profile_); |
1728 window_->ShowTaskManager(); | 1728 window_->ShowTaskManager(); |
1729 } | 1729 } |
1730 | 1730 |
1731 void Browser::OpenBugReportDialog() { | 1731 void Browser::OpenBugReportDialog() { |
1732 #if defined(OS_CHROMEOS) | |
1733 UserMetrics::RecordAction(UserMetricsAction("ReportBug"), profile_); | 1732 UserMetrics::RecordAction(UserMetricsAction("ReportBug"), profile_); |
1734 window_->ShowReportBugDialog(); | 1733 window_->ShowReportBugDialog(); |
1735 #else | |
1736 TabContents* contents = GetSelectedTabContents(); | |
1737 if (!contents) | |
1738 return; | |
1739 ShowBrokenPageTab(contents); | |
1740 #endif | |
1741 } | 1734 } |
1742 | 1735 |
1743 void Browser::ToggleBookmarkBar() { | 1736 void Browser::ToggleBookmarkBar() { |
1744 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar"), profile_); | 1737 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar"), profile_); |
1745 window_->ToggleBookmarkBar(); | 1738 window_->ToggleBookmarkBar(); |
1746 } | 1739 } |
1747 | 1740 |
1748 void Browser::OpenBookmarkManager() { | 1741 void Browser::OpenBookmarkManager() { |
1749 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager"), profile_); | 1742 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager"), profile_); |
1750 ShowBookmarkManagerTab(); | 1743 ShowBookmarkManagerTab(); |
(...skipping 2340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4091 } | 4084 } |
4092 | 4085 |
4093 bool Browser::IsPinned(TabContents* source) { | 4086 bool Browser::IsPinned(TabContents* source) { |
4094 int index = tabstrip_model_.GetIndexOfTabContents(source); | 4087 int index = tabstrip_model_.GetIndexOfTabContents(source); |
4095 if (index == TabStripModel::kNoTab) { | 4088 if (index == TabStripModel::kNoTab) { |
4096 NOTREACHED() << "IsPinned called for tab not in our strip"; | 4089 NOTREACHED() << "IsPinned called for tab not in our strip"; |
4097 return false; | 4090 return false; |
4098 } | 4091 } |
4099 return tabstrip_model_.IsTabPinned(index); | 4092 return tabstrip_model_.IsTabPinned(index); |
4100 } | 4093 } |
OLD | NEW |