debug_commands.h 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. // Copyright 2013 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef ASH_ACCELERATORS_DEBUG_COMMANDS_H_
  5. #define ASH_ACCELERATORS_DEBUG_COMMANDS_H_
  6. #include "ash/accelerators/accelerator_table.h"
  7. #include "ash/ash_export.h"
  8. // This file contains implementations of commands that are used only when
  9. // debugging.
  10. //
  11. // NOTE: these commands may be enabled in about:flags, so that they may be
  12. // available at run time.
  13. namespace ash {
  14. namespace debug {
  15. // Print the views::View, ui::Layer and aura::Window hierarchies. This may be
  16. // useful in debugging user reported bugs.
  17. ASH_EXPORT void PrintUIHierarchies();
  18. // Returns true if debug accelerators are enabled.
  19. ASH_EXPORT bool DebugAcceleratorsEnabled();
  20. // Returns true if developer accelerators are enabled.
  21. ASH_EXPORT bool DeveloperAcceleratorsEnabled();
  22. // Performs |action| if |action| belongs to a debug-only accelerator and debug
  23. // accelerators are enabled.
  24. ASH_EXPORT void PerformDebugActionIfEnabled(AcceleratorAction action);
  25. } // namespace debug
  26. } // namespace ash
  27. #endif // ASH_ACCELERATORS_DEBUG_COMMANDS_H_