1 // Copyright 2014 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.
5 #include "device/hid/hid_usage_and_page.h"
9 bool HidUsageAndPage::IsProtected() const {
10 if (usage_page
== HidUsageAndPage::kPageKeyboard
)
13 if (usage_page
!= HidUsageAndPage::kPageGenericDesktop
)
16 if (usage
== HidUsageAndPage::kGenericDesktopPointer
||
17 usage
== HidUsageAndPage::kGenericDesktopMouse
||
18 usage
== HidUsageAndPage::kGenericDesktopKeyboard
||
19 usage
== HidUsageAndPage::kGenericDesktopKeypad
) {
23 if (usage
>= HidUsageAndPage::kGenericDesktopSystemControl
&&
24 usage
<= HidUsageAndPage::kGenericDesktopSystemWarmRestart
) {
28 if (usage
>= HidUsageAndPage::kGenericDesktopSystemDock
&&
29 usage
<= HidUsageAndPage::kGenericDesktopSystemDisplaySwap
) {