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 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1816 uma_string = "DevTools_ToggleConsole"; | 1816 uma_string = "DevTools_ToggleConsole"; |
1817 break; | 1817 break; |
1818 case DEVTOOLS_TOGGLE_ACTION_NONE: | 1818 case DEVTOOLS_TOGGLE_ACTION_NONE: |
1819 case DEVTOOLS_TOGGLE_ACTION_INSPECT: | 1819 case DEVTOOLS_TOGGLE_ACTION_INSPECT: |
1820 default: | 1820 default: |
1821 uma_string = "DevTools_ToggleWindow"; | 1821 uma_string = "DevTools_ToggleWindow"; |
1822 break; | 1822 break; |
1823 } | 1823 } |
1824 UserMetrics::RecordAction(UserMetricsAction(uma_string.c_str()), profile_); | 1824 UserMetrics::RecordAction(UserMetricsAction(uma_string.c_str()), profile_); |
1825 DevToolsManager::GetInstance()->ToggleDevToolsWindow( | 1825 DevToolsManager::GetInstance()->ToggleDevToolsWindow( |
1826 GetSelectedTabContentsWrapper()->render_view_host(), action); | 1826 GetSelectedTabContentsWrapper()->render_view_host(), |
| 1827 action == DEVTOOLS_TOGGLE_ACTION_SHOW_CONSOLE, action); |
1827 } | 1828 } |
1828 | 1829 |
1829 void Browser::OpenTaskManager(bool highlight_background_resources) { | 1830 void Browser::OpenTaskManager(bool highlight_background_resources) { |
1830 UserMetrics::RecordAction(UserMetricsAction("TaskManager"), profile_); | 1831 UserMetrics::RecordAction(UserMetricsAction("TaskManager"), profile_); |
1831 if (highlight_background_resources) | 1832 if (highlight_background_resources) |
1832 window_->ShowBackgroundPages(); | 1833 window_->ShowBackgroundPages(); |
1833 else | 1834 else |
1834 window_->ShowTaskManager(); | 1835 window_->ShowTaskManager(); |
1835 } | 1836 } |
1836 | 1837 |
(...skipping 2578 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4415 // The page transition below is only for the purpose of inserting the tab. | 4416 // The page transition below is only for the purpose of inserting the tab. |
4416 browser->AddTab(view_source_contents, PageTransition::LINK); | 4417 browser->AddTab(view_source_contents, PageTransition::LINK); |
4417 } | 4418 } |
4418 | 4419 |
4419 if (profile_->HasSessionService()) { | 4420 if (profile_->HasSessionService()) { |
4420 SessionService* session_service = profile_->GetSessionService(); | 4421 SessionService* session_service = profile_->GetSessionService(); |
4421 if (session_service) | 4422 if (session_service) |
4422 session_service->TabRestored(&view_source_contents->controller(), false); | 4423 session_service->TabRestored(&view_source_contents->controller(), false); |
4423 } | 4424 } |
4424 } | 4425 } |
OLD | NEW |