From 39e92ce9125526ae5d32882de44f01b03d27dc5a Mon Sep 17 00:00:00 2001 From: "huayong.xu" Date: Tue, 4 Apr 2023 15:22:15 +0800 Subject: [PATCH] Use c-style string when webview loads contents. Change-Id: Ibb1c327339287a97dcb436c26d5ccf4b2e2a299c --- dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h | 4 ++-- dali/devel-api/adaptor-framework/web-engine/web-engine.cpp | 4 ++-- dali/devel-api/adaptor-framework/web-engine/web-engine.h | 4 ++-- dali/internal/web-engine/common/web-engine-impl.cpp | 4 ++-- dali/internal/web-engine/common/web-engine-impl.h | 4 ++-- 5 files changed, 10 insertions(+), 10 deletions(-) diff --git a/dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h b/dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h index 39c6371..4c631bf 100755 --- a/dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h +++ b/dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h @@ -2,7 +2,7 @@ #define DALI_WEB_ENGINE_PLUGIN_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -314,7 +314,7 @@ public: * * @return true if successfully request, false otherwise */ - virtual bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) = 0; + virtual bool LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) = 0; /** * @brief Reload the Web. diff --git a/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp b/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp index 6367f71..97b70c1 100755 --- a/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp +++ b/dali/devel-api/adaptor-framework/web-engine/web-engine.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -145,7 +145,7 @@ bool WebEngine::LoadHtmlStringOverrideCurrentEntry(const std::string& html, cons return GetImplementation(*this).LoadHtmlStringOverrideCurrentEntry(html, basicUri, unreachableUrl); } -bool WebEngine::LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) +bool WebEngine::LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) { return GetImplementation(*this).LoadContents(contents, contentSize, mimeType, encoding, baseUri); } diff --git a/dali/devel-api/adaptor-framework/web-engine/web-engine.h b/dali/devel-api/adaptor-framework/web-engine/web-engine.h index 2d33aba..1515c76 100755 --- a/dali/devel-api/adaptor-framework/web-engine/web-engine.h +++ b/dali/devel-api/adaptor-framework/web-engine/web-engine.h @@ -2,7 +2,7 @@ #define DALI_WEB_ENGINE_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -215,7 +215,7 @@ public: * * @return true if successfully request, false otherwise */ - bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri); + bool LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri); /** * @brief Reload the Web. diff --git a/dali/internal/web-engine/common/web-engine-impl.cpp b/dali/internal/web-engine/common/web-engine-impl.cpp index a54cb82..87e1f6e 100644 --- a/dali/internal/web-engine/common/web-engine-impl.cpp +++ b/dali/internal/web-engine/common/web-engine-impl.cpp @@ -1,5 +1,5 @@ /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -365,7 +365,7 @@ bool WebEngine::LoadHtmlStringOverrideCurrentEntry(const std::string& html, cons return mPlugin->LoadHtmlStringOverrideCurrentEntry(html, basicUri, unreachableUrl); } -bool WebEngine::LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) +bool WebEngine::LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri) { return mPlugin->LoadContents(contents, contentSize, mimeType, encoding, baseUri); } diff --git a/dali/internal/web-engine/common/web-engine-impl.h b/dali/internal/web-engine/common/web-engine-impl.h index 7cc0ac0..1a35dc9 100755 --- a/dali/internal/web-engine/common/web-engine-impl.h +++ b/dali/internal/web-engine/common/web-engine-impl.h @@ -2,7 +2,7 @@ #define DALI_WEB_ENGINE_IMPL_H /* - * Copyright (c) 2022 Samsung Electronics Co., Ltd. + * Copyright (c) 2023 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -145,7 +145,7 @@ public: /** * @copydoc Dali::WebEngine::LoadContents() */ - bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri); + bool LoadContents(const int8_t* contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri); /** * @copydoc Dali::WebEngine::Reload() -- 2.7.4