OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 2957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2968 key_code == ui::VKEY_F5 || | 2968 key_code == ui::VKEY_F5 || |
2969 key_code == ui::VKEY_F6 || | 2969 key_code == ui::VKEY_F6 || |
2970 key_code == ui::VKEY_F7 || | 2970 key_code == ui::VKEY_F7 || |
2971 key_code == ui::VKEY_F8 || | 2971 key_code == ui::VKEY_F8 || |
2972 key_code == ui::VKEY_F9 || | 2972 key_code == ui::VKEY_F9 || |
2973 key_code == ui::VKEY_F10) { | 2973 key_code == ui::VKEY_F10) { |
2974 return true; | 2974 return true; |
2975 } | 2975 } |
2976 #endif | 2976 #endif |
2977 | 2977 |
| 2978 // In Apps mode, no keys are reserved. |
| 2979 if (is_app()) |
| 2980 return false; |
| 2981 |
2978 if (window_->IsFullscreen() && command_id == IDC_FULLSCREEN) | 2982 if (window_->IsFullscreen() && command_id == IDC_FULLSCREEN) |
2979 return true; | 2983 return true; |
2980 return command_id == IDC_CLOSE_TAB || | 2984 return command_id == IDC_CLOSE_TAB || |
2981 command_id == IDC_CLOSE_WINDOW || | 2985 command_id == IDC_CLOSE_WINDOW || |
2982 command_id == IDC_NEW_INCOGNITO_WINDOW || | 2986 command_id == IDC_NEW_INCOGNITO_WINDOW || |
2983 command_id == IDC_NEW_TAB || | 2987 command_id == IDC_NEW_TAB || |
2984 command_id == IDC_NEW_WINDOW || | 2988 command_id == IDC_NEW_WINDOW || |
2985 command_id == IDC_RESTORE_TAB || | 2989 command_id == IDC_RESTORE_TAB || |
2986 command_id == IDC_SELECT_NEXT_TAB || | 2990 command_id == IDC_SELECT_NEXT_TAB || |
2987 command_id == IDC_SELECT_PREVIOUS_TAB || | 2991 command_id == IDC_SELECT_PREVIOUS_TAB || |
(...skipping 2660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5648 } else { | 5652 } else { |
5649 LoginUIServiceFactory::GetForProfile( | 5653 LoginUIServiceFactory::GetForProfile( |
5650 profile()->GetOriginalProfile())->ShowLoginUI(false); | 5654 profile()->GetOriginalProfile())->ShowLoginUI(false); |
5651 } | 5655 } |
5652 #endif | 5656 #endif |
5653 } | 5657 } |
5654 | 5658 |
5655 void Browser::ToggleSpeechInput() { | 5659 void Browser::ToggleSpeechInput() { |
5656 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); | 5660 GetSelectedWebContents()->GetRenderViewHost()->ToggleSpeechInput(); |
5657 } | 5661 } |
OLD | NEW |