1 /*
2 * Copyright (c) 2023 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16 #include "ohos_adapter/include/ark_res_sched_client_adapter.h"
17 #include "res_sched_client_adapter.h"
18
19 namespace OHOS::NWeb {
20
ReportKeyThread(ResSchedStatusAdapter statusAdapter,pid_t pid,pid_t tid,ResSchedRoleAdapter roleAdapter)21 bool ResSchedClientAdapter::ReportKeyThread(
22 ResSchedStatusAdapter statusAdapter, pid_t pid, pid_t tid, ResSchedRoleAdapter roleAdapter)
23 {
24 return OHOS::ArkWeb::ArkResSchedClientAdapter::ReportKeyThread(
25 (int32_t)statusAdapter, pid, tid, (int32_t)roleAdapter);
26 }
27
ReportWindowStatus(ResSchedStatusAdapter statusAdapter,pid_t pid,uint32_t windowId,int32_t nwebId)28 bool ResSchedClientAdapter::ReportWindowStatus(
29 ResSchedStatusAdapter statusAdapter, pid_t pid, uint32_t windowId, int32_t nwebId)
30 {
31 return OHOS::ArkWeb::ArkResSchedClientAdapter::ReportWindowStatus((int32_t)statusAdapter, pid, windowId, nwebId);
32 }
33
ReportScene(ResSchedStatusAdapter statusAdapter,ResSchedSceneAdapter sceneAdapter,int32_t nwebId)34 bool ResSchedClientAdapter::ReportScene(
35 ResSchedStatusAdapter statusAdapter, ResSchedSceneAdapter sceneAdapter, int32_t nwebId)
36 {
37 return OHOS::ArkWeb::ArkResSchedClientAdapter::ReportScene((int32_t)statusAdapter, (int32_t)sceneAdapter, nwebId);
38 }
39
ReportAudioData(ResSchedStatusAdapter statusAdapter,pid_t pid,pid_t tid)40 bool ResSchedClientAdapter::ReportAudioData(ResSchedStatusAdapter statusAdapter, pid_t pid, pid_t tid)
41 {
42 return OHOS::ArkWeb::ArkResSchedClientAdapter::ReportAudioData((int32_t)statusAdapter, pid, tid);
43 }
44
ReportWindowId(int32_t windowId,int32_t nwebId)45 void ResSchedClientAdapter::ReportWindowId(int32_t windowId, int32_t nwebId)
46 {
47 return OHOS::ArkWeb::ArkResSchedClientAdapter::ReportWindowId(windowId, nwebId);
48 }
49
ReportNWebInit(ResSchedStatusAdapter statusAdapter,int32_t nweb_id)50 void ResSchedClientAdapter::ReportNWebInit(ResSchedStatusAdapter statusAdapter, int32_t nweb_id)
51 {
52 return OHOS::ArkWeb::ArkResSchedClientAdapter::ReportNWebInit((int32_t)statusAdapter, nweb_id);
53 }
54
ReportRenderProcessStatus(ResSchedStatusAdapter statusAdapter,pid_t pid)55 void ResSchedClientAdapter::ReportRenderProcessStatus(ResSchedStatusAdapter statusAdapter, pid_t pid)
56 {
57 return OHOS::ArkWeb::ArkResSchedClientAdapter::ReportRenderProcessStatus((int32_t)statusAdapter, pid);
58 }
59
ReportScreenCapture(ResSchedStatusAdapter statusAdapter,pid_t pid)60 bool ResSchedClientAdapter::ReportScreenCapture(ResSchedStatusAdapter statusAdapter, pid_t pid)
61 {
62 return OHOS::ArkWeb::ArkResSchedClientAdapter::ReportScreenCapture((int32_t)statusAdapter, pid);
63 }
64
ReportVideoPlaying(ResSchedStatusAdapter statusAdapter,pid_t pid)65 bool ResSchedClientAdapter::ReportVideoPlaying(ResSchedStatusAdapter statusAdapter, pid_t pid)
66 {
67 return OHOS::ArkWeb::ArkResSchedClientAdapter::ReportVideoPlaying((int32_t)statusAdapter, pid);
68 }
69
ReportProcessInUse(pid_t pid)70 void ResSchedClientAdapter::ReportProcessInUse(pid_t pid)
71 {
72 OHOS::ArkWeb::ArkResSchedClientAdapter::ReportProcessInUse(pid);
73 }
74
ReportSiteIsolationMode(bool mode)75 void ResSchedClientAdapter::ReportSiteIsolationMode(bool mode)
76 {
77 OHOS::ArkWeb::ArkResSchedClientAdapter::ReportSiteIsolationMode(mode);
78 }
79 } // namespace OHOS::NWeb
80