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 1710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1721 DevToolsManager::GetInstance()->ToggleDevToolsWindow( | 1721 DevToolsManager::GetInstance()->ToggleDevToolsWindow( |
1722 GetSelectedTabContents()->render_view_host(), action); | 1722 GetSelectedTabContents()->render_view_host(), action); |
1723 } | 1723 } |
1724 | 1724 |
1725 void Browser::OpenTaskManager() { | 1725 void Browser::OpenTaskManager() { |
1726 UserMetrics::RecordAction(UserMetricsAction("TaskManager"), profile_); | 1726 UserMetrics::RecordAction(UserMetricsAction("TaskManager"), profile_); |
1727 window_->ShowTaskManager(); | 1727 window_->ShowTaskManager(); |
1728 } | 1728 } |
1729 | 1729 |
1730 void Browser::OpenBugReportDialog() { | 1730 void Browser::OpenBugReportDialog() { |
1731 #if defined(OS_CHROMEOS) | |
1732 UserMetrics::RecordAction(UserMetricsAction("ReportBug"), profile_); | 1731 UserMetrics::RecordAction(UserMetricsAction("ReportBug"), profile_); |
1733 window_->ShowReportBugDialog(); | 1732 window_->ShowReportBugDialog(); |
1734 #else | |
1735 TabContents* contents = GetSelectedTabContents(); | |
1736 if (!contents) | |
1737 return; | |
1738 ShowBrokenPageTab(contents); | |
1739 #endif | |
1740 } | 1733 } |
1741 | 1734 |
1742 void Browser::ToggleBookmarkBar() { | 1735 void Browser::ToggleBookmarkBar() { |
1743 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar"), profile_); | 1736 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarksBar"), profile_); |
1744 window_->ToggleBookmarkBar(); | 1737 window_->ToggleBookmarkBar(); |
1745 } | 1738 } |
1746 | 1739 |
1747 void Browser::OpenBookmarkManager() { | 1740 void Browser::OpenBookmarkManager() { |
1748 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager"), profile_); | 1741 UserMetrics::RecordAction(UserMetricsAction("ShowBookmarkManager"), profile_); |
1749 ShowBookmarkManagerTab(); | 1742 ShowBookmarkManagerTab(); |
(...skipping 2384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4134 } | 4127 } |
4135 | 4128 |
4136 bool Browser::IsPinned(TabContents* source) { | 4129 bool Browser::IsPinned(TabContents* source) { |
4137 int index = tabstrip_model_.GetIndexOfTabContents(source); | 4130 int index = tabstrip_model_.GetIndexOfTabContents(source); |
4138 if (index == TabStripModel::kNoTab) { | 4131 if (index == TabStripModel::kNoTab) { |
4139 NOTREACHED() << "IsPinned called for tab not in our strip"; | 4132 NOTREACHED() << "IsPinned called for tab not in our strip"; |
4140 return false; | 4133 return false; |
4141 } | 4134 } |
4142 return tabstrip_model_.IsTabPinned(index); | 4135 return tabstrip_model_.IsTabPinned(index); |
4143 } | 4136 } |
OLD | NEW |