Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(362)

Side by Side Diff: ash/accelerators/accelerator_table.cc

Issue 1827323002: Take screenshot of active window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 "ash/accelerators/accelerator_table.h" 5 #include "ash/accelerators/accelerator_table.h"
6 6
7 #include "ash/strings/grit/ash_strings.h" 7 #include "ash/strings/grit/ash_strings.h"
8 #include "base/macros.h" 8 #include "base/macros.h"
9 9
10 namespace ash { 10 namespace ash {
(...skipping 18 matching lines...) Expand all
29 { true, ui::VKEY_WLAN, ui::EF_NONE, TOGGLE_WIFI }, 29 { true, ui::VKEY_WLAN, ui::EF_NONE, TOGGLE_WIFI },
30 { true, ui::VKEY_KBD_BRIGHTNESS_DOWN, ui::EF_NONE, KEYBOARD_BRIGHTNESS_DOWN }, 30 { true, ui::VKEY_KBD_BRIGHTNESS_DOWN, ui::EF_NONE, KEYBOARD_BRIGHTNESS_DOWN },
31 { true, ui::VKEY_KBD_BRIGHTNESS_UP, ui::EF_NONE, KEYBOARD_BRIGHTNESS_UP }, 31 { true, ui::VKEY_KBD_BRIGHTNESS_UP, ui::EF_NONE, KEYBOARD_BRIGHTNESS_UP },
32 // Maximize button. 32 // Maximize button.
33 { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_CONTROL_DOWN, TOGGLE_MIRROR_MODE }, 33 { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_CONTROL_DOWN, TOGGLE_MIRROR_MODE },
34 { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_ALT_DOWN, SWAP_PRIMARY_DISPLAY }, 34 { true, ui::VKEY_MEDIA_LAUNCH_APP2, ui::EF_ALT_DOWN, SWAP_PRIMARY_DISPLAY },
35 // Cycle windows button. 35 // Cycle windows button.
36 { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN, TAKE_SCREENSHOT }, 36 { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_CONTROL_DOWN, TAKE_SCREENSHOT },
37 { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN, 37 { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_SHIFT_DOWN | ui::EF_CONTROL_DOWN,
38 TAKE_PARTIAL_SCREENSHOT }, 38 TAKE_PARTIAL_SCREENSHOT },
39 { true, ui::VKEY_MEDIA_LAUNCH_APP1, ui::EF_ALT_DOWN | ui::EF_CONTROL_DOWN,
40 TAKE_ACTIVE_WINDOW_SCREENSHOT },
39 { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_NONE, BRIGHTNESS_DOWN }, 41 { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_NONE, BRIGHTNESS_DOWN },
40 { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_ALT_DOWN, KEYBOARD_BRIGHTNESS_DOWN }, 42 { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_ALT_DOWN, KEYBOARD_BRIGHTNESS_DOWN },
41 { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_NONE, BRIGHTNESS_UP }, 43 { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_NONE, BRIGHTNESS_UP },
42 { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_ALT_DOWN, KEYBOARD_BRIGHTNESS_UP }, 44 { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_ALT_DOWN, KEYBOARD_BRIGHTNESS_UP },
43 { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, 45 { true, ui::VKEY_BRIGHTNESS_DOWN, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
44 MAGNIFY_SCREEN_ZOOM_OUT}, 46 MAGNIFY_SCREEN_ZOOM_OUT},
45 { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN, 47 { true, ui::VKEY_BRIGHTNESS_UP, ui::EF_CONTROL_DOWN | ui::EF_ALT_DOWN,
46 MAGNIFY_SCREEN_ZOOM_IN}, 48 MAGNIFY_SCREEN_ZOOM_IN},
47 { true, ui::VKEY_L, ui::EF_COMMAND_DOWN, LOCK_SCREEN }, 49 { true, ui::VKEY_L, ui::EF_COMMAND_DOWN, LOCK_SCREEN },
48 // The lock key on Chrome OS keyboards produces F13 scancodes. 50 // The lock key on Chrome OS keyboards produces F13 scancodes.
(...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after
341 MAGNIFY_SCREEN_ZOOM_OUT, // Control+F6 343 MAGNIFY_SCREEN_ZOOM_OUT, // Control+F6
342 NEXT_IME, 344 NEXT_IME,
343 PREVIOUS_IME, 345 PREVIOUS_IME,
344 PRINT_UI_HIERARCHIES, 346 PRINT_UI_HIERARCHIES,
345 ROTATE_SCREEN, 347 ROTATE_SCREEN,
346 SCALE_UI_UP, 348 SCALE_UI_UP,
347 SCALE_UI_DOWN, 349 SCALE_UI_DOWN,
348 SCALE_UI_RESET, 350 SCALE_UI_RESET,
349 SHOW_SYSTEM_TRAY_BUBBLE, 351 SHOW_SYSTEM_TRAY_BUBBLE,
350 SWITCH_IME, // Switch to another IME depending on the accelerator. 352 SWITCH_IME, // Switch to another IME depending on the accelerator.
353 TAKE_ACTIVE_WINDOW_SCREENSHOT,
351 TAKE_PARTIAL_SCREENSHOT, 354 TAKE_PARTIAL_SCREENSHOT,
352 TAKE_SCREENSHOT, 355 TAKE_SCREENSHOT,
353 #if defined(OS_CHROMEOS) 356 #if defined(OS_CHROMEOS)
354 BRIGHTNESS_DOWN, 357 BRIGHTNESS_DOWN,
355 BRIGHTNESS_UP, 358 BRIGHTNESS_UP,
356 DEBUG_ADD_REMOVE_DISPLAY, 359 DEBUG_ADD_REMOVE_DISPLAY,
357 DEBUG_TOGGLE_TOUCH_PAD, 360 DEBUG_TOGGLE_TOUCH_PAD,
358 DEBUG_TOGGLE_TOUCH_SCREEN, 361 DEBUG_TOGGLE_TOUCH_SCREEN,
359 DISABLE_CAPS_LOCK, 362 DISABLE_CAPS_LOCK,
360 DISABLE_GPU_WATCHDOG, 363 DISABLE_GPU_WATCHDOG,
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
396 NEXT_IME, 399 NEXT_IME,
397 OPEN_FEEDBACK_PAGE, 400 OPEN_FEEDBACK_PAGE,
398 PREVIOUS_IME, 401 PREVIOUS_IME,
399 PRINT_UI_HIERARCHIES, 402 PRINT_UI_HIERARCHIES,
400 ROTATE_SCREEN, 403 ROTATE_SCREEN,
401 SCALE_UI_UP, 404 SCALE_UI_UP,
402 SCALE_UI_DOWN, 405 SCALE_UI_DOWN,
403 SCALE_UI_RESET, 406 SCALE_UI_RESET,
404 SHOW_KEYBOARD_OVERLAY, 407 SHOW_KEYBOARD_OVERLAY,
405 SWITCH_IME, 408 SWITCH_IME,
409 TAKE_ACTIVE_WINDOW_SCREENSHOT,
406 TAKE_PARTIAL_SCREENSHOT, 410 TAKE_PARTIAL_SCREENSHOT,
407 TAKE_SCREENSHOT, 411 TAKE_SCREENSHOT,
408 #if defined(OS_CHROMEOS) 412 #if defined(OS_CHROMEOS)
409 BRIGHTNESS_DOWN, 413 BRIGHTNESS_DOWN,
410 BRIGHTNESS_UP, 414 BRIGHTNESS_UP,
411 DEBUG_ADD_REMOVE_DISPLAY, 415 DEBUG_ADD_REMOVE_DISPLAY,
412 DEBUG_TOGGLE_TOUCH_PAD, 416 DEBUG_TOGGLE_TOUCH_PAD,
413 DEBUG_TOGGLE_TOUCH_SCREEN, 417 DEBUG_TOGGLE_TOUCH_SCREEN,
414 DISABLE_CAPS_LOCK, 418 DISABLE_CAPS_LOCK,
415 KEYBOARD_BRIGHTNESS_DOWN, 419 KEYBOARD_BRIGHTNESS_DOWN,
(...skipping 20 matching lines...) Expand all
436 CYCLE_BACKWARD_MRU, 440 CYCLE_BACKWARD_MRU,
437 CYCLE_FORWARD_MRU, 441 CYCLE_FORWARD_MRU,
438 EXIT, 442 EXIT,
439 OPEN_FEEDBACK_PAGE, 443 OPEN_FEEDBACK_PAGE,
440 PRINT_UI_HIERARCHIES, // Don't fill the logs if the key is held down. 444 PRINT_UI_HIERARCHIES, // Don't fill the logs if the key is held down.
441 ROTATE_SCREEN, 445 ROTATE_SCREEN,
442 ROTATE_WINDOW, 446 ROTATE_WINDOW,
443 SCALE_UI_UP, 447 SCALE_UI_UP,
444 SCALE_UI_DOWN, 448 SCALE_UI_DOWN,
445 SCALE_UI_RESET, 449 SCALE_UI_RESET,
450 TAKE_ACTIVE_WINDOW_SCREENSHOT,
446 TAKE_PARTIAL_SCREENSHOT, 451 TAKE_PARTIAL_SCREENSHOT,
447 TAKE_SCREENSHOT, 452 TAKE_SCREENSHOT,
448 TOGGLE_FULLSCREEN, 453 TOGGLE_FULLSCREEN,
449 TOGGLE_MAXIMIZED, 454 TOGGLE_MAXIMIZED,
450 TOGGLE_OVERVIEW, 455 TOGGLE_OVERVIEW,
451 WINDOW_MINIMIZE, 456 WINDOW_MINIMIZE,
452 #if defined(OS_CHROMEOS) 457 #if defined(OS_CHROMEOS)
453 DEBUG_TOGGLE_TOUCH_PAD, 458 DEBUG_TOGGLE_TOUCH_PAD,
454 DEBUG_TOGGLE_TOUCH_SCREEN, 459 DEBUG_TOGGLE_TOUCH_SCREEN,
455 LOCK_SCREEN, 460 LOCK_SCREEN,
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
519 const size_t kActionsNeedingWindowLength = arraysize(kActionsNeedingWindow); 524 const size_t kActionsNeedingWindowLength = arraysize(kActionsNeedingWindow);
520 525
521 const AcceleratorAction kActionsKeepingMenuOpen[] = { 526 const AcceleratorAction kActionsKeepingMenuOpen[] = {
522 MEDIA_NEXT_TRACK, 527 MEDIA_NEXT_TRACK,
523 MEDIA_PLAY_PAUSE, 528 MEDIA_PLAY_PAUSE,
524 MEDIA_PREV_TRACK, 529 MEDIA_PREV_TRACK,
525 NEXT_IME, 530 NEXT_IME,
526 PREVIOUS_IME, 531 PREVIOUS_IME,
527 PRINT_UI_HIERARCHIES, 532 PRINT_UI_HIERARCHIES,
528 SWITCH_IME, 533 SWITCH_IME,
534 TAKE_ACTIVE_WINDOW_SCREENSHOT,
529 TAKE_PARTIAL_SCREENSHOT, 535 TAKE_PARTIAL_SCREENSHOT,
530 TAKE_SCREENSHOT, 536 TAKE_SCREENSHOT,
531 #if defined(OS_CHROMEOS) 537 #if defined(OS_CHROMEOS)
532 BRIGHTNESS_DOWN, 538 BRIGHTNESS_DOWN,
533 BRIGHTNESS_UP, 539 BRIGHTNESS_UP,
534 DEBUG_TOGGLE_TOUCH_PAD, 540 DEBUG_TOGGLE_TOUCH_PAD,
535 DEBUG_TOGGLE_TOUCH_SCREEN, 541 DEBUG_TOGGLE_TOUCH_SCREEN,
536 DISABLE_CAPS_LOCK, 542 DISABLE_CAPS_LOCK,
537 KEYBOARD_BRIGHTNESS_DOWN, 543 KEYBOARD_BRIGHTNESS_DOWN,
538 KEYBOARD_BRIGHTNESS_UP, 544 KEYBOARD_BRIGHTNESS_UP,
539 TOGGLE_CAPS_LOCK, 545 TOGGLE_CAPS_LOCK,
540 TOGGLE_SPOKEN_FEEDBACK, 546 TOGGLE_SPOKEN_FEEDBACK,
541 TOGGLE_WIFI, 547 TOGGLE_WIFI,
542 VOLUME_DOWN, 548 VOLUME_DOWN,
543 VOLUME_MUTE, 549 VOLUME_MUTE,
544 VOLUME_UP, 550 VOLUME_UP,
545 #endif // defined(OS_CHROMEOS) 551 #endif // defined(OS_CHROMEOS)
546 }; 552 };
547 553
548 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen); 554 const size_t kActionsKeepingMenuOpenLength = arraysize(kActionsKeepingMenuOpen);
549 555
550 } // namespace ash 556 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698