OLD | NEW |
1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2009 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 #include "app/animation.h" | 7 #include "app/animation.h" |
8 #include "app/l10n_util.h" | 8 #include "app/l10n_util.h" |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/idle_timer.h" | 10 #include "base/idle_timer.h" |
(...skipping 1085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1096 } | 1096 } |
1097 | 1097 |
1098 void Browser::OpenJavaScriptConsole() { | 1098 void Browser::OpenJavaScriptConsole() { |
1099 UserMetrics::RecordAction(L"ShowJSConsole", profile_); | 1099 UserMetrics::RecordAction(L"ShowJSConsole", profile_); |
1100 GetSelectedTabContents()->render_view_host()-> | 1100 GetSelectedTabContents()->render_view_host()-> |
1101 ShowJavaScriptConsole(); | 1101 ShowJavaScriptConsole(); |
1102 } | 1102 } |
1103 | 1103 |
1104 void Browser::OpenTaskManager() { | 1104 void Browser::OpenTaskManager() { |
1105 UserMetrics::RecordAction(L"TaskManager", profile_); | 1105 UserMetrics::RecordAction(L"TaskManager", profile_); |
1106 // TODO(port) | 1106 window_->ShowTaskManager(); |
1107 #if defined(OS_WIN) | |
1108 TaskManager::Open(); | |
1109 #else | |
1110 NOTIMPLEMENTED(); | |
1111 #endif | |
1112 } | 1107 } |
1113 | 1108 |
1114 void Browser::OpenSelectProfileDialog() { | 1109 void Browser::OpenSelectProfileDialog() { |
1115 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); | 1110 const CommandLine& command_line = *CommandLine::ForCurrentProcess(); |
1116 if (!command_line.HasSwitch(switches::kEnableUserDataDirProfiles)) | 1111 if (!command_line.HasSwitch(switches::kEnableUserDataDirProfiles)) |
1117 return; | 1112 return; |
1118 UserMetrics::RecordAction(L"SelectProfile", profile_); | 1113 UserMetrics::RecordAction(L"SelectProfile", profile_); |
1119 window_->ShowSelectProfileDialog(); | 1114 window_->ShowSelectProfileDialog(); |
1120 } | 1115 } |
1121 | 1116 |
(...skipping 1614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2736 /////////////////////////////////////////////////////////////////////////////// | 2731 /////////////////////////////////////////////////////////////////////////////// |
2737 // BrowserToolbarModel (private): | 2732 // BrowserToolbarModel (private): |
2738 | 2733 |
2739 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 2734 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { |
2740 // This |current_tab| can be NULL during the initialization of the | 2735 // This |current_tab| can be NULL during the initialization of the |
2741 // toolbar during window creation (i.e. before any tabs have been added | 2736 // toolbar during window creation (i.e. before any tabs have been added |
2742 // to the window). | 2737 // to the window). |
2743 TabContents* current_tab = browser_->GetSelectedTabContents(); | 2738 TabContents* current_tab = browser_->GetSelectedTabContents(); |
2744 return current_tab ? ¤t_tab->controller() : NULL; | 2739 return current_tab ? ¤t_tab->controller() : NULL; |
2745 } | 2740 } |
OLD | NEW |