| 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 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1839 | 1839 |
| 1840 // Start fetching web app info for CreateApplicationShortcut dialog and show | 1840 // Start fetching web app info for CreateApplicationShortcut dialog and show |
| 1841 // the dialog when the data is available in OnDidGetApplicationInfo. | 1841 // the dialog when the data is available in OnDidGetApplicationInfo. |
| 1842 current_tab->extension_tab_helper()->GetApplicationInfo(entry->page_id()); | 1842 current_tab->extension_tab_helper()->GetApplicationInfo(entry->page_id()); |
| 1843 #else | 1843 #else |
| 1844 NOTIMPLEMENTED(); | 1844 NOTIMPLEMENTED(); |
| 1845 #endif | 1845 #endif |
| 1846 } | 1846 } |
| 1847 | 1847 |
| 1848 void Browser::ToggleDevToolsWindow(DevToolsToggleAction action) { | 1848 void Browser::ToggleDevToolsWindow(DevToolsToggleAction action) { |
| 1849 std::string uma_string; | 1849 if (action == DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE) |
| 1850 switch (action) { | 1850 UserMetrics::RecordAction(UserMetricsAction("DevTools_ToggleConsole")); |
| 1851 case DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE: | 1851 else |
| 1852 uma_string = "DevTools_ToggleConsole"; | 1852 UserMetrics::RecordAction(UserMetricsAction("DevTools_ToggleWindow")); |
| 1853 break; | 1853 |
| 1854 case DEVTOOLS_TOGGLE_ACTION_NONE: | |
| 1855 case DEVTOOLS_TOGGLE_ACTION_INSPECT: | |
| 1856 default: | |
| 1857 uma_string = "DevTools_ToggleWindow"; | |
| 1858 break; | |
| 1859 } | |
| 1860 UserMetrics::RecordAction(UserMetricsAction(uma_string.c_str())); | |
| 1861 DevToolsManager::GetInstance()->ToggleDevToolsWindow( | 1854 DevToolsManager::GetInstance()->ToggleDevToolsWindow( |
| 1862 GetSelectedTabContentsWrapper()->render_view_host(), action); | 1855 GetSelectedTabContentsWrapper()->render_view_host(), action); |
| 1863 } | 1856 } |
| 1864 | 1857 |
| 1865 void Browser::OpenTaskManager(bool highlight_background_resources) { | 1858 void Browser::OpenTaskManager(bool highlight_background_resources) { |
| 1866 UserMetrics::RecordAction(UserMetricsAction("TaskManager")); | 1859 UserMetrics::RecordAction(UserMetricsAction("TaskManager")); |
| 1867 if (highlight_background_resources) | 1860 if (highlight_background_resources) |
| 1868 window_->ShowBackgroundPages(); | 1861 window_->ShowBackgroundPages(); |
| 1869 else | 1862 else |
| 1870 window_->ShowTaskManager(); | 1863 window_->ShowTaskManager(); |
| (...skipping 2850 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4721 // end up querying state once they process the tab switch. | 4714 // end up querying state once they process the tab switch. |
| 4722 return; | 4715 return; |
| 4723 } | 4716 } |
| 4724 | 4717 |
| 4725 BookmarkBar::AnimateChangeType animate_type = | 4718 BookmarkBar::AnimateChangeType animate_type = |
| 4726 (reason == BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE) ? | 4719 (reason == BOOKMARK_BAR_STATE_CHANGE_PREF_CHANGE) ? |
| 4727 BookmarkBar::ANIMATE_STATE_CHANGE : | 4720 BookmarkBar::ANIMATE_STATE_CHANGE : |
| 4728 BookmarkBar::DONT_ANIMATE_STATE_CHANGE; | 4721 BookmarkBar::DONT_ANIMATE_STATE_CHANGE; |
| 4729 window_->BookmarkBarStateChanged(animate_type); | 4722 window_->BookmarkBarStateChanged(animate_type); |
| 4730 } | 4723 } |
| OLD | NEW |