/* * Copyright (c) 2023 Huawei Device Co., Ltd. * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #ifndef OHOS_ROSEN_WINDOW_EXTENSION_SESSION_IMPL_H #define OHOS_ROSEN_WINDOW_EXTENSION_SESSION_IMPL_H #include "window_session_impl.h" namespace OHOS { namespace Rosen { class WindowExtensionSessionImpl : public WindowSessionImpl { public: explicit WindowExtensionSessionImpl(const sptr& option); ~WindowExtensionSessionImpl(); WMError Create(const std::shared_ptr& context, const sptr& iSession) override; WMError MoveTo(int32_t x, int32_t y) override; WMError Resize(uint32_t width, uint32_t height) override; WMError TransferAbilityResult(uint32_t resultCode, const AAFwk::Want& want) override; WMError TransferExtensionData(const AAFwk::WantParams& wantParams) override; WSError NotifyTransferComponentData(const AAFwk::WantParams& wantParams) override; void RegisterTransferComponentDataListener(const NotifyTransferComponentDataFunc& func) override; WMError SetPrivacyMode(bool isPrivacyMode) override; WMError SetUIContent(const std::string& contentInfo, NativeEngine* engine, NativeValue* storage, bool isdistributed, AppExecFwk::Ability* ability) override; void NotifyFocusActiveEvent(bool isFocusActive) override; void NotifyFocusStateEvent(bool focusState) override; protected: NotifyTransferComponentDataFunc notifyTransferComponentDataFunc_; private: std::optional> focusState_ = std::nullopt; }; } // namespace Rosen } // namespace OHOS #endif // OHOS_ROSEN_WINDOW_EXTENSION_SESSION_IMPL_H