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 1867 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1878 case DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE: | 1878 case DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE: |
1879 uma_string = "DevTools_ToggleConsole"; | 1879 uma_string = "DevTools_ToggleConsole"; |
1880 break; | 1880 break; |
1881 case DEVTOOLS_TOGGLE_ACTION_NONE: | 1881 case DEVTOOLS_TOGGLE_ACTION_NONE: |
1882 case DEVTOOLS_TOGGLE_ACTION_INSPECT: | 1882 case DEVTOOLS_TOGGLE_ACTION_INSPECT: |
1883 default: | 1883 default: |
1884 uma_string = "DevTools_ToggleWindow"; | 1884 uma_string = "DevTools_ToggleWindow"; |
1885 break; | 1885 break; |
1886 } | 1886 } |
1887 UserMetrics::RecordAction(UserMetricsAction(uma_string.c_str())); | 1887 UserMetrics::RecordAction(UserMetricsAction(uma_string.c_str())); |
1888 DevToolsManager::GetInstance()->ToggleDevToolsWindow( | 1888 DevToolsWindow::ToggleDevToolsWindow( |
1889 GetSelectedTabContentsWrapper()->render_view_host(), action); | 1889 GetSelectedTabContentsWrapper()->render_view_host(), action); |
1890 } | 1890 } |
1891 | 1891 |
1892 void Browser::OpenTaskManager(bool highlight_background_resources) { | 1892 void Browser::OpenTaskManager(bool highlight_background_resources) { |
1893 UserMetrics::RecordAction(UserMetricsAction("TaskManager")); | 1893 UserMetrics::RecordAction(UserMetricsAction("TaskManager")); |
1894 if (highlight_background_resources) | 1894 if (highlight_background_resources) |
1895 window_->ShowBackgroundPages(); | 1895 window_->ShowBackgroundPages(); |
1896 else | 1896 else |
1897 window_->ShowTaskManager(); | 1897 window_->ShowTaskManager(); |
1898 } | 1898 } |
(...skipping 2846 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4745 // end up querying state once they process the tab switch. | 4745 // end up querying state once they process the tab switch. |
4746 return; | 4746 return; |
4747 } | 4747 } |
4748 | 4748 |
4749 BookmarkBar::AnimateChangeType animate_type = | 4749 BookmarkBar::AnimateChangeType animate_type = |
4750 (reason == BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE) ? | 4750 (reason == BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE) ? |
4751 BookmarkBar::ANIMATE_STATE_CHANGE : | 4751 BookmarkBar::ANIMATE_STATE_CHANGE : |
4752 BookmarkBar::DONT_ANIMATE_STATE_CHANGE; | 4752 BookmarkBar::DONT_ANIMATE_STATE_CHANGE; |
4753 window_->BookmarkBarStateChanged(animate_type); | 4753 window_->BookmarkBarStateChanged(animate_type); |
4754 } | 4754 } |
OLD | NEW |