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 "extension_window_impl.h"
17 #include "window_manager_hilog.h"
18 #include "wm_common.h"
19
20 namespace OHOS {
21 namespace Rosen {
22 namespace {
23 constexpr HiviewDFX::HiLogLabel LABEL = {LOG_CORE, HILOG_DOMAIN_WINDOW, "ExtensionWindowImpl"};
24 }
25
ExtensionWindowImpl(sptr<Window> sessionImpl)26 Rosen::ExtensionWindowImpl::ExtensionWindowImpl(sptr<Window> sessionImpl)
27 : windowExtensionSessionImpl_(sessionImpl) {
28 }
29
~ExtensionWindowImpl()30 ExtensionWindowImpl::~ExtensionWindowImpl() {}
31
GetAvoidAreaByType(AvoidAreaType type,AvoidArea & avoidArea)32 WMError ExtensionWindowImpl::GetAvoidAreaByType(AvoidAreaType type, AvoidArea& avoidArea)
33 {
34 WLOGI("GetAvoidAreaByType is called");
35 return windowExtensionSessionImpl_->GetAvoidAreaByType(type, avoidArea);
36 }
37
GetWindow()38 sptr<Window> ExtensionWindowImpl::GetWindow()
39 {
40 return windowExtensionSessionImpl_;
41 }
42
HideNonSecureWindows(bool shouldHide)43 WMError ExtensionWindowImpl::HideNonSecureWindows(bool shouldHide)
44 {
45 WLOGI("HideNonSecureWindows is called");
46 return windowExtensionSessionImpl_->HideNonSecureWindows(shouldHide);
47 }
48 } // namespace Rosen
49 } // namespace OHOS
50