Chromium Code Reviews| Index: chrome/browser/ui/browser_command_controller.cc |
| diff --git a/chrome/browser/ui/browser_command_controller.cc b/chrome/browser/ui/browser_command_controller.cc |
| index 125126de6c63eee0ace3dd5f09879de389270d92..45075ac1c301115da4cad4067878d91f484cd54c 100644 |
| --- a/chrome/browser/ui/browser_command_controller.cc |
| +++ b/chrome/browser/ui/browser_command_controller.cc |
| @@ -187,8 +187,27 @@ bool BrowserCommandController::IsReservedCommandOrKey( |
| } |
| #endif |
| - if (window()->IsFullscreen() && command_id == IDC_FULLSCREEN) |
| - return true; |
| + if (window()->IsFullscreen()) { |
| + // In fullscreen, all commands except for IDC_FULLSCREEN and IDC_EXIT should |
| + // be delivered to the web page. See, intent to implement and ship can be |
|
msw
2017/04/05 23:55:10
nit: grammar, consider "The intent to implement an
Hzj_jie
2017/04/06 02:37:58
Done.
|
| + // found in http://crbug.com/680809. |
| + const bool is_exit_fullscreen = |
| + (command_id == IDC_EXIT || command_id == IDC_FULLSCREEN); |
| +#if defined(OS_MACOSX) |
| + // This behavior is different on Mac OS, which has a unique user-initiated |
| + // full-screen mode. According to the discussion in http://crbug.com/702251, |
| + // the commands should be reserved for browser-side handling if the browser |
| + // window's toolbar is visible. |
| + if (window()->IsToolbarShowing()) { |
| + if (command_id == IDC_FULLSCREEN) |
| + return true; |
| + } else { |
| + return is_exit_fullscreen; |
| + } |
| +#else |
| + return is_exit_fullscreen; |
| +#endif |
| + } |
| #if defined(OS_LINUX) && !defined(OS_CHROMEOS) |
| // If this key was registered by the user as a content editing hotkey, then |