1 /* 2 * Copyright (c) 2024 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 #ifndef OHOS_ABILITY_RUNTIME_IBROWSER_H 17 #define OHOS_ABILITY_RUNTIME_IBROWSER_H 18 19 #include "iremote_broker.h" 20 #include "irender_scheduler.h" 21 #include "surface.h" 22 23 namespace OHOS { 24 namespace NWeb { 25 /** 26 * @class IBrowser 27 * Ipc interface of render process to app mgr service 28 */ 29 class IBrowser : public IRemoteBroker { 30 public: 31 DECLARE_INTERFACE_DESCRIPTOR(u"ohos.appexecfwk.Browser"); 32 33 virtual sptr<IRemoteObject> QueryRenderSurface(int32_t surface_id) = 0; 34 35 virtual void ReportThread(int32_t status, int32_t process_id, int32_t thread_id, int32_t role) = 0; 36 37 virtual void PassSurface(sptr<Surface> surface, int64_t surface_id) = 0; 38 39 virtual void DestroyRenderSurface(int32_t surface_id) = 0; 40 41 enum class Message { 42 QUERY_RENDER_SURFACE = 1, 43 REPORT_THREAD = 2, 44 PASS_SURFACE = 3, 45 DESTROY_RENDER_SURFACE = 4, 46 }; 47 }; 48 } // namespace NWeb 49 } // namespace OHOS 50 #endif // OHOS_ABILITY_RUNTIME_IBROWSER_H