1 /* 2 * Copyright (c) 2023-2025 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 FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_UI_EXTENSION_UEC_UI_EXTENSION_PATTERN_H 17 #define FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_UI_EXTENSION_UEC_UI_EXTENSION_PATTERN_H 18 19 #include <cstdint> 20 #include <functional> 21 #include <list> 22 #include <memory> 23 #include <optional> 24 #include <refbase.h> 25 #include <vector> 26 27 #include "base/memory/referenced.h" 28 #include "base/want/want_wrap.h" 29 #include "core/common/container.h" 30 #include "core/components_ng/event/gesture_event_hub.h" 31 #include "core/components_ng/manager/avoid_info/avoid_info_manager.h" 32 #include "core/components_ng/pattern/pattern.h" 33 #include "core/components_ng/pattern/ui_extension/accessibility_session_adapter_ui_extension.h" 34 #include "core/components_ng/pattern/ui_extension/platform_event_proxy.h" 35 #include "core/components_ng/pattern/ui_extension/session_wrapper.h" 36 #include "core/components_ng/pattern/ui_extension/ui_extension_config.h" 37 #ifdef SUPPORT_DIGITAL_CROWN 38 #include "core/event/crown_event.h" 39 #endif 40 #include "core/event/mouse_event.h" 41 #include "core/event/touch_event.h" 42 43 #define UIEXT_LOGD(fmt, ...) \ 44 TAG_LOGD(AceLogTag::ACE_UIEXTENSIONCOMPONENT, "[@%{public}d][ID: %{public}d] " fmt, __LINE__, uiExtensionId_, \ 45 ##__VA_ARGS__) 46 #define UIEXT_LOGI(fmt, ...) \ 47 TAG_LOGI(AceLogTag::ACE_UIEXTENSIONCOMPONENT, "[@%{public}d][ID: %{public}d] " fmt, __LINE__, uiExtensionId_, \ 48 ##__VA_ARGS__) 49 #define UIEXT_LOGW(fmt, ...) \ 50 TAG_LOGW(AceLogTag::ACE_UIEXTENSIONCOMPONENT, "[@%{public}d][ID: %{public}d] " fmt, __LINE__, uiExtensionId_, \ 51 ##__VA_ARGS__) 52 #define UIEXT_LOGE(fmt, ...) \ 53 TAG_LOGE(AceLogTag::ACE_UIEXTENSIONCOMPONENT, "[@%{public}d][ID: %{public}d] " fmt, __LINE__, uiExtensionId_, \ 54 ##__VA_ARGS__) 55 #define UIEXT_LOGF(fmt, ...) \ 56 TAG_LOGF(AceLogTag::ACE_UIEXTENSIONCOMPONENT, "[@%{public}d][ID: %{public}d] " fmt, __LINE__, uiExtensionId_, \ 57 ##__VA_ARGS__) 58 59 namespace OHOS::Accessibility { 60 class AccessibilityElementInfo; 61 class AccessibilityEventInfo; 62 } // namespace OHOS::Accessibility 63 64 namespace OHOS::MMI { 65 class KeyEvent; 66 class PointerEvent; 67 } // namespace OHOS::MMI 68 69 namespace OHOS::Ace { 70 class ModalUIExtensionProxy; 71 class AccessibilityChildTreeCallback; 72 class AccessibilitySAObserverCallback; 73 struct AccessibilityParentRectInfo; 74 } // namespace OHOS::Ace 75 76 namespace OHOS::Rosen { 77 class AvoidArea; 78 class RSTransaction; 79 enum class WindowMode : uint32_t; 80 } // namespace OHOS::Rosen 81 82 namespace OHOS::Ace::NG { 83 84 struct SessionViewportConfig { 85 bool isDensityFollowHost_ = false; 86 float density_ = 1.0f; 87 uint64_t displayId_ = 0; 88 int32_t orientation_ = 0; 89 uint32_t transform_ = 0; 90 }; 91 using BusinessDataUECConsumeCallback = std::function<int32_t(const AAFwk::Want&)>; 92 using BusinessDataUECConsumeReplyCallback = std::function<int32_t(const AAFwk::Want&, std::optional<AAFwk::Want>&)>; 93 94 class UIExtensionProxy; 95 class UIExtensionPattern : public Pattern { 96 DECLARE_ACE_TYPE(UIExtensionPattern, Pattern); 97 98 public: 99 explicit UIExtensionPattern(bool isTransferringCaller = false, bool isModal = false, 100 bool isAsyncModalBinding = false, SessionType sessionType = SessionType::UI_EXTENSION_ABILITY); 101 ~UIExtensionPattern() override; 102 103 void Initialize(); 104 RefPtr<LayoutAlgorithm> CreateLayoutAlgorithm() override; 105 FocusPattern GetFocusPattern() const override; 106 RefPtr<AccessibilitySessionAdapter> GetAccessibilitySessionAdapter() override; 107 SetPlaceholderMap(const std::map<PlaceholderType,RefPtr<NG::FrameNode>> & placeholderMap)108 void SetPlaceholderMap(const std::map<PlaceholderType, RefPtr<NG::FrameNode>>& placeholderMap) 109 { 110 placeholderMap_ = placeholderMap; 111 } 112 void UpdateWant(const RefPtr<OHOS::Ace::WantWrap>& wantWrap); 113 void UpdateWant(const AAFwk::Want& want); 114 115 void OnWindowShow() override; 116 void OnWindowHide() override; 117 void OnWindowSizeChanged(int32_t width, int32_t height, WindowSizeChangeReason type) override; 118 void OnRealVisibleChangeInner(bool visible); 119 void OnVisibleChange(bool visible) override; 120 void OnMountToParentDone() override; 121 void AfterMountToParent() override; 122 void OnSyncGeometryNode(const DirtySwapConfig& config) override; 123 void RegisterWindowSceneVisibleChangeCallback(const RefPtr<Pattern>& windowScenePattern); 124 void UnRegisterWindowSceneVisibleChangeCallback(int32_t nodeId); 125 void OnWindowSceneVisibleChange(bool visible); 126 void OnAttachToMainTree() override; 127 void OnDetachFromMainTree() override; 128 void OnAttachContext(PipelineContext *context) override; 129 void OnDetachContext(PipelineContext *context) override; 130 131 void OnConnect(); 132 void OnDisconnect(bool isAbnormal); 133 void HandleDragEvent(const DragPointerEvent& info) override; 134 135 void SetModalOnDestroy(const std::function<void()>&& callback); 136 void FireModalOnDestroy(); 137 void SetModalOnRemoteReadyCallback( 138 const std::function<void(const std::shared_ptr<ModalUIExtensionProxy>&)>&& callback); 139 void SetOnRemoteReadyCallback(const std::function<void(const RefPtr<UIExtensionProxy>&)>&& callback); 140 void FireOnRemoteReadyCallback(); 141 void SetOnReleaseCallback(const std::function<void(int32_t)>&& callback); 142 void FireOnReleaseCallback(int32_t releaseCode); 143 void SetOnResultCallback(const std::function<void(int32_t, const AAFwk::Want&)>&& callback); 144 void FireOnResultCallback(int32_t code, const AAFwk::Want& want); 145 void SetOnTerminatedCallback(const std::function<void(int32_t, const RefPtr<WantWrap>&)>&& callback); 146 void FireOnTerminatedCallback(int32_t code, const RefPtr<WantWrap>& wantWrap); 147 void SetOnReceiveCallback(const std::function<void(const AAFwk::WantParams&)>&& callback); 148 void FireOnReceiveCallback(const AAFwk::WantParams& params); 149 void SetOnErrorCallback( 150 const std::function<void(int32_t code, const std::string& name, const std::string& message)>&& callback); 151 void FireOnErrorCallback(int32_t code, const std::string& name, const std::string& message); 152 void SetSyncCallbacks(const std::list<std::function<void(const RefPtr<UIExtensionProxy>&)>>&& callbackList); 153 void FireSyncCallbacks(); 154 void SetAsyncCallbacks(const std::list<std::function<void(const RefPtr<UIExtensionProxy>&)>>&& callbackList); 155 void FireAsyncCallbacks(); 156 void SetBindModalCallback(const std::function<void()>&& callback); 157 void FireBindModalCallback(); 158 /* only for 1.2 begin */ 159 bool GetIsTransferringCaller(); 160 void SetIsTransferringCaller(bool isTransferringCaller); 161 /* only for 1.2 end */ 162 void SetDensityDpi(bool densityDpi); 163 bool GetDensityDpi(); 164 bool IsCompatibleOldVersion(); 165 166 void NotifySizeChangeReason( 167 WindowSizeChangeReason type, const std::shared_ptr<Rosen::RSTransaction>& rsTransaction); 168 void NotifyForeground(); 169 void NotifyBackground(bool isHandleError = true); 170 void NotifyDestroy(); 171 int32_t GetInstanceId() const; 172 int32_t GetSessionId() const; 173 int32_t GetNodeId() const; 174 int32_t GetUiExtensionId() override; GetSessionWrapper()175 RefPtr<SessionWrapper> GetSessionWrapper() 176 { 177 return sessionWrapper_; 178 } 179 int64_t WrapExtensionAbilityId(int64_t extensionOffset, int64_t abilityId) override; 180 void DispatchOriginAvoidArea(const Rosen::AvoidArea& avoidArea, uint32_t type); 181 void HandleVisibleAreaChange(bool visible, double ratio); 182 void SetWantWrap(const RefPtr<OHOS::Ace::WantWrap>& wantWrap); 183 RefPtr<OHOS::Ace::WantWrap> GetWantWrap(); IsShowPlaceholder()184 bool IsShowPlaceholder() 185 { 186 return (curPlaceholderType_ != PlaceholderType::NONE); 187 } IsCanMountPlaceholder(PlaceholderType type)188 bool IsCanMountPlaceholder(PlaceholderType type) 189 { 190 return (static_cast<int32_t>(type) > static_cast<int32_t>(curPlaceholderType_)); 191 } SetCurPlaceholderType(PlaceholderType type)192 void SetCurPlaceholderType(PlaceholderType type) 193 { 194 curPlaceholderType_ = type; 195 } 196 void PostDelayRemovePlaceholder(uint32_t delay); 197 void SetEventProxyFlag(int32_t flag); 198 void ReplacePlaceholderByContent(); 199 void OnExtensionEvent(UIExtCallbackEventId eventId); 200 void OnUeaAccessibilityEventAsync(); 201 void OnAreaUpdated(); 202 bool IsModalUec(); 203 bool IsForeground(); 204 void OnExtensionDetachToDisplay(); 205 206 void OnAccessibilityEvent(const Accessibility::AccessibilityEventInfo& info, int64_t uiExtensionOffset); SetModalFlag(bool isModal)207 void SetModalFlag(bool isModal) 208 { 209 isModal_ = isModal; 210 } 211 void OnAccessibilityChildTreeRegister(uint32_t windowId, int32_t treeId, int64_t accessibilityId); 212 void OnAccessibilityChildTreeDeregister(); 213 void OnSetAccessibilityChildTree(int32_t childWindowId, int32_t childTreeId); 214 void OnAccessibilityDumpChildInfo(const std::vector<std::string>& params, std::vector<std::string>& info); SetViewportConfigChanged(bool ViewportConfigChanged)215 void SetViewportConfigChanged(bool ViewportConfigChanged) 216 { 217 viewportConfigChanged_ = ViewportConfigChanged; 218 } IsViewportConfigChanged()219 bool IsViewportConfigChanged() const 220 { 221 return viewportConfigChanged_; 222 } IsForeground()223 bool IsForeground() const 224 { 225 return state_ == AbilityState::FOREGROUND; 226 } SetSessionViewportConfig(const SessionViewportConfig & config)227 void SetSessionViewportConfig(const SessionViewportConfig& config) 228 { 229 sessionViewportConfig_ = config; 230 } GetSessionViewportConfig()231 const SessionViewportConfig& GetSessionViewportConfig() const 232 { 233 return sessionViewportConfig_; 234 } 235 void DumpInfo() override; 236 void DumpInfo(std::unique_ptr<JsonValue>& json) override; 237 void DumpOthers(); 238 int32_t GetInstanceIdFromHost() const; 239 bool SendBusinessDataSyncReply(UIContentBusinessCode code, const AAFwk::Want& data, AAFwk::Want& reply, 240 RSSubsystemId subSystemId = RSSubsystemId::ARKUI_UIEXT); 241 bool SendBusinessData(UIContentBusinessCode code, const AAFwk::Want& data, BusinessDataSendType type, 242 RSSubsystemId subSystemId = RSSubsystemId::ARKUI_UIEXT); 243 void OnUIExtBusinessReceiveReply( 244 UIContentBusinessCode code, const AAFwk::Want& data, std::optional<AAFwk::Want>& reply); 245 void OnUIExtBusinessReceive(UIContentBusinessCode code, const AAFwk::Want& data); 246 void RegisterUIExtBusinessConsumeCallback(UIContentBusinessCode code, BusinessDataUECConsumeCallback callback); 247 void RegisterUIExtBusinessConsumeReplyCallback( 248 UIContentBusinessCode code, BusinessDataUECConsumeReplyCallback callback); 249 void SetOnDrawReadyCallback(const std::function<void()>&& callback); 250 SetIsWindowModeFollowHost(bool isWindowModeFollowHost)251 void SetIsWindowModeFollowHost(bool isWindowModeFollowHost) 252 { 253 isWindowModeFollowHost_ = isWindowModeFollowHost; 254 } GetIsWindowModeFollowHost()255 bool GetIsWindowModeFollowHost() const 256 { 257 return isWindowModeFollowHost_; 258 } 259 void NotifyHostWindowMode(Rosen::WindowMode mode); 260 void NotifyHostWindowMode(); 261 262 void TransferAccessibilityRectInfo(bool isForce = false); 263 void OnFrameNodeChanged(FrameNodeChangeInfoFlag flag) override; 264 void UpdateWMSUIExtProperty(UIContentBusinessCode code, const AAFwk::Want& data, RSSubsystemId subSystemId); 265 GetAvoidInfo()266 const ContainerModalAvoidInfo& GetAvoidInfo() const 267 { 268 return avoidInfo_; 269 } SetAvoidInfo(const ContainerModalAvoidInfo & info)270 void SetAvoidInfo(const ContainerModalAvoidInfo& info) 271 { 272 avoidInfo_ = info; 273 } 274 bool HandleTouchEvent(const std::shared_ptr<MMI::PointerEvent>& pointerEvent); SetModalRequestFocus(bool requestFocus)275 void SetModalRequestFocus(bool requestFocus) 276 { 277 isModalRequestFocus_ = requestFocus; 278 } IsWindowSceneVisible()279 bool IsWindowSceneVisible() const 280 { 281 return windowSceneVisible_; 282 } 283 GetVisiblityProperty()284 bool GetVisiblityProperty() const 285 { 286 return visiblityProperty_; 287 } 288 SetRealVisible(bool isVisible)289 void SetRealVisible(bool isVisible) 290 { 291 isVisible_ = isVisible; 292 } 293 SetCurVisible(bool curVisible)294 void SetCurVisible(bool curVisible) 295 { 296 curVisible_ = curVisible; 297 } 298 299 protected: 300 virtual void DispatchPointerEvent(const std::shared_ptr<MMI::PointerEvent>& pointerEvent); 301 virtual void DispatchKeyEvent(const KeyEvent& event); 302 303 int32_t uiExtensionId_ = 0; 304 int32_t instanceId_ = Container::CurrentId(); 305 void FireOnDrawReadyCallback(); 306 private: 307 enum class AbilityState { 308 NONE = 0, 309 FOREGROUND, 310 BACKGROUND, 311 DESTRUCTION, 312 }; 313 314 struct ErrorMsg { 315 int32_t code = 0; 316 std::string name; 317 std::string message; 318 }; 319 320 const char* ToString(AbilityState state); 321 void OnAttachToFrameNode() override; 322 void OnDetachFromFrameNode(FrameNode* frameNode) override; 323 void OnLanguageConfigurationUpdate() override; 324 void OnColorConfigurationUpdate() override; 325 void OnModifyDone() override; 326 bool CheckConstraint(); 327 bool CheckHostUiContentConstraint(); 328 329 void InitKeyEventOnFocus(const RefPtr<FocusHub>& focusHub); 330 void InitKeyEventOnBlur(const RefPtr<FocusHub>& focusHub); 331 void InitKeyEventOnClearFocusState(const RefPtr<FocusHub>& focusHub); 332 void InitKeyEventOnPaintFocusState(const RefPtr<FocusHub>& focusHub); 333 void InitKeyEventOnKeyEvent(const RefPtr<FocusHub>& focusHub); 334 #ifdef SUPPORT_DIGITAL_CROWN 335 void InitCrownEvent(const RefPtr<FocusHub>& focusHub); 336 void HandleCrownEvent(const CrownEvent& event); 337 #endif 338 void InitKeyEvent(const RefPtr<FocusHub>& focusHub); 339 void InitTouchEvent(const RefPtr<GestureEventHub>& gestureHub); 340 void InitMouseEvent(const RefPtr<InputEventHub>& inputHub); 341 void InitHoverEvent(const RefPtr<InputEventHub>& inputHub); 342 void InitializeAccessibility(); 343 bool HandleKeyEvent(const KeyEvent& event); 344 void HandleFocusEvent(); 345 void HandleBlurEvent(); 346 void HandleTouchEvent(const TouchEventInfo& info); 347 void HandleMouseEvent(const MouseInfo& info); 348 void HandleHoverEvent(bool isHover); 349 bool DispatchKeyEventSync(const KeyEvent& event); 350 void DispatchFocusActiveEvent(bool isFocusActive); 351 void DispatchFocusState(bool focusState); 352 void DispatchDisplayArea(bool isForce = false); 353 void LogoutModalUIExtension(); 354 bool IsMoving(); 355 void UnRegisterEvent(int32_t instanceId); 356 void UnRegisterPipelineEvent(int32_t instanceId); 357 void UnRegisterPipelineEvent( 358 const RefPtr<PipelineContext>& pipeline, FrameNode* frameNode); 359 void UnRegisterUIExtensionManagerEvent(int32_t instanceId); 360 void RegisterEvent(int32_t instanceId); 361 void RegisterPipelineEvent(int32_t instanceId); 362 void RegisterPipelineEvent(const RefPtr<PipelineContext>& pipeline); 363 void RegisterUIExtensionManagerEvent(int32_t instanceId); 364 void UpdateSessionInstanceId(int32_t instanceId); 365 366 void RegisterVisibleAreaChange(); 367 void MountPlaceholderNode(PlaceholderType type); 368 void RemovePlaceholderNode(); SetFoldStatusChanged(bool isChanged)369 void SetFoldStatusChanged(bool isChanged) 370 { 371 isFoldStatusChanged_ = isChanged; 372 } IsFoldStatusChanged()373 bool IsFoldStatusChanged() 374 { 375 return isFoldStatusChanged_; 376 } SetRotateStatusChanged(bool isChanged)377 void SetRotateStatusChanged(bool isChanged) 378 { 379 isRotateStatusChanged_ = isChanged; 380 } IsRotateStatusChanged()381 bool IsRotateStatusChanged() 382 { 383 return isRotateStatusChanged_; 384 } 385 PlaceholderType GetSizeChangeReason(); 386 UIExtensionUsage GetUIExtensionUsage(const AAFwk::Want& want); 387 void ReDispatchDisplayArea(); 388 void ResetAccessibilityChildTreeCallback(); GetForceProcessOnKeyEventInternal()389 bool GetForceProcessOnKeyEventInternal() const 390 { 391 return forceProcessOnKeyEventInternal_; 392 } SetForceProcessOnKeyEventInternal(bool forceProcessOnKeyEventInternal)393 void SetForceProcessOnKeyEventInternal(bool forceProcessOnKeyEventInternal) 394 { 395 forceProcessOnKeyEventInternal_ = forceProcessOnKeyEventInternal; 396 } 397 void InitBusinessDataHandleCallback(); 398 void RegisterEventProxyFlagCallback(); 399 400 void RegisterGetAvoidInfoCallback(); 401 402 void SendPageModeToProvider(); 403 void RegisterReceivePageModeRequestCallback(); 404 405 void UpdateFrameNodeState(); 406 bool IsAncestorNodeGeometryChange(FrameNodeChangeInfoFlag flag); 407 bool IsAncestorNodeTransformChange(FrameNodeChangeInfoFlag flag); 408 AccessibilityParentRectInfo GetAccessibilityRectInfo() const; 409 void ReDispatchWantParams(); 410 void HandleOcclusionScene(const RefPtr<FrameNode>& node, bool flag); 411 412 RefPtr<TouchEventImpl> touchEvent_; 413 RefPtr<InputEvent> mouseEvent_; 414 RefPtr<InputEvent> hoverEvent_; 415 std::shared_ptr<MMI::PointerEvent> lastPointerEvent_ = nullptr; 416 std::shared_ptr<AccessibilityChildTreeCallback> accessibilityChildTreeCallback_; 417 418 std::function<void()> onModalDestroy_; 419 std::function<void(const std::shared_ptr<ModalUIExtensionProxy>&)> onModalRemoteReadyCallback_; 420 std::function<void(const RefPtr<UIExtensionProxy>&)> onRemoteReadyCallback_; 421 std::function<void(int32_t)> onReleaseCallback_; 422 std::function<void(int32_t, const AAFwk::Want&)> onResultCallback_; 423 std::function<void(int32_t, const RefPtr<WantWrap>&)> onTerminatedCallback_; 424 std::function<void(const AAFwk::WantParams&)> onReceiveCallback_; 425 std::function<void(int32_t code, const std::string& name, const std::string& message)> onErrorCallback_; 426 std::list<std::function<void(const RefPtr<UIExtensionProxy>&)>> onSyncOnCallbackList_; 427 std::list<std::function<void(const RefPtr<UIExtensionProxy>&)>> onAsyncOnCallbackList_; 428 std::function<void()> bindModalCallback_; 429 std::map<PlaceholderType, RefPtr<NG::FrameNode>> placeholderMap_; 430 std::function<void()> onDrawReadyCallback_; 431 432 RefPtr<OHOS::Ace::WantWrap> curWant_; 433 RefPtr<FrameNode> contentNode_; 434 RefPtr<SessionWrapper> sessionWrapper_; 435 RefPtr<AccessibilitySessionAdapterUIExtension> accessibilitySessionAdapter_; 436 RefPtr<PlatformEventProxy> platformEventProxy_; 437 ErrorMsg lastError_; 438 AbilityState state_ = AbilityState::NONE; 439 bool isTransferringCaller_ = false; 440 bool isVisible_ = true; // actual visibility 441 bool isModal_ = false; 442 bool hasInitialize_ = false; 443 bool isAsyncModalBinding_ = false; 444 PlaceholderType curPlaceholderType_ = PlaceholderType::NONE; 445 bool isFoldStatusChanged_ = false; 446 bool isRotateStatusChanged_ = false; 447 bool densityDpi_ = false; 448 WeakPtr<Pattern> weakSystemWindowScene_; 449 SessionViewportConfig sessionViewportConfig_; 450 bool viewportConfigChanged_ = false; 451 bool displayAreaChanged_ = false; 452 bool isKeyAsync_ = false; 453 bool hasDetachContext_ = false; 454 // Whether to send the focus to the UIExtension 455 // No multi-threading problem due to run js thread 456 bool canFocusSendToUIExtension_ = true; 457 bool needReSendFocusToUIExtension_ = false; 458 int32_t surfacePositionCallBackId_ = -1; 459 int32_t foldDisplayCallBackId_ = -1; 460 RectF displayArea_; 461 // StartUIExtension should after mountToParent 462 bool hasMountToParent_ = false; 463 bool needReNotifyForeground_ = false; 464 bool needReDispatchDisplayArea_ = false; 465 bool curVisible_ = false; // HandleVisibleArea visible 466 bool windowSceneVisible_ = false; 467 bool visiblityProperty_ = true; // visibility property 468 SessionType sessionType_ = SessionType::UI_EXTENSION_ABILITY; 469 UIExtensionUsage usage_ = UIExtensionUsage::EMBEDDED; 470 471 // UEC dump info 472 bool focusState_ = false; 473 uint32_t focusWindowId_ = 0; 474 uint32_t realHostWindowId_ = 0; 475 std::string want_; 476 bool forceProcessOnKeyEventInternal_ = false; 477 std::map<UIContentBusinessCode, BusinessDataUECConsumeCallback> businessDataUECConsumeCallbacks_; 478 std::map<UIContentBusinessCode, BusinessDataUECConsumeReplyCallback> businessDataUECConsumeReplyCallbacks_; 479 480 bool isWindowModeFollowHost_ = false; 481 bool isModalRequestFocus_ = true; 482 /* only for 1.2 begin */ 483 bool hasAttachContext_ = false; 484 /* only for 1.2 end */ 485 std::shared_ptr<AccessibilitySAObserverCallback> accessibilitySAObserverCallback_; 486 487 ContainerModalAvoidInfo avoidInfo_; 488 489 ACE_DISALLOW_COPY_AND_MOVE(UIExtensionPattern); 490 }; 491 } // namespace OHOS::Ace::NG 492 #endif // FOUNDATION_ACE_FRAMEWORKS_CORE_COMPONENTS_NG_PATTERN_UI_EXTENSION_UEC_UI_EXTENSION_PATTERN_H 493