event_client_impl.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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
  3. // found in the LICENSE file.
  4. #ifndef ASH_WM_EVENT_CLIENT_IMPL_H_
  5. #define ASH_WM_EVENT_CLIENT_IMPL_H_
  6. #include "ash/ash_export.h"
  7. #include "ui/aura/client/event_client.h"
  8. namespace ash {
  9. class ScopedSkipUserSessionBlockedCheck;
  10. class ASH_EXPORT EventClientImpl : public aura::client::EventClient {
  11. public:
  12. EventClientImpl();
  13. EventClientImpl(const EventClientImpl&) = delete;
  14. EventClientImpl& operator=(const EventClientImpl&) = delete;
  15. ~EventClientImpl() override;
  16. private:
  17. friend class ScopedSkipUserSessionBlockedCheck;
  18. // Overridden from aura::client::EventClient:
  19. bool GetCanProcessEventsWithinSubtree(
  20. const aura::Window* window) const override;
  21. ui::EventTarget* GetToplevelEventTarget() override;
  22. // This should only be used by ScopedSkipUserSessionBlockedCheck for blocks of
  23. // code which we want the checking of the user session to be blocked (ie.
  24. // building mru list when entering tablet mode in lock screen).
  25. void set_skip_user_session_blocked_check(
  26. bool skip_user_session_blocked_check) {
  27. skip_user_session_blocked_check_ = skip_user_session_blocked_check;
  28. }
  29. // Flag indicating whether the user sesion checks in
  30. // GetCanProcessEventsWithinSubtree should be skipped.
  31. bool skip_user_session_blocked_check_ = false;
  32. };
  33. } // namespace ash
  34. #endif // ASH_WM_EVENT_CLIENT_IMPL_H_