| 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/keyboard_codes.h" | 10 #include "base/keyboard_codes.h" |
| (...skipping 2123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2134 | 2134 |
| 2135 int command_id = window()->GetCommandId(event); | 2135 int command_id = window()->GetCommandId(event); |
| 2136 return command_id == IDC_CLOSE_TAB || | 2136 return command_id == IDC_CLOSE_TAB || |
| 2137 command_id == IDC_CLOSE_POPUPS || | 2137 command_id == IDC_CLOSE_POPUPS || |
| 2138 command_id == IDC_CLOSE_WINDOW || | 2138 command_id == IDC_CLOSE_WINDOW || |
| 2139 command_id == IDC_NEW_INCOGNITO_WINDOW || | 2139 command_id == IDC_NEW_INCOGNITO_WINDOW || |
| 2140 command_id == IDC_NEW_TAB || | 2140 command_id == IDC_NEW_TAB || |
| 2141 command_id == IDC_NEW_WINDOW || | 2141 command_id == IDC_NEW_WINDOW || |
| 2142 command_id == IDC_RESTORE_TAB || | 2142 command_id == IDC_RESTORE_TAB || |
| 2143 command_id == IDC_SELECT_NEXT_TAB || | 2143 command_id == IDC_SELECT_NEXT_TAB || |
| 2144 command_id == IDC_SELECT_PREVIOUS_TAB || | 2144 command_id == IDC_SELECT_PREVIOUS_TAB; |
| 2145 command_id == IDC_TASK_MANAGER; | |
| 2146 } | 2145 } |
| 2147 | 2146 |
| 2148 void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) { | 2147 void Browser::ShowRepostFormWarningDialog(TabContents *tab_contents) { |
| 2149 window()->ShowRepostFormWarningDialog(tab_contents); | 2148 window()->ShowRepostFormWarningDialog(tab_contents); |
| 2150 } | 2149 } |
| 2151 | 2150 |
| 2152 /////////////////////////////////////////////////////////////////////////////// | 2151 /////////////////////////////////////////////////////////////////////////////// |
| 2153 // Browser, SelectFileDialog::Listener implementation: | 2152 // Browser, SelectFileDialog::Listener implementation: |
| 2154 | 2153 |
| 2155 void Browser::FileSelected(const FilePath& path, int index, void* params) { | 2154 void Browser::FileSelected(const FilePath& path, int index, void* params) { |
| (...skipping 825 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2981 /////////////////////////////////////////////////////////////////////////////// | 2980 /////////////////////////////////////////////////////////////////////////////// |
| 2982 // BrowserToolbarModel (private): | 2981 // BrowserToolbarModel (private): |
| 2983 | 2982 |
| 2984 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { | 2983 NavigationController* Browser::BrowserToolbarModel::GetNavigationController() { |
| 2985 // This |current_tab| can be NULL during the initialization of the | 2984 // This |current_tab| can be NULL during the initialization of the |
| 2986 // toolbar during window creation (i.e. before any tabs have been added | 2985 // toolbar during window creation (i.e. before any tabs have been added |
| 2987 // to the window). | 2986 // to the window). |
| 2988 TabContents* current_tab = browser_->GetSelectedTabContents(); | 2987 TabContents* current_tab = browser_->GetSelectedTabContents(); |
| 2989 return current_tab ? ¤t_tab->controller() : NULL; | 2988 return current_tab ? ¤t_tab->controller() : NULL; |
| 2990 } | 2989 } |
| OLD | NEW |