Merge "atspi: disable atspi using environment variable" into devel/master
authorShinwoo Kim <cinoo.kim@samsung.com>
Thu, 8 Apr 2021 10:48:46 +0000 (10:48 +0000)
committerGerrit Code Review <gerrit@review>
Thu, 8 Apr 2021 10:48:46 +0000 (10:48 +0000)
24 files changed:
dali/devel-api/adaptor-framework/accessibility-impl.cpp
dali/devel-api/adaptor-framework/web-engine-certificate.h [new file with mode: 0755]
dali/devel-api/adaptor-framework/web-engine-context-menu-item.h [new file with mode: 0755]
dali/devel-api/adaptor-framework/web-engine-context-menu.h [new file with mode: 0755]
dali/devel-api/adaptor-framework/web-engine-context.h [changed mode: 0644->0755]
dali/devel-api/adaptor-framework/web-engine-frame.h [new file with mode: 0755]
dali/devel-api/adaptor-framework/web-engine-http-auth-handler.h [new file with mode: 0755]
dali/devel-api/adaptor-framework/web-engine-plugin.h [changed mode: 0644->0755]
dali/devel-api/adaptor-framework/web-engine-policy-decision.h [new file with mode: 0755]
dali/devel-api/adaptor-framework/web-engine-security-origin.h [new file with mode: 0755]
dali/devel-api/adaptor-framework/web-engine.cpp [changed mode: 0755->0644]
dali/devel-api/adaptor-framework/web-engine.h [changed mode: 0755->0644]
dali/devel-api/file.list
dali/internal/canvas-renderer/tizen/canvas-renderer-impl-tizen.cpp
dali/internal/canvas-renderer/tizen/canvas-renderer-impl-tizen.h
dali/internal/canvas-renderer/tizen/drawable-impl-tizen.cpp
dali/internal/canvas-renderer/tizen/drawable-impl-tizen.h
dali/internal/canvas-renderer/tizen/shape-impl-tizen.cpp
dali/internal/canvas-renderer/tizen/shape-impl-tizen.h
dali/internal/canvas-renderer/ubuntu/canvas-renderer-impl-ubuntu.cpp
dali/internal/canvas-renderer/ubuntu/shape-impl-ubuntu.cpp
dali/internal/system/common/capture-impl.cpp
dali/internal/web-engine/common/web-engine-impl.cpp [changed mode: 0755->0644]
dali/internal/web-engine/common/web-engine-impl.h

index 00f0615..3db97a8 100644 (file)
@@ -24,6 +24,7 @@
 #include <dali/public-api/object/object-registry.h>
 #include <dali/public-api/object/type-info.h>
 #include <dali/public-api/object/type-registry-helper.h>
+#include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/accessibility-impl.h>
@@ -593,18 +594,31 @@ namespace
 {
 class NonControlAccessible : public virtual Accessible, public virtual Collection, public virtual Component
 {
-public:
-  Dali::Actor actor;
+protected:
+  Dali::WeakHandle<Dali::Actor> self;
   bool        root = false;
 
+  Dali::Actor Self()
+  {
+    auto handle = self.GetHandle();
+
+    // NonControlAccessible is deleted on ObjectDestroyedSignal
+    // for the respective actor (see `nonControlAccessibles`).
+    DALI_ASSERT_ALWAYS(handle);
+
+    return handle;
+  }
+
+public:
   NonControlAccessible(Dali::Actor actor, bool root)
-  : actor(actor),
+  : self(actor),
     root(root)
   {
   }
 
   Dali::Rect<> GetExtents(Dali::Accessibility::CoordType ctype) override
   {
+    Dali::Actor actor = Self();
     Vector2 screenPosition          = actor.GetProperty(Actor::Property::SCREEN_POSITION).Get<Vector2>();
     Vector3 size                    = actor.GetCurrentProperty<Vector3>(Actor::Property::SIZE) * actor.GetCurrentProperty<Vector3>(Actor::Property::WORLD_SCALE);
     bool    positionUsesAnchorPoint = actor.GetProperty(Actor::Property::POSITION_USES_ANCHOR_POINT).Get<bool>();
@@ -643,7 +657,7 @@ public:
   }
   std::string GetName() override
   {
-    return actor.GetProperty<std::string>(Dali::Actor::Property::NAME);
+    return Self().GetProperty<std::string>(Dali::Actor::Property::NAME);
   }
   std::string GetDescription() override
   {
@@ -656,24 +670,24 @@ public:
       auto b = GetBridgeData();
       return b->bridge->GetApplication();
     }
-    return Get(actor.GetParent());
+    return Get(Self().GetParent());
   }
   size_t GetChildCount() override
   {
-    return static_cast<size_t>(actor.GetChildCount());
+    return static_cast<size_t>(Self().GetChildCount());
   }
   Accessible* GetChildAtIndex(size_t index) override
   {
-    auto s = static_cast<size_t>(actor.GetChildCount());
+    auto s = static_cast<size_t>(Self().GetChildCount());
     if(index >= s)
     {
       throw std::domain_error{"invalid index " + std::to_string(index) + " for object with " + std::to_string(s) + " children"};
     }
-    return Get(actor.GetChildAt(static_cast<unsigned int>(index)));
+    return Get(Self().GetChildAt(static_cast<unsigned int>(index)));
   }
   size_t GetIndexInParent() override
   {
-    auto parent = actor.GetParent();
+    auto parent = Self().GetParent();
     if(!parent)
     {
       return 0;
@@ -681,7 +695,7 @@ public:
     auto size = static_cast<size_t>(parent.GetChildCount());
     for(auto i = 0u; i < size; ++i)
     {
-      if(parent.GetChildAt(i) == actor)
+      if(parent.GetChildAt(i) == Self())
       {
         return i;
       }
@@ -714,7 +728,7 @@ public:
   Attributes GetAttributes() override
   {
     Dali::TypeInfo type;
-    actor.GetTypeInfo(type);
+    Self().GetTypeInfo(type);
     return {
       {"t", type.GetName()},
     };
diff --git a/dali/devel-api/adaptor-framework/web-engine-certificate.h b/dali/devel-api/adaptor-framework/web-engine-certificate.h
new file mode 100755 (executable)
index 0000000..cd0b055
--- /dev/null
@@ -0,0 +1,73 @@
+#ifndef DALI_WEB_ENGINE_CERTIFICATE_H
+#define DALI_WEB_ENGINE_CERTIFICATE_H
+
+/*
+ * Copyright (c) 2021 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.
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+
+namespace Dali
+{
+/**
+ * @brief A class WebEngineCertificate for certificate of web engine.
+ */
+class WebEngineCertificate
+{
+public:
+  /**
+   * @brief Constructor.
+   */
+  WebEngineCertificate() = default;
+
+  /**
+   * @brief Destructor.
+   */
+  virtual ~WebEngineCertificate() = default;
+
+  /**
+   * @brief Allow the site access about certificate error.
+   *
+   * @param[in] allowed A value to decide policy
+   */
+  virtual void Allow(bool allowed) = 0;
+
+  /**
+   * @brief Returns information whether the certificate comes from main frame.
+   *
+   * @return true if the certificate comes from main frame, false otherwise
+   */
+  virtual bool IsFromMainFrame() const = 0;
+
+  /**
+   * @brief Query certificate's PEM data.
+   *
+   * @return A certificate itself in the PEM format.
+   */
+  virtual std::string GetPem() const = 0;
+
+  /**
+   * @brief Query if the context loaded with a given certificate is secure.
+   *
+   * @return true if the context is secure, false otherwise
+   */
+  virtual bool IsContextSecure() const = 0;
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_CERTIFICATE_H
diff --git a/dali/devel-api/adaptor-framework/web-engine-context-menu-item.h b/dali/devel-api/adaptor-framework/web-engine-context-menu-item.h
new file mode 100755 (executable)
index 0000000..bb801ba
--- /dev/null
@@ -0,0 +1,207 @@
+#ifndef DALI_WEB_ENGINE_CONTEXT_MENU_ITEM_H
+#define DALI_WEB_ENGINE_CONTEXT_MENU_ITEM_H
+
+/*
+ * Copyright (c) 2021 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.
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <memory>
+#include <string>
+
+namespace Dali
+{
+class WebEngineContextMenu;
+
+/**
+ * @brief A class WebEngineContextMenuItem for context menu item of web engine.
+ */
+class WebEngineContextMenuItem
+{
+public:
+  /**
+   * @brief Enumeration that provides the tags of items for the context menu.
+   */
+  enum class ItemTag
+  {
+    NO_ACTION = 0,                  ///< No action
+    OPEN_LINK_IN_NEW_WINDOW,        ///< Open link in new window
+    DOWNLOAD_LINK_TO_DISK,          ///< Download link to disk
+    COPY_LINK_TO_CLIPBOARD,         ///< Copy link to clipboard
+    OPEN_IMAGE_IN_NEW_WINDOW,       ///< Open image in new window
+    OPEN_IMAGE_IN_CURRENT_WINDOW,   ///< Open image in current window
+    DOWNLOAD_IMAGE_TO_DISK,         ///< Download image to disk
+    COPY_IMAGE_TO_CLIPBOARD,        ///< Copy image to clipboard
+    OPEN_FRAME_IN_NEW_WINDOW,       ///< Open frame in new window
+    COPY,                           ///< Copy
+    GO_BACK,                        ///< Go back
+    GO_FORWARD,                     ///< Go forward
+    STOP,                           ///< Stop
+    SHARE,                          ///< Share
+    RELOAD,                         ///< Reload
+    CUT,                            ///< Cut
+    PASTE,                          ///< Paste
+    SPELLING_GUESS,                 ///< Spelling guess
+    NO_GUESSES_FOUND,               ///< Guess found
+    IGNORE_SPELLING,                ///< Ignore spelling
+    LEARN_SPELLING,                 ///< Learn spelling
+    OTHER,                          ///< Other
+    SEARCH_IN_SPOTLIGHT,            ///< Search in spotlight
+    SEARCH_WEB,                     ///< Search web
+    LOOK_UP_IN_DICTIONARY,          ///< Look up in dictionary
+    OPEN_WITH_DEFAULT_APPLICATION,  ///< Open with default application
+    PDF_ACTUAL_SIZE,                ///< PDF actual size
+    PDF_ZOOM_IN,                    ///< PDF zoom in
+    PDF_ZOOM_OUT,                   ///< PDF zoom out
+    PDF_AUTO_SIZE,                  ///< PDF auto size
+    PDF_SINGLE_PAGE,                ///< PDF single page
+    PDF_FACTING_PAGES,              ///< PDF facting page
+    PDF_CONTINUOUS,                 ///< PDF continuous
+    PDF_NEXT_PAGE,                  ///< PDF next page
+    PDF_PREVIOUS_PAGE,              ///< PDF previous page
+    OPEN_LINK,                      ///< Open link
+    IGNORE_GRAMMAR,                 ///< Ignore grammar
+    SPELLING_MENU,                  ///< Spelling menu
+    SHOW_SPELLING_PANEL,            ///< Show spelling panel
+    CHECK_SPELLING,                 ///< Check spelling
+    CHECK_SPELLING_WHILE_TYPING,    ///< Check spelling white typing
+    CHECK_GRAMMAR_WITH_SPELLING,    ///< Check grammar with spelling
+    FONT_MENU,                      ///< Font menu
+    SHOW_FONTS,                     ///< Show fonts
+    BOLD,                           ///< Bold
+    ITALIC,                         ///< Italic
+    UNDERLINE,                      ///< Underline
+    OUTLINE,                        ///< Outline
+    STYLES,                         ///< Style
+    SHOW_COLORS,                    ///< Show colors
+    SPEECH_MENU,                    ///< Speech menu
+    START_SPEAKING,                 ///< Start speaking
+    STOP_SPEAKING,                  ///< Stop speaking
+    WRITING_DIRECTION_MENU,         ///< Writing direction menu
+    DEFAULT_DIRECTION,              ///< Default direction
+    LEFT_TO_RIGHT,                  ///< Left to right
+    RIGHT_TO_LEFT,                  ///< Right to left
+    PDF_SINGLE_PAGE_SCROLLING,      ///< PDF single page scrolling
+    PDF_FACING_PAGES_SCROLLING,     ///< PDF facing page scrolling
+    INSPECT_ELEMENT,                ///< Inspect element
+    TEXT_DIRECTION_MENU,            ///< Text direction menu
+    TEXT_DIRECTION_DEFAULT,         ///< Text direction default
+    TEXT_DIRECTION_LEFT_TO_RIGHT,   ///< Text direction left to right
+    TEXT_DIRECTION_RIGHT_TO_LEFT,   ///< Text direction right to left
+    CORRECT_SPELLING_AUTOMATICALLY, ///< Correct spelling automatically
+    SUBSTITUTIONS_MENU,             ///< Substitutions menu
+    SHOW_SUBSTITUTIONS,             ///< Show substitutions
+    SMART_COPY_PASTE,               ///< Smart copy paste
+    SMART_QUOTES,                   ///< Smart quotes
+    SMART_DASHES,                   ///< Smart dashes
+    SMART_LINKS,                    ///< Smart links
+    TEXT_REPLACEMENT,               ///< Text replacement
+    TRANSFORMATIONS_MENU,           ///< Transformation menu
+    MAKE_UPPER_CASE,                ///< Make upper case
+    MAKE_LOWER_CASE,                ///< Make lower case
+    CAPITALIZE,                     ///< Capitalize
+    CHANGE_BACK,                    ///< Change back
+    OPEN_MEDIA_IN_NEW_WINDOW,       ///< Open media in new window
+    COPY_MEDIA_LINK_TO_CLIPBOARD,   ///< Copy media link to clipboard
+    TOGGLE_MEDIA_CONTROLS,          ///< Toggle media controls
+    TOGGLE_MEDIA_LOOP,              ///< Toggle media loop
+    ENTER_VIDEO_FULLSCREEN,         ///< Enter video fullscreen
+    MEDIA_PLAY_PAUSE,               ///< Media play pause
+    MEDIA_MUTE,                     ///< Media mute
+    DICTATION_ALTERNATIVE,          ///< Dictation alternative
+    SELECT_ALL,                     ///< Select all
+    SELECT_WORD,                    ///< Select word
+    TEXT_SELECTION_MODE,            ///< Text selection mode
+    CLIPBOARD,                      ///< Clipboard
+    DRAG,                           ///< Drag
+    TRANSLATE,                      ///< Translate
+    COPY_LINK_DATA,                 ///< Copy link data
+  };
+
+  /**
+   * @brief Enumeration that defines the types of the items for the context menu.
+   */
+  enum class ItemType
+  {
+    ACTION,           ///< Action
+    CHECKABLE_ACTION, ///< Checkable action
+    SEPARATOR,        ///< Separator
+    SUBMENU,          ///< Sub-menu
+  };
+
+  /**
+   * @brief Constructor.
+   */
+  WebEngineContextMenuItem() = default;
+
+  /**
+   * @brief Destructor.
+   */
+  virtual ~WebEngineContextMenuItem() = default;
+
+  /**
+   * @brief Return the tag of context menu item.
+   *
+   * @return The tag of context menu item
+   */
+  virtual ItemTag GetTag() const = 0;
+
+  /**
+   * @brief Return the type of context menu item.
+   *
+   * @return The type of context menu item
+   */
+  virtual ItemType GetType() const = 0;
+
+  /**
+   * @brief Check if the item is enabled or not.
+   *
+   * @return true if it is enabled, false otherwise
+   */
+  virtual bool IsEnabled() const = 0;
+
+  /**
+   * @brief Return the link url of context menu item.
+   *
+   * @return The current link url if succeeded, empty string otherwise
+   */
+  virtual std::string GetLinkUrl() const = 0;
+
+  /**
+   * @brief Return the image url of context menu item.
+   *
+   * @return The current image url if succeeded, empty string otherwise
+   */
+  virtual std::string GetImageUrl() const = 0;
+
+  /**
+   * @brief Get a title of the item.
+   *
+   * @return a title of the item if succeeded, empty string otherwise
+   */
+  virtual std::string GetTitle() const = 0;
+
+  /**
+   * @brief Get the parent menu for the item.
+   *
+   * @return parent menu if succeeded, 0 otherwise
+   */
+  virtual std::unique_ptr<Dali::WebEngineContextMenu> GetParentMenu() const = 0;
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_CONTEXT_MENU_ITEM_H
diff --git a/dali/devel-api/adaptor-framework/web-engine-context-menu.h b/dali/devel-api/adaptor-framework/web-engine-context-menu.h
new file mode 100755 (executable)
index 0000000..7ccdabb
--- /dev/null
@@ -0,0 +1,125 @@
+#ifndef DALI_WEB_ENGINE_CONTEXT_MENU_H
+#define DALI_WEB_ENGINE_CONTEXT_MENU_H
+
+/*
+ * Copyright (c) 2021 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.
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/web-engine-context-menu-item.h>
+#include <dali/public-api/math/vector2.h>
+#include <memory>
+#include <string>
+#include <vector>
+
+namespace Dali
+{
+/**
+ * @brief A class WebEngineContextMenu for context menu of web engine.
+ */
+class WebEngineContextMenu
+{
+public:
+  /**
+   * @brief Constructor.
+   */
+  WebEngineContextMenu() = default;
+
+  /**
+   * @brief Destructor.
+   */
+  virtual ~WebEngineContextMenu() = default;
+
+  /**
+   * @brief Count the number of the context menu item.
+   *
+   * @return The number of current context menu item
+   */
+  virtual uint32_t GetItemCount() const = 0;
+
+  /**
+   * @brief Return the nth item in a context menu.
+   *
+   * @param[in] index The number of the item
+   *
+   * @return The nth item of context menu
+   */
+  virtual std::unique_ptr<WebEngineContextMenuItem> GetItemAt(uint32_t index) const = 0;
+
+  /**
+   * @brief Get the list of items.
+   *
+   * @return item list of context menu
+   */
+  virtual std::vector<std::unique_ptr<WebEngineContextMenuItem>> GetItemList() const = 0;
+
+  /**
+   * @brief Get position of the context menu.
+   *
+   * @return position of context menu.
+   */
+  virtual Dali::Vector2 GetPosition() const = 0;
+
+  /**
+   * @brief Remove the item from the context menu.
+   *
+   * @param[in] item The context menu item to be removed
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool RemoveItem(WebEngineContextMenuItem& item) = 0;
+
+  /**
+   * @brief Add the item to the context menu.
+   *
+   * @param[in] tag The tag of context menu item
+   * @param[in] title The title of context menu item
+   * @param[in] enabled If true the context menu item is enabled, false otherwise
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool AppendItemAsAction(WebEngineContextMenuItem::ItemTag tag, const std::string& title, bool enabled) = 0;
+
+  /**
+   * @brief Add the item to the context menu.
+   *
+   * @param[in] tag The tag of context menu item
+   * @param[in] title The title of context menu item
+   * @param[in] iconFile The path of icon to be set on context menu item
+   * @param[in] enabled If true the context menu item is enabled, false otherwise
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool AppendItem(WebEngineContextMenuItem::ItemTag tag, const std::string& title, const std::string& iconFile, bool enabled) = 0;
+
+  /**
+   * @brief Select the item from the context menu.
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool SelectItem(WebEngineContextMenuItem& item) = 0;
+
+  /**
+   * @brief Hide the context menu.
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool Hide() = 0;
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_CONTEXT_MENU_H
old mode 100644 (file)
new mode 100755 (executable)
index 22a5b67..b4daccd
  */
 
 // EXTERNAL INCLUDES
+#include <functional>
+#include <memory>
 #include <string>
+#include <vector>
+
+// INTERNAL INCLUDES
+#include <dali/devel-api/adaptor-framework/web-engine-security-origin.h>
 
 namespace Dali
 {
@@ -30,6 +36,38 @@ class WebEngineContext
 {
 public:
   /**
+   * @brief Callback for getting web database origins.
+   */
+  using WebEngineSecurityOriginAcquiredCallback = std::function<void(std::vector<std::unique_ptr<Dali::WebEngineSecurityOrigin>>&)>;
+
+  /**
+   * @brief Callback for getting web storage usage.
+   */
+  using WebEngineStorageUsageAcquiredCallback = std::function<void(uint64_t)>;
+
+  // forward declaration.
+  struct PasswordData;
+
+  /**
+   * @brief Callback for getting form password.
+   */
+  using WebEngineFormPasswordAcquiredCallback = std::function<void(std::vector<std::unique_ptr<PasswordData>>&)>;
+
+  /**
+   * @brief Callback for download started with url.
+   */
+  using WebEngineDownloadStartedCallback = std::function<void(const std::string&)>;
+
+  /**
+   * @brief Callback for overriding default mime type.
+   * @param[in] url for which the mime type can be overridden
+   * @param[in] current mime type that will be overridden
+   * @param[out] a new mime type for web engine.
+   * @return true if mime should be overridden by new mime, false otherwise.
+   */
+  using WebEngineMimeOverriddenCallback = std::function<bool(const std::string&, const std::string&, std::string&)>;
+
+  /**
    * @brief Enumeration for cache model options.
    */
   enum class CacheModel
@@ -40,6 +78,15 @@ public:
   };
 
   /**
+   * @brief Struct for password data
+   */
+  struct PasswordData
+  {
+    std::string url;
+    bool        useFingerprint;
+  };
+
+  /**
    * @brief Constructor.
    */
   WebEngineContext() = default;
@@ -50,25 +97,25 @@ public:
   virtual ~WebEngineContext() = default;
 
   /**
-   * @brief Returns the cache model type.
+   * @brief Return the cache model type.
    * @return #CacheModel
    */
   virtual CacheModel GetCacheModel() const = 0;
 
   /**
-   * @brief Requests to set the cache model.
+   * @brief Request to set the cache model.
    * @param[in] cacheModel The cache model
    */
   virtual void SetCacheModel(CacheModel cacheModel) = 0;
 
   /**
-   * @brief Sets the given proxy URI to network backend of specific context.
+   * @brief Set the given proxy URI to network backend of specific context.
    * @param[in] uri The proxy URI to set
    */
   virtual void SetProxyUri(const std::string& uri) = 0;
 
   /**
-   * @brief Sets a proxy auth credential to network backend of specific context.
+   * @brief Set a proxy auth credential to network backend of specific context.
    * @details Normally, proxy auth credential should be got from the callback
    *          set by ewk_view_authentication_callback_set, once the username in
    *          this API has been set with a non-null value, the authentication
@@ -79,7 +126,7 @@ public:
   virtual void SetDefaultProxyAuth(const std::string& username, const std::string& password) = 0;
 
   /**
-   * Adds CA certificates to persistent NSS certificate database
+   * @brief Add CA certificates to persistent NSS certificate database
    * Function accepts a path to a CA certificate file, a path to a directory
    * containing CA certificate files, or a colon-seprarated list of those.
    * Certificate files should have *.crt extension.
@@ -89,34 +136,110 @@ public:
   virtual void SetCertificateFilePath(const std::string& certificatePath) = 0;
 
   /**
-   * Requests for deleting all web databases.
+   * @brief Request for deleting all web databases.
+   */
+  virtual void DeleteAllWebDatabase() = 0;
+
+  /**
+   * @brief Request for getting web database origins.
+   *
+   * @param[in] callback callback called after getting web database origins
+   *
+   * @return true if succeeded, false otherwise
    */
-  virtual void DeleteWebDatabase() = 0;
+  virtual bool GetWebDatabaseOrigins(WebEngineSecurityOriginAcquiredCallback callback) = 0;
 
   /**
-   * @brief Deletes web storage.
+   * @brief Request for deleting web databases for origin.
+   *
+   * @param[in] origin application cache origin
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool DeleteWebDatabase(WebEngineSecurityOrigin& origin) = 0;
+
+  /**
+   * @brief Get list of origins that is stored in web storage db.
+   *
+   * @param[in] callback callback called after getting web storage origins
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool GetWebStorageOrigins(WebEngineSecurityOriginAcquiredCallback callback) = 0;
+
+  /**
+   * @brief Get list of origins that is stored in web storage db.
+   *
+   * @param[in] origin storage origin
+   * @param[in] callback callback called after getting web storage origins
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool GetWebStorageUsageForOrigin(WebEngineSecurityOrigin& origin, WebEngineStorageUsageAcquiredCallback callback) = 0;
+
+  /**
+   * @brief Delete all web storage.
    * @details This function does not ensure that all data will be removed.
    *          Should be used to extend free physical memory.
    */
-  virtual void DeleteWebStorage() = 0;
+  virtual void DeleteAllWebStorage() = 0;
+
+  /**
+   * @brief Delete origin that is stored in web storage database.
+   *
+   * @param[in] origin origin of database
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool DeleteWebStorageOrigin(WebEngineSecurityOrigin& origin) = 0;
 
   /**
-   * @brief Requests for deleting all local file systems.
+   * @brief Request for deleting all local file systems.
    */
   virtual void DeleteLocalFileSystem() = 0;
 
   /**
-   * Toggles the cache to be enabled or disabled
+   * @brief Toggle the cache to be enabled or disabled
    * Function works asynchronously.
-   * By default the cache is disabled resulting in not storing network data on disk.
+   *
    * @param[in] cacheDisabled enable or disable cache
    */
   virtual void DisableCache(bool cacheDisabled) = 0;
 
   /**
-   * @brief Requests to clear cache
+   * @brief Request to clear cache
    */
   virtual void ClearCache() = 0;
+
+  /**
+   * @brief Request for deleting web application cache for origin.
+   *
+   * @param[in] origin application cache origin
+   *
+   * @return true if succeeded, false otherwise
+   */
+  virtual bool DeleteApplicationCache(WebEngineSecurityOrigin& origin) = 0;
+
+  /**
+   * @brief Asynchronous request to get list of all password data.
+   *
+   * @param[in] callback callback called after getting form password
+   */
+  virtual void GetFormPasswordList(WebEngineFormPasswordAcquiredCallback callback) = 0;
+
+  /**
+   * @brief Register callback for download started.
+   *
+   * @param[in] callback callback for download started
+   */
+  virtual void RegisterDownloadStartedCallback(WebEngineDownloadStartedCallback callback) = 0;
+
+  /**
+   * @brief Register callback for mime overridden.
+   *
+   * @param[in] callback callback for mime overridden
+   */
+  virtual void RegisterMimeOverriddenCallback(WebEngineMimeOverriddenCallback callback) = 0;
 };
 
 } // namespace Dali
diff --git a/dali/devel-api/adaptor-framework/web-engine-frame.h b/dali/devel-api/adaptor-framework/web-engine-frame.h
new file mode 100755 (executable)
index 0000000..51beba9
--- /dev/null
@@ -0,0 +1,51 @@
+#ifndef DALI_WEB_ENGINE_FRAME_H
+#define DALI_WEB_ENGINE_FRAME_H
+
+/*
+ * Copyright (c) 2021 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.
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+
+namespace Dali
+{
+/**
+ * @brief A class WebEngineFrame for frame of web engine.
+ */
+class WebEngineFrame
+{
+public:
+  /**
+   * @brief Constructor.
+   */
+  WebEngineFrame() = default;
+
+  /**
+   * @brief Destructor.
+   */
+  virtual ~WebEngineFrame() = default;
+
+  /**
+   * @brief Check whether the frame is main frame.
+   * @return true if the frame is main frame, false otherwise
+   */
+  virtual bool IsMainFrame() const = 0;
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_FRAME_H
diff --git a/dali/devel-api/adaptor-framework/web-engine-http-auth-handler.h b/dali/devel-api/adaptor-framework/web-engine-http-auth-handler.h
new file mode 100755 (executable)
index 0000000..6fcc132
--- /dev/null
@@ -0,0 +1,70 @@
+#ifndef DALI_WEB_ENGINE_HTTP_AUTH_HANDLER_H
+#define DALI_WEB_ENGINE_HTTP_AUTH_HANDLER_H
+
+/*
+ * Copyright (c) 2021 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.
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+
+namespace Dali
+{
+/**
+ * @brief A class WebEngineHttpAuthHandler for HTTP authentication handler of web engine.
+ */
+class WebEngineHttpAuthHandler
+{
+public:
+  /**
+   * @brief Constructor.
+   */
+  WebEngineHttpAuthHandler() = default;
+
+  /**
+   * @brief Destructor.
+   */
+  virtual ~WebEngineHttpAuthHandler() = default;
+
+  /**
+   * @brief Gets the realm string of authentication challenge received.
+   *
+   * @return the realm of authentication challenge
+   */
+  virtual std::string GetRealm() const = 0;
+
+  /**
+   * @brief Suspend the operation for authentication challenge.
+   */
+  virtual void Suspend() = 0;
+
+  /**
+   * @brief Send credential for authentication challenge.
+   *
+   * @param[in] user user id from user input.
+   * @param[in] password user password from user input.
+   */
+  virtual void UseCredential(const std::string& user, const std::string& password) = 0;
+
+  /**
+   * @brief Send cancellation notification for authentication challenge.
+   */
+  virtual void CancelCredential() = 0;
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_HTTP_AUTH_HANDLER_H
old mode 100644 (file)
new mode 100755 (executable)
index 3530b1b..ad74323
@@ -32,12 +32,17 @@ class KeyEvent;
 class PixelData;
 class TouchEvent;
 class WebEngineBackForwardList;
+class WebEngineCertificate;
 class WebEngineConsoleMessage;
 class WebEngineContext;
+class WebEngineContextMenu;
+class WebEngineContextMenuItem;
 class WebEngineCookieManager;
 class WebEngineFormRepostDecision;
-class WebEngineRequestInterceptor;
+class WebEngineHttpAuthHandler;
 class WebEngineLoadError;
+class WebEnginePolicyDecision;
+class WebEngineRequestInterceptor;
 class WebEngineSettings;
 class HoverEvent;
 class WheelEvent;
@@ -101,6 +106,26 @@ public:
   using WebEngineConsoleMessageSignalType = Signal<void(std::shared_ptr<Dali::WebEngineConsoleMessage>)>;
 
   /**
+   * @brief WebView signal type related with certificate changed.
+   */
+  using WebEngineCertificateSignalType = Signal<void(std::shared_ptr<Dali::WebEngineCertificate>)>;
+
+  /**
+   * @brief WebView signal type related with http authentication.
+   */
+  using WebEngineHttpAuthHandlerSignalType = Signal<void(std::shared_ptr<Dali::WebEngineHttpAuthHandler>)>;
+
+  /**
+   * @brief WebView signal type related with context menu customized.
+   */
+  using WebEngineContextMenuCustomizedSignalType = Signal<void(std::shared_ptr<Dali::WebEngineContextMenu>)>;
+
+  /**
+   * @brief WebView signal type related with context menu item selected.
+   */
+  using WebEngineContextMenuItemSelectedSignalType = Signal<void(std::shared_ptr<Dali::WebEngineContextMenuItem>)>;
+
+  /**
    * @brief Alert callback when JavaScript alert is called with a message.
    *  It returns true if a pop-up is created successfully, false otherwise.
    */
@@ -130,6 +155,11 @@ public:
   using WebEngineFrameRenderedSignalType = Signal<void(void)>;
 
   /**
+   * @brief WebView signal type related with policy would be decided.
+   */
+  using WebEnginePolicyDecisionSignalType = Signal<void(std::shared_ptr<Dali::WebEnginePolicyDecision>)>;
+
+  /**
    * @brief Enumeration for the scroll edge.
    */
   enum class ScrollEdge
@@ -238,7 +268,7 @@ public:
   virtual NativeImageInterfacePtr GetNativeImageSource() = 0;
 
   /**
-   * @brief Returns the URL of the Web.
+   * @brief Return the URL of the Web.
    *
    * @return Url of string type
    */
@@ -408,7 +438,7 @@ public:
   virtual void GoBack() = 0;
 
   /**
-   * @brief Evaluates JavaScript code represented as a string.
+   * @brief Evaluate JavaScript code represented as a string.
    *
    * @param[in] script The JavaScript code
    * @param[in] resultHandler The callback function to be called by the JavaScript runtime. This carries evaluation result.
@@ -484,7 +514,7 @@ public:
   virtual void SetUserAgent(const std::string& userAgent) = 0;
 
   /**
-   * @brief Sets size of Web Page.
+   * @brief Set size of Web Page.
    */
   virtual void SetSize(int width, int height) = 0;
 
@@ -743,7 +773,7 @@ public:
   virtual WebEngineFrameRenderedSignalType& FrameRenderedSignal() = 0;
 
   /**
-   * @brief Connects to this signal to be notified when http request need be intercepted.
+   * @brief Connect to this signal to be notified when http request need be intercepted.
    *
    * @return A signal object to connect with.
    */
@@ -755,6 +785,48 @@ public:
    * @return A signal object to connect with.
    */
   virtual WebEngineConsoleMessageSignalType& ConsoleMessageSignal() = 0;
+
+  /**
+   * @brief Connect to this signal to be notified when new policy would be decided.
+   *
+   * @return A signal object to connect with.
+   */
+  virtual WebEnginePolicyDecisionSignalType& PolicyDecisionSignal() = 0;
+
+  /**
+   * @brief Connect to this signal to be notified when certificate need be confirmed.
+   *
+   * @return A signal object to connect with.
+   */
+  virtual WebEngineCertificateSignalType& CertificateConfirmSignal() = 0;
+
+  /**
+   * @brief Connect to this signal to be notified when ssl certificate is changed.
+   *
+   * @return A signal object to connect with.
+   */
+  virtual WebEngineCertificateSignalType& SslCertificateChangedSignal() = 0;
+
+  /**
+   * @brief Connect to this signal to be notified when http authentication need be confirmed.
+   *
+   * @return A signal object to connect with.
+   */
+  virtual WebEngineHttpAuthHandlerSignalType& HttpAuthHandlerSignal() = 0;
+
+  /**
+   * @brief Connect to this signal to be notified when context menu would be customized.
+   *
+   * @return A signal object to connect with.
+   */
+  virtual WebEngineContextMenuCustomizedSignalType& ContextMenuCustomizedSignal() = 0;
+
+  /**
+   * @brief Connect to this signal to be notified when context menu item is selected.
+   *
+   * @return A signal object to connect with.
+   */
+  virtual WebEngineContextMenuItemSelectedSignalType& ContextMenuItemSelectedSignal() = 0;
 };
 
 // specialization has to be done in the same namespace
diff --git a/dali/devel-api/adaptor-framework/web-engine-policy-decision.h b/dali/devel-api/adaptor-framework/web-engine-policy-decision.h
new file mode 100755 (executable)
index 0000000..a9fda10
--- /dev/null
@@ -0,0 +1,136 @@
+#ifndef DALI_WEB_ENGINE_POLICY_DECISION_H
+#define DALI_WEB_ENGINE_POLICY_DECISION_H
+
+/*
+ * Copyright (c) 2021 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.
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+
+namespace Dali
+{
+class WebEngineFrame;
+
+/**
+ * @brief A class WebBackForwardList for back forward list of web engine.
+ */
+class WebEnginePolicyDecision
+{
+public:
+  /**
+   * @brief Enumeration that provides an option to policy decision types.
+   */
+  enum class DecisionType
+  {
+    USE,      ///< Use.
+    DOWNLOAD, ///< Download.
+    IGNORE,   ///< Ignore.
+  };
+
+  /**
+   * @brief Enumeration that provides an option to policy navigation types.
+   */
+  enum class NavigationType
+  {
+    LINK_CLICKED,     ///< Link clicked.
+    FORM_SUBMITTED,   ///< Form submitted.
+    BACK_FORWARD,     ///< Back forward.
+    RELOAD,           ///< Reload.
+    FORM_RESUBMITTED, ///< Form resubmitted.
+    OTHER,            ///< Other.
+  };
+
+  /**
+   * @brief Constructor.
+   */
+  WebEnginePolicyDecision() = default;
+
+  /**
+   * @brief Destructor.
+   */
+  virtual ~WebEnginePolicyDecision() = default;
+
+  /**
+   * @brief Returns the url that request policy decision.
+   * @return The url that request policy decision
+   */
+  virtual std::string GetUrl() const = 0;
+
+  /**
+   * @brief Returns a cookie that web page has.
+   * @return The cookie string if successfully
+   */
+  virtual std::string GetCookie() const = 0;
+
+  /**
+   * @brief Returns a decision type.
+   * @return The decision type
+   */
+  virtual DecisionType GetDecisionType() const = 0;
+
+  /**
+   * @brief Returns a MIME type for response data.
+   * @return The MIME type string
+   */
+  virtual std::string GetResponseMime() const = 0;
+
+  /**
+   * @brief Returns an HTTP status code.
+   * @return The HTTP status code number
+   */
+  virtual int32_t GetResponseStatusCode() const = 0;
+
+  /**
+   * @brief Returns a navigation type.
+   * @return The navigation type
+   */
+  virtual NavigationType GetNavigationType() const = 0;
+
+  /**
+   * @brief Gets frame.
+   * @return The frame of policy decision
+   */
+  virtual WebEngineFrame& GetFrame() const = 0;
+
+  /**
+   * @brief Gets a scheme from the Policy Decision.
+   * @return The scheme if succeeded, empty otherwise
+   */
+  virtual std::string GetScheme() const = 0;
+
+  /**
+   * @brief Accepts the action which triggers this decision.
+   * @return True if successfully, false otherwise
+   */
+  virtual bool Use() = 0;
+
+  /**
+   * @brief Ignores the action which triggers this decision.
+   * @return True if successfully, false otherwise
+   */
+  virtual bool Ignore() = 0;
+
+  /**
+   * @brief Suspend the operation for policy decision.
+   * @return True if successfully, false otherwise
+   */
+  virtual bool Suspend() = 0;
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_POLICY_DECISION_H
diff --git a/dali/devel-api/adaptor-framework/web-engine-security-origin.h b/dali/devel-api/adaptor-framework/web-engine-security-origin.h
new file mode 100755 (executable)
index 0000000..4161878
--- /dev/null
@@ -0,0 +1,59 @@
+#ifndef DALI_WEB_ENGINE_SECURITY_ORIGIN_H
+#define DALI_WEB_ENGINE_SECURITY_ORIGIN_H
+
+/*
+ * Copyright (c) 2021 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.
+ * 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.
+ *
+ */
+
+// EXTERNAL INCLUDES
+#include <string>
+
+namespace Dali
+{
+/**
+ * @brief A class WebEngineSecurityOrigin for security origin of web engine.
+ */
+class WebEngineSecurityOrigin
+{
+public:
+  /**
+   * @brief Constructor.
+   */
+  WebEngineSecurityOrigin() = default;
+
+  /**
+   * @brief Destructor.
+   */
+  virtual ~WebEngineSecurityOrigin() = default;
+
+  /**
+   * @brief Requests for getting host of security origin.
+   *
+   * @return host of security origin
+   */
+  virtual std::string GetHost() const = 0;
+
+  /**
+   * @brief Requests for getting host of security origin.
+   *
+   * @return protocol of security origin
+   */
+  virtual std::string GetProtocol() const = 0;
+};
+
+} // namespace Dali
+
+#endif // DALI_WEB_ENGINE_SECURITY_ORIGIN_H
old mode 100755 (executable)
new mode 100644 (file)
index d186a61..243fb75
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/web-engine-back-forward-list.h>
+#include <dali/devel-api/adaptor-framework/web-engine-certificate.h>
 #include <dali/devel-api/adaptor-framework/web-engine-console-message.h>
+#include <dali/devel-api/adaptor-framework/web-engine-context-menu-item.h>
+#include <dali/devel-api/adaptor-framework/web-engine-context-menu.h>
 #include <dali/devel-api/adaptor-framework/web-engine-context.h>
 #include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
-#include <dali/devel-api/adaptor-framework/web-engine-request-interceptor.h>
+#include <dali/devel-api/adaptor-framework/web-engine-http-auth-handler.h>
 #include <dali/devel-api/adaptor-framework/web-engine-load-error.h>
+#include <dali/devel-api/adaptor-framework/web-engine-policy-decision.h>
+#include <dali/devel-api/adaptor-framework/web-engine-request-interceptor.h>
 #include <dali/devel-api/adaptor-framework/web-engine-settings.h>
 #include <dali/internal/web-engine/common/web-engine-impl.h>
 
@@ -352,14 +357,14 @@ bool WebEngine::SendKeyEvent(const KeyEvent& event)
   return GetImplementation(*this).SendKeyEvent(event);
 }
 
-bool WebEngine::SendHoverEvent( const HoverEvent& event )
+bool WebEngine::SendHoverEvent(const HoverEvent& event)
 {
-  return GetImplementation( *this ).SendHoverEvent( event );
+  return GetImplementation(*this).SendHoverEvent(event);
 }
 
-bool WebEngine::SendWheelEvent( const WheelEvent& event )
+bool WebEngine::SendWheelEvent(const WheelEvent& event)
 {
-  return GetImplementation( *this ).SendWheelEvent( event );
+  return GetImplementation(*this).SendWheelEvent(event);
 }
 
 void WebEngine::SetFocus(bool focused)
@@ -512,4 +517,34 @@ Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType& WebEngine::ConsoleMess
   return GetImplementation(*this).ConsoleMessageSignal();
 }
 
+Dali::WebEnginePlugin::WebEnginePolicyDecisionSignalType& WebEngine::PolicyDecisionSignal()
+{
+  return GetImplementation(*this).PolicyDecisionSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::CertificateConfirmSignal()
+{
+  return GetImplementation(*this).CertificateConfirmSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::SslCertificateChangedSignal()
+{
+  return GetImplementation(*this).SslCertificateChangedSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& WebEngine::HttpAuthHandlerSignal()
+{
+  return GetImplementation(*this).HttpAuthHandlerSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType& WebEngine::ContextMenuCustomizedSignal()
+{
+  return GetImplementation(*this).ContextMenuCustomizedSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType& WebEngine::ContextMenuItemSelectedSignal()
+{
+  return GetImplementation(*this).ContextMenuItemSelectedSignal();
+}
+
 } // namespace Dali
old mode 100755 (executable)
new mode 100644 (file)
index 1c6e97a..fee7cfc
@@ -87,7 +87,7 @@ public:
   static WebEngine DownCast(BaseHandle handle);
 
   /**
-   * @brief Creates WebEngine instance.
+   * @brief Create WebEngine instance.
    *
    * @param [in] width The width of Web
    * @param [in] height The height of Web
@@ -97,7 +97,7 @@ public:
   void Create(int width, int height, const std::string& locale, const std::string& timezoneId);
 
   /**
-   * @brief Creates WebEngine instance.
+   * @brief Create WebEngine instance.
    *
    * @param [in] width The width of Web
    * @param [in] height The height of Web
@@ -107,12 +107,12 @@ public:
   void Create(int width, int height, int argc, char** argv);
 
   /**
-   * @brief Destroys WebEngine instance.
+   * @brief Destroy WebEngine instance.
    */
   void Destroy();
 
   /**
-   * @brief Gets native image source to render.
+   * @brief Get native image source to render.
    */
   NativeImageInterfacePtr GetNativeImageSource();
 
@@ -137,33 +137,33 @@ public:
   Dali::WebEngineBackForwardList& GetBackForwardList() const;
 
   /**
-   * @brief Loads a web page based on a given URL.
+   * @brief Load a web page based on a given URL.
    *
    * @param [in] url The URL of the resource to load
    */
   void LoadUrl(const std::string& url);
 
   /**
-   * @brief Returns the title of the Web.
+   * @brief Return the title of the Web.
    *
    * @return The title of web page
    */
   std::string GetTitle() const;
 
   /**
-   * @brief Returns the Favicon of the Web.
+   * @brief Return the Favicon of the Web.
    *
    * @return FavIcon of Dali::PixelData& type
    */
   Dali::PixelData GetFavicon() const;
 
   /**
-   * @brief Gets the url.
+   * @brief Get the url.
    */
   const std::string& GetUrl();
 
   /**
-   * @brief Loads a given string as web contents.
+   * @brief Load a given string as web contents.
    *
    * @param [in] htmlString The string to use as the contents of the web page
    */
@@ -181,7 +181,7 @@ public:
   bool LoadHtmlStringOverrideCurrentEntry(const std::string& html, const std::string& basicUri, const std::string& unreachableUrl);
 
   /**
-   * @brief Requests loading the given contents by MIME type into the view object
+   * @brief Request loading the given contents by MIME type into the view object
    *
    * @param[in] contents The content to load
    * @param[in] contentSize The size of contents (in bytes)
@@ -194,27 +194,27 @@ public:
   bool LoadContents(const std::string& contents, uint32_t contentSize, const std::string& mimeType, const std::string& encoding, const std::string& baseUri);
 
   /**
-   * @brief Reloads the Web.
+   * @brief Reload the Web.
    */
   void Reload();
 
   /**
-   * @brief Reloads the current page's document without cache
+   * @brief Reload the current page's document without cache
    */
   bool ReloadWithoutCache();
 
   /**
-   * @brief Stops loading web contents on the current page.
+   * @brief Stop loading web contents on the current page.
    */
   void StopLoading();
 
   /**
-   * @brief Suspends the operation associated with the view.
+   * @brief Suspend the operation associated with the view.
    */
   void Suspend();
 
   /**
-   * @brief Resumes the operation associated with the view object after calling Suspend().
+   * @brief Resume the operation associated with the view object after calling Suspend().
    */
   void Resume();
 
@@ -264,7 +264,7 @@ public:
   bool StopInspectorServer();
 
   /**
-   * @brief Scrolls web page of view by deltaX and deltaY.
+   * @brief Scroll web page of view by deltaX and deltaY.
    *
    * @param[in] deltaX horizontal offset to scroll
    * @param[in] deltaY vertical offset to scroll
@@ -272,7 +272,7 @@ public:
   void ScrollBy(int deltaX, int deltaY);
 
   /**
-   * @brief Scrolls edge of view by deltaX and deltaY.
+   * @brief Scroll edge of view by deltaX and deltaY.
    *
    * @param[in] deltaX horizontal offset to scroll
    * @param[in] deltaY vertical offset to scroll
@@ -282,51 +282,51 @@ public:
   bool ScrollEdgeBy(int deltaX, int deltaY);
 
   /**
-   * @brief Sets an absolute scroll of the given view.
+   * @brief Set an absolute scroll of the given view.
    */
   void SetScrollPosition(int x, int y);
 
   /**
-   * @brief Gets the current scroll position of the given view.
+   * @brief Get the current scroll position of the given view.
    */
   Dali::Vector2 GetScrollPosition() const;
 
   /**
-   * @brief Gets the possible scroll size of the given view.
+   * @brief Get the possible scroll size of the given view.
    */
   Dali::Vector2 GetScrollSize() const;
 
   /**
-   * @brief Gets the last known content's size.
+   * @brief Get the last known content's size.
    */
   Dali::Vector2 GetContentSize() const;
 
   /**
-   * @brief Returns whether forward is possible.
+   * @brief Return whether forward is possible.
    *
    * @return True if forward is possible, false otherwise
    */
   bool CanGoForward();
 
   /**
-   * @brief Goes to forward.
+   * @brief Go to forward.
    */
   void GoForward();
 
   /**
-   * @brief Returns whether backward is possible.
+   * @brief Return whether backward is possible.
    *
    * @return True if backward is possible, false otherwise
    */
   bool CanGoBack();
 
   /**
-   * @brief Goes to back.
+   * @brief Go to back.
    */
   void GoBack();
 
   /**
-   * @brief Evaluates JavaScript code represented as a string.
+   * @brief Evaluate JavaScript code represented as a string.
    *
    * @param[in] script The JavaScript code
    * @param[in] resultHandler The callback function to be called by the JavaScript runtime. This carries evaluation result.
@@ -380,12 +380,12 @@ public:
   void JavaScriptPromptReply(const std::string& result);
 
   /**
-   * @brief Clears the history of Web.
+   * @brief Clear the history of Web.
    */
   void ClearHistory();
 
   /**
-   * @brief Clears all tiles resources of Web.
+   * @brief Clear all tiles resources of Web.
    */
   void ClearAllTilesResources();
 
@@ -404,52 +404,52 @@ public:
   void SetUserAgent(const std::string& userAgent);
 
   /**
-   * @brief Sets the size of Web Pages.
+   * @brief Set the size of Web Pages.
    */
   void SetSize(int width, int height);
 
   /**
-   * @brief Sets background color of web page.
+   * @brief Set background color of web page.
    *
    * @param[in] color Background color
    */
   void SetDocumentBackgroundColor(Dali::Vector4 color);
 
   /**
-   * @brief Clears tiles when hidden.
+   * @brief Clear tiles when hidden.
    *
    * @param[in] cleared Whether tiles are cleared or not
    */
   void ClearTilesWhenHidden(bool cleared);
 
   /**
-   * @brief Sets multiplier of cover area of tile.
+   * @brief Set multiplier of cover area of tile.
    *
    * @param[in] multiplier The multiplier of cover area
    */
   void SetTileCoverAreaMultiplier(float multiplier);
 
   /**
-   * @brief Enables cursor by client.
+   * @brief Enable cursor by client.
    *
    * @param[in] enabled Whether cursor is enabled or not
    */
   void EnableCursorByClient(bool enabled);
 
   /**
-   * @brief Gets the selected text.
+   * @brief Get the selected text.
    *
    * @return the selected text
    */
   std::string GetSelectedText() const;
 
   /**
-   * @brief Sends Touch Events.
+   * @brief Send Touch Events.
    */
   bool SendTouchEvent(const TouchEvent& touch);
 
   /**
-   * @brief Sends key Events.
+   * @brief Send key Events.
    */
   bool SendKeyEvent(const KeyEvent& event);
 
@@ -460,58 +460,58 @@ public:
   void SetFocus(bool focused);
 
   /**
-   * @brief Enables/disables mouse events. The default is enabled.
+   * @brief Enable/disable mouse events. The default is enabled.
    *
    * @param[in] enabled True if mouse events are enabled, false otherwise
    */
-  void EnableMouseEvents( bool enabled );
+  void EnableMouseEvents(bool enabled);
 
   /**
-   * @brief Enables/disables key events. The default is enabled.
+   * @brief Enable/disable key events. The default is enabled.
    *
    * @param[in] enabled True if key events are enabled, false otherwise
    */
-  void EnableKeyEvents( bool enabled );
+  void EnableKeyEvents(bool enabled);
 
   /**
-   * @brief Sets zoom factor of the current page.
+   * @brief Set zoom factor of the current page.
    * @param[in] zoomFactor a new factor to be set.
    */
   void SetPageZoomFactor(float zoomFactor);
 
   /**
-   * @brief Queries the current zoom factor of the page。
+   * @brief Query the current zoom factor of the page。
    * @return The current page zoom factor.
    */
   float GetPageZoomFactor() const;
 
   /**
-   * @brief Sets the current text zoom level。.
+   * @brief Set the current text zoom level。.
    * @param[in] zoomFactor a new factor to be set.
    */
   void SetTextZoomFactor(float zoomFactor);
 
   /**
-   * @brief Gets the current text zoom level.
+   * @brief Get the current text zoom level.
    * @return The current text zoom factor.
    */
   float GetTextZoomFactor() const;
 
   /**
-   * @brief Gets the current load progress of the page.
+   * @brief Get the current load progress of the page.
    * @return The load progress of the page.
    */
   float GetLoadProgressPercentage() const;
 
   /**
-   * @brief Scales the current page, centered at the given point.
+   * @brief Scale the current page, centered at the given point.
    * @param[in] scaleFactor a new factor to be scaled.
    * @param[in] point a center coordinate.
    */
   void SetScaleFactor(float scaleFactor, Dali::Vector2 point);
 
   /**
-   * @brief Gets the current scale factor of the page.
+   * @brief Get the current scale factor of the page.
    * @return The current scale factor.
    */
   float GetScaleFactor() const;
@@ -531,7 +531,7 @@ public:
   bool SetVisibility(bool visible);
 
   /**
-   * @brief Searches and highlights the given string in the document.
+   * @brief Search and highlights the given string in the document.
    * @param[in] text The text to find
    * @param[in] options The options to find
    * @param[in] maxMatchCount The maximum match count to find
@@ -578,7 +578,7 @@ public:
   bool CheckVideoPlayingAsynchronously(Dali::WebEnginePlugin::VideoPlayingCallback callback);
 
   /**
-   * @brief Sets callback which alled upon geolocation permission request.
+   * @brief Set callback which alled upon geolocation permission request.
    *
    * @param[in] callback The callback for requesting geolocation permission
    */
@@ -597,87 +597,129 @@ public:
   void EnableVideoHole(bool enabled);
 
   /**
-   * @brief Sends hover events.
+   * @brief Send hover events.
    * @param[in] event The hover event would be sent.
    */
-  bool SendHoverEvent( const HoverEvent& event );
+  bool SendHoverEvent(const HoverEvent& event);
 
   /**
-   * @brief Sends wheel events.
+   * @brief Send wheel events.
    * @param[in] event The wheel event would be sent.
    */
-  bool SendWheelEvent( const WheelEvent& event );
+  bool SendWheelEvent(const WheelEvent& event);
 
   /**
-   * @brief Connects to this signal to be notified when page loading is started.
+   * @brief Connect to this signal to be notified when page loading is started.
    *
    * @return A signal object to connect with
    */
   Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadStartedSignal();
 
   /**
-   * @brief Connects to this signal to be notified when page loading is in progress.
+   * @brief Connect to this signal to be notified when page loading is in progress.
    *
    * @return A signal object to connect with
    */
   Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadInProgressSignal();
 
   /**
-   * @brief Connects to this signal to be notified when page loading is finished.
+   * @brief Connect to this signal to be notified when page loading is finished.
    *
    * @return A signal object to connect with
    */
   Dali::WebEnginePlugin::WebEnginePageLoadSignalType& PageLoadFinishedSignal();
 
   /**
-   * @brief Connects to this signal to be notified when an error occurs in page loading.
+   * @brief Connect to this signal to be notified when an error occurs in page loading.
    *
    * @return A signal object to connect with
    */
   Dali::WebEnginePlugin::WebEnginePageLoadErrorSignalType& PageLoadErrorSignal();
 
   /**
-   * @brief Connects to this signal to be notified when scroll edge is reached.
+   * @brief Connect to this signal to be notified when scroll edge is reached.
    *
    * @return A signal object to connect with
    */
   Dali::WebEnginePlugin::WebEngineScrollEdgeReachedSignalType& ScrollEdgeReachedSignal();
 
   /**
-   * @brief Connects to this signal to be notified when url is changed.
+   * @brief Connect to this signal to be notified when url is changed.
    *
    * @return A signal object to connect with
    */
   Dali::WebEnginePlugin::WebEngineUrlChangedSignalType& UrlChangedSignal();
 
   /**
-   * @brief Connects to this signal to be notified when form repost decision is requested.
+   * @brief Connect to this signal to be notified when form repost decision is requested.
    *
    * @return A signal object to connect with.
    */
   Dali::WebEnginePlugin::WebEngineFormRepostDecisionSignalType& FormRepostDecisionSignal();
 
   /**
-   * @brief Connects to this signal to be notified when frame is rendered.
+   * @brief Connect to this signal to be notified when frame is rendered.
    *
    * @return A signal object to connect with.
    */
   Dali::WebEnginePlugin::WebEngineFrameRenderedSignalType& FrameRenderedSignal();
 
   /**
-   * @brief Connects to this signal to be notified when http request need be intercepted.
+   * @brief Connect to this signal to be notified when http request need be intercepted.
    *
    * @return A signal object to connect with.
    */
   Dali::WebEnginePlugin::WebEngineRequestInterceptorSignalType& RequestInterceptorSignal();
 
   /**
-   * @brief Connects to this signal to be notified when console message will be logged.
+   * @brief Connect to this signal to be notified when console message will be logged.
    *
    * @return A signal object to connect with.
    */
   Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType& ConsoleMessageSignal();
 
+  /**
+   * @brief Connect to this signal to be notified when new policy would be decided.
+   *
+   * @return A signal object to connect with.
+   */
+  Dali::WebEnginePlugin::WebEnginePolicyDecisionSignalType& PolicyDecisionSignal();
+
+  /**
+   * @brief Connect to this signal to be notified when certificate need be confirmed.
+   *
+   * @return A signal object to connect with.
+   */
+  Dali::WebEnginePlugin::WebEngineCertificateSignalType& CertificateConfirmSignal();
+
+  /**
+   * @brief Connect to this signal to be notified when ssl certificate is changed.
+   *
+   * @return A signal object to connect with.
+   */
+  Dali::WebEnginePlugin::WebEngineCertificateSignalType& SslCertificateChangedSignal();
+
+  /**
+   * @brief Connect to this signal to be notified when http authentication need be confirmed.
+   *
+   * @return A signal object to connect with.
+   */
+  Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& HttpAuthHandlerSignal();
+
+  /**
+   * @brief Connect to this signal to be notified when context menu would be customized.
+   *
+   * @return A signal object to connect with.
+   */
+  Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType& ContextMenuCustomizedSignal();
+
+  /**
+   * @brief Connect to this signal to be notified when context menu item is selected.
+   *
+   * @return A signal object to connect with.
+   */
+  Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType& ContextMenuItemSelectedSignal();
+
 private: // Not intended for application developers
   /**
    * @brief Internal constructor
index b1aca21..6f6d767 100755 (executable)
@@ -89,15 +89,22 @@ SET( devel_api_adaptor_framework_header_files
   ${adaptor_devel_api_dir}/adaptor-framework/video-player.h
   ${adaptor_devel_api_dir}/adaptor-framework/video-player-plugin.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine.h
-  ${adaptor_devel_api_dir}/adaptor-framework/web-engine-back-forward-list-item.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine-back-forward-list.h
+  ${adaptor_devel_api_dir}/adaptor-framework/web-engine-back-forward-list-item.h
+  ${adaptor_devel_api_dir}/adaptor-framework/web-engine-certificate.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine-console-message.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine-context.h
+  ${adaptor_devel_api_dir}/adaptor-framework/web-engine-context-menu.h
+  ${adaptor_devel_api_dir}/adaptor-framework/web-engine-context-menu-item.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine-cookie-manager.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine-form-repost-decision.h
+  ${adaptor_devel_api_dir}/adaptor-framework/web-engine-frame.h
+  ${adaptor_devel_api_dir}/adaptor-framework/web-engine-http-auth-handler.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine-load-error.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine-plugin.h
+  ${adaptor_devel_api_dir}/adaptor-framework/web-engine-policy-decision.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine-request-interceptor.h
+  ${adaptor_devel_api_dir}/adaptor-framework/web-engine-security-origin.h
   ${adaptor_devel_api_dir}/adaptor-framework/web-engine-settings.h
   ${adaptor_devel_api_dir}/adaptor-framework/key-extension-plugin.h
   ${adaptor_devel_api_dir}/adaptor-framework/virtual-keyboard.h
index 95135bf..b1b043c 100644 (file)
@@ -52,8 +52,10 @@ CanvasRendererTizen* CanvasRendererTizen::New(const Vector2& viewBox)
 
 CanvasRendererTizen::CanvasRendererTizen(const Vector2& viewBox)
 : mPixelBuffer(nullptr),
+#ifdef THORVG_SUPPORT
   mTvgCanvas(nullptr),
   mTvgRoot(nullptr),
+#endif
   mSize(0, 0),
   mViewBox(0, 0),
   mChanged(false)
@@ -63,6 +65,7 @@ CanvasRendererTizen::CanvasRendererTizen(const Vector2& viewBox)
 
 CanvasRendererTizen::~CanvasRendererTizen()
 {
+#ifdef THORVG_SUPPORT
   for(DrawableVectorIterator it    = mDrawables.begin(),
                              endIt = mDrawables.end();
       it != endIt;
@@ -78,10 +81,12 @@ CanvasRendererTizen::~CanvasRendererTizen()
   }
   //Terminate ThorVG Engine
   tvg::Initializer::term(tvg::CanvasEngine::Sw);
+#endif
 }
 
 void CanvasRendererTizen::Initialize(const Vector2& viewBox)
 {
+#ifdef THORVG_SUPPORT
   if(tvg::Initializer::init(tvg::CanvasEngine::Sw, 0 /*threads*/) != tvg::Result::Success)
   {
     DALI_LOG_ERROR("ThorVG engine initialize failed\n");
@@ -99,10 +104,12 @@ void CanvasRendererTizen::Initialize(const Vector2& viewBox)
   auto scene = tvg::Scene::gen();
   mTvgRoot   = scene.get();
   mTvgCanvas->push(move(scene));
+#endif
 }
 
 bool CanvasRendererTizen::Commit()
 {
+#ifdef THORVG_SUPPORT
   bool changed = false;
 
   for(DrawableVectorIterator it    = mDrawables.begin(),
@@ -157,6 +164,9 @@ bool CanvasRendererTizen::Commit()
     return false;
   }
   return true;
+#else
+  return false;
+#endif
 }
 
 Devel::PixelBuffer CanvasRendererTizen::GetPixelBuffer()
@@ -166,6 +176,7 @@ Devel::PixelBuffer CanvasRendererTizen::GetPixelBuffer()
 
 bool CanvasRendererTizen::AddDrawable(Dali::CanvasRenderer::Drawable& drawable)
 {
+#ifdef THORVG_SUPPORT
   bool exist = false;
   for(DrawableVectorIterator it    = mDrawables.begin(),
                              endIt = mDrawables.end();
@@ -208,6 +219,9 @@ bool CanvasRendererTizen::AddDrawable(Dali::CanvasRenderer::Drawable& drawable)
   mChanged = true;
 
   return true;
+#else
+  return false;
+#endif
 }
 
 bool CanvasRendererTizen::SetSize(const Vector2& size)
@@ -235,6 +249,7 @@ const Vector2& CanvasRendererTizen::GetSize()
 
 void CanvasRendererTizen::MakeTargetBuffer(const Vector2& size)
 {
+#ifdef THORVG_SUPPORT
   mPixelBuffer = Devel::PixelBuffer::New(size.width, size.height, Dali::Pixel::RGBA8888);
 
   unsigned char* pBuffer;
@@ -249,6 +264,7 @@ void CanvasRendererTizen::MakeTargetBuffer(const Vector2& size)
   mTvgCanvas->sync();
 
   mTvgCanvas->target(reinterpret_cast<uint32_t*>(pBuffer), size.width, size.width, size.height, tvg::SwCanvas::ABGR8888);
+#endif
 }
 
 } // namespace Adaptor
index 7e15533..eea66be 100644 (file)
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/object/weak-handle.h>
+#ifdef THORVG_SUPPORT
 #include <thorvg.h>
+#endif
+#include <dali/public-api/object/weak-handle.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/canvas-renderer-drawable.h>
@@ -104,8 +106,10 @@ private:
 private:
   Devel::PixelBuffer mPixelBuffer;
 
-  std::unique_ptr<tvg::SwCanvas>                                   mTvgCanvas;
-  tvg::Scene*                                                      mTvgRoot;
+#ifdef THORVG_SUPPORT
+  std::unique_ptr<tvg::SwCanvas> mTvgCanvas;
+  tvg::Scene*                    mTvgRoot;
+#endif
   typedef std::vector<WeakHandle<Dali::CanvasRenderer::Drawable> > DrawableVector;
   typedef DrawableVector::iterator                                 DrawableVectorIterator;
   DrawableVector                                                   mDrawables;
index 464d535..a3b453e 100644 (file)
@@ -48,21 +48,27 @@ DrawableTizen* DrawableTizen::New()
 
 DrawableTizen::DrawableTizen()
 : mAdded(false),
-  mChanged(false),
+  mChanged(false)
+#ifdef THORVG_SUPPORT
+  ,
   mTvgPaint(nullptr)
+#endif
 {
 }
 
 DrawableTizen::~DrawableTizen()
 {
+#ifdef THORVG_SUPPORT
   if(mTvgPaint && !mAdded)
   {
     delete mTvgPaint;
   }
+#endif
 }
 
 bool DrawableTizen::SetOpacity(float opacity)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgPaint)
   {
     DALI_LOG_ERROR("Drawable is null [%p]\n", this);
@@ -75,20 +81,28 @@ bool DrawableTizen::SetOpacity(float opacity)
   }
   SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 float DrawableTizen::GetOpacity() const
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgPaint)
   {
     DALI_LOG_ERROR("Drawable is null [%p]\n", this);
     return 0;
   }
   return (float)mTvgPaint->opacity() / 255.f;
+#else
+  return 0;
+#endif
 }
 
 bool DrawableTizen::Rotate(Degree degree)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgPaint)
   {
     DALI_LOG_ERROR("Drawable is null\n");
@@ -102,10 +116,14 @@ bool DrawableTizen::Rotate(Degree degree)
   }
   SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool DrawableTizen::Scale(float factor)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgPaint)
   {
     DALI_LOG_ERROR("Drawable is null\n");
@@ -119,10 +137,14 @@ bool DrawableTizen::Scale(float factor)
   }
   SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool DrawableTizen::Translate(Vector2 translate)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgPaint)
   {
     DALI_LOG_ERROR("Drawable is null\n");
@@ -136,10 +158,14 @@ bool DrawableTizen::Translate(Vector2 translate)
   }
   SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool DrawableTizen::Transform(const Dali::Matrix3& matrix)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgPaint)
   {
     DALI_LOG_ERROR("Drawable is null\n");
@@ -155,6 +181,9 @@ bool DrawableTizen::Transform(const Dali::Matrix3& matrix)
   }
   SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 void DrawableTizen::SetDrawableAdded(bool added)
@@ -164,11 +193,16 @@ void DrawableTizen::SetDrawableAdded(bool added)
 
 void* DrawableTizen::GetObject() const
 {
+#ifdef THORVG_SUPPORT
   return static_cast<void*>(mTvgPaint);
+#else
+  return nullptr;
+#endif
 }
 
 void DrawableTizen::SetObject(const void* object)
 {
+#ifdef THORVG_SUPPORT
   if(object)
   {
     mTvgPaint = static_cast<tvg::Paint*>((void*)object);
@@ -184,6 +218,7 @@ void DrawableTizen::SetObject(const void* object)
       delete mTvgPaint;
     }
   }
+#endif
 }
 
 void DrawableTizen::SetChanged(bool changed)
index e73ec78..836dd57 100644 (file)
  */
 
 // EXTERNAL INCLUDES
-#include <dali/public-api/object/base-object.h>
+#ifdef THORVG_SUPPORT
 #include <thorvg.h>
+#endif
+#include <dali/public-api/object/base-object.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/canvas-renderer-drawable.h>
@@ -121,7 +123,9 @@ private:
   bool mAdded;
   bool mChanged;
 
+#ifdef THORVG_SUPPORT
   tvg::Paint* mTvgPaint;
+#endif
 };
 
 } // namespace Adaptor
index 5e66c54..04db5c4 100644 (file)
@@ -46,7 +46,9 @@ ShapeTizen* ShapeTizen::New()
 }
 
 ShapeTizen::ShapeTizen()
+#ifdef THORVG_SUPPORT
 : mTvgShape(nullptr)
+#endif
 {
   Initialize();
 }
@@ -57,6 +59,7 @@ ShapeTizen::~ShapeTizen()
 
 void ShapeTizen::Initialize()
 {
+#ifdef THORVG_SUPPORT
   mTvgShape = tvg::Shape::gen().release();
   if(!mTvgShape)
   {
@@ -65,10 +68,12 @@ void ShapeTizen::Initialize()
 
   Drawable::Create();
   Drawable::SetObject(static_cast<void*>(mTvgShape));
+#endif
 }
 
 bool ShapeTizen::AddRect(Rect<float> rect, Vector2 roundedCorner)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null [%p]\n", this);
@@ -81,10 +86,14 @@ bool ShapeTizen::AddRect(Rect<float> rect, Vector2 roundedCorner)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool ShapeTizen::AddCircle(Vector2 center, Vector2 radius)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null [%p]\n", this);
@@ -97,10 +106,14 @@ bool ShapeTizen::AddCircle(Vector2 center, Vector2 radius)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool ShapeTizen::AddArc(Vector2 center, float radius, float startAngle, float sweep, bool pie)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -114,10 +127,14 @@ bool ShapeTizen::AddArc(Vector2 center, float radius, float startAngle, float sw
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool ShapeTizen::AddMoveTo(Vector2 point)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -131,10 +148,14 @@ bool ShapeTizen::AddMoveTo(Vector2 point)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool ShapeTizen::AddLineTo(Vector2 line)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -148,10 +169,14 @@ bool ShapeTizen::AddLineTo(Vector2 line)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool ShapeTizen::AddCubicTo(Vector2 controlPoint1, Vector2 controlPoint2, Vector2 endPoint)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -165,10 +190,14 @@ bool ShapeTizen::AddCubicTo(Vector2 controlPoint1, Vector2 controlPoint2, Vector
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool ShapeTizen::Close()
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -182,10 +211,14 @@ bool ShapeTizen::Close()
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 bool ShapeTizen::SetFillColor(Vector4 color)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null [%p]\n", this);
@@ -199,10 +232,14 @@ bool ShapeTizen::SetFillColor(Vector4 color)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 Vector4 ShapeTizen::GetFillColor() const
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null [%p]\n", this);
@@ -216,10 +253,14 @@ Vector4 ShapeTizen::GetFillColor() const
     return Vector4(0, 0, 0, 0);
   }
   return Vector4(r / 255.f, g / 255.f, b / 255.f, a / 255.f);
+#else
+  return Vector4::ZERO;
+#endif
 }
 
 bool ShapeTizen::SetFillRule(Dali::CanvasRenderer::Shape::FillRule rule)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -232,10 +273,14 @@ bool ShapeTizen::SetFillRule(Dali::CanvasRenderer::Shape::FillRule rule)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 Dali::CanvasRenderer::Shape::FillRule ShapeTizen::GetFillRule() const
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -245,10 +290,13 @@ Dali::CanvasRenderer::Shape::FillRule ShapeTizen::GetFillRule() const
   tvg::FillRule rule = static_cast<tvg::Shape*>(mTvgShape)->fillRule();
 
   return static_cast<Dali::CanvasRenderer::Shape::FillRule>(rule);
+#endif
+  return Dali::CanvasRenderer::Shape::FillRule::WINDING;
 }
 
 bool ShapeTizen::SetStrokeWidth(float width)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -262,20 +310,28 @@ bool ShapeTizen::SetStrokeWidth(float width)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 float ShapeTizen::GetStrokeWidth() const
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
     return false;
   }
   return static_cast<tvg::Shape*>(mTvgShape)->strokeWidth();
+#else
+  return false;
+#endif
 }
 
 bool ShapeTizen::SetStrokeColor(Vector4 color)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -289,10 +345,14 @@ bool ShapeTizen::SetStrokeColor(Vector4 color)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 Vector4 ShapeTizen::GetStrokeColor() const
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -307,10 +367,14 @@ Vector4 ShapeTizen::GetStrokeColor() const
     return Vector4(0, 0, 0, 0);
   }
   return Vector4(r / 255.f, g / 255.f, b / 255.f, a / 255.f);
+#else
+  return Vector4(0, 0, 0, 0);
+#endif
 }
 
 bool ShapeTizen::SetStrokeDash(const Dali::Vector<float> dashPattern)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -331,10 +395,14 @@ bool ShapeTizen::SetStrokeDash(const Dali::Vector<float> dashPattern)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 Dali::Vector<float> ShapeTizen::GetStrokeDash() const
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -359,10 +427,14 @@ Dali::Vector<float> ShapeTizen::GetStrokeDash() const
     dashPattern.PushBack(tvgDashPattern[i]);
   }
   return dashPattern;
+#else
+  return Vector<float>();
+#endif
 }
 
 bool ShapeTizen::SetStrokeCap(Dali::CanvasRenderer::Shape::StrokeCap cap)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -376,10 +448,14 @@ bool ShapeTizen::SetStrokeCap(Dali::CanvasRenderer::Shape::StrokeCap cap)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 Dali::CanvasRenderer::Shape::StrokeCap ShapeTizen::GetStrokeCap() const
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -389,10 +465,13 @@ Dali::CanvasRenderer::Shape::StrokeCap ShapeTizen::GetStrokeCap() const
   tvg::StrokeCap cap = static_cast<tvg::Shape*>(mTvgShape)->strokeCap();
 
   return static_cast<Dali::CanvasRenderer::Shape::StrokeCap>(cap);
+#endif
+  return Dali::CanvasRenderer::Shape::StrokeCap::SQUARE;
 }
 
 bool ShapeTizen::SetStrokeJoin(Dali::CanvasRenderer::Shape::StrokeJoin join)
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -406,10 +485,14 @@ bool ShapeTizen::SetStrokeJoin(Dali::CanvasRenderer::Shape::StrokeJoin join)
   }
   Drawable::SetChanged(true);
   return true;
+#else
+  return false;
+#endif
 }
 
 Dali::CanvasRenderer::Shape::StrokeJoin ShapeTizen::GetStrokeJoin() const
 {
+#ifdef THORVG_SUPPORT
   if(!mTvgShape)
   {
     DALI_LOG_ERROR("Shape is null\n");
@@ -419,6 +502,8 @@ Dali::CanvasRenderer::Shape::StrokeJoin ShapeTizen::GetStrokeJoin() const
   tvg::StrokeJoin join = static_cast<tvg::Shape*>(mTvgShape)->strokeJoin();
 
   return static_cast<Dali::CanvasRenderer::Shape::StrokeJoin>(join);
+#endif
+  return Dali::CanvasRenderer::Shape::StrokeJoin::BEVEL;
 }
 
 } // namespace Adaptor
index 578a135..0e93113 100644 (file)
  */
 
 // EXTERNAL INCLUDES
+#ifdef THORVG_SUPPORT
+#include <thorvg.h>
+#endif
 #include <dali/public-api/object/base-object.h>
 #include <dali/public-api/signals/connection-tracker.h>
-#include <thorvg.h>
 
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/canvas-renderer-shape.h>
@@ -169,8 +171,10 @@ private:
 private:
   void Initialize();
 
+#ifdef THORVG_SUPPORT
 private:
   tvg::Shape* mTvgShape;
+#endif
 };
 
 } // namespace Adaptor
index 1be78b9..34dba31 100644 (file)
@@ -127,6 +127,7 @@ bool CanvasRendererUbuntu::Commit()
     {
       changed = true;
       drawableImpl.SetChanged(false);
+      break;
     }
   }
 
index 79a4871..6eae2d4 100644 (file)
@@ -68,7 +68,6 @@ void ShapeUbuntu::Initialize()
 
   Drawable::Create();
   Drawable::SetObject(static_cast<void*>(mTvgShape));
-
 #endif
 }
 
@@ -255,7 +254,7 @@ Vector4 ShapeUbuntu::GetFillColor() const
   }
   return Vector4(r / 255.f, g / 255.f, b / 255.f, a / 255.f);
 #else
-  return Vector4(0, 0, 0, 0);
+  return Vector4::ZERO;
 #endif
 }
 
index 8273d09..dfd48e2 100644 (file)
@@ -87,13 +87,11 @@ void Capture::Start(Dali::Actor source, const Dali::Vector2& position, const Dal
 
 void Capture::Start(Dali::Actor source, const Dali::Vector2& position, const Dali::Vector2& size, const std::string& path, const Dali::Vector4& clearColor)
 {
-  DALI_ASSERT_ALWAYS(path.size() > 4 && "Path is invalid.");
-
   // Increase the reference count focely to avoid application mistake.
   Reference();
 
   mPath = path;
-  if(mPath.size() > 0)
+  if(!mPath.empty())
   {
     mFileSave = true;
   }
old mode 100755 (executable)
new mode 100644 (file)
index bd2f0e2..d7e9fec
 // INTERNAL INCLUDES
 #include <dali/devel-api/adaptor-framework/environment-variable.h>
 #include <dali/devel-api/adaptor-framework/web-engine-back-forward-list.h>
+#include <dali/devel-api/adaptor-framework/web-engine-certificate.h>
 #include <dali/devel-api/adaptor-framework/web-engine-console-message.h>
+#include <dali/devel-api/adaptor-framework/web-engine-context-menu.h>
 #include <dali/devel-api/adaptor-framework/web-engine-context.h>
 #include <dali/devel-api/adaptor-framework/web-engine-cookie-manager.h>
-#include <dali/devel-api/adaptor-framework/web-engine-request-interceptor.h>
+#include <dali/devel-api/adaptor-framework/web-engine-http-auth-handler.h>
 #include <dali/devel-api/adaptor-framework/web-engine-load-error.h>
+#include <dali/devel-api/adaptor-framework/web-engine-policy-decision.h>
+#include <dali/devel-api/adaptor-framework/web-engine-request-interceptor.h>
 #include <dali/devel-api/adaptor-framework/web-engine-settings.h>
 #include <dali/internal/system/common/environment-variables.h>
 #include <dali/public-api/adaptor-framework/native-image-source.h>
@@ -349,7 +353,7 @@ void WebEngine::JavaScriptAlertReply()
 
 void WebEngine::RegisterJavaScriptConfirmCallback(Dali::WebEnginePlugin::JavaScriptConfirmCallback callback)
 {
-  mPlugin->RegisterJavaScriptAlertCallback(callback);
+  mPlugin->RegisterJavaScriptConfirmCallback(callback);
 }
 
 void WebEngine::JavaScriptConfirmReply(bool confirmed)
@@ -547,14 +551,14 @@ void WebEngine::EnableVideoHole(bool enabled)
   mPlugin->EnableVideoHole(enabled);
 }
 
-bool WebEngine::SendHoverEvent( const Dali::HoverEvent& event )
+bool WebEngine::SendHoverEvent(const Dali::HoverEvent& event)
 {
-  return mPlugin->SendHoverEvent( event );
+  return mPlugin->SendHoverEvent(event);
 }
 
-bool WebEngine::SendWheelEvent( const Dali::WheelEvent& event )
+bool WebEngine::SendWheelEvent(const Dali::WheelEvent& event)
 {
-  return mPlugin->SendWheelEvent( event );
+  return mPlugin->SendWheelEvent(event);
 }
 
 Dali::WebEnginePlugin::WebEnginePageLoadSignalType& WebEngine::PageLoadStartedSignal()
@@ -607,6 +611,36 @@ Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType& WebEngine::ConsoleMess
   return mPlugin->ConsoleMessageSignal();
 }
 
+Dali::WebEnginePlugin::WebEnginePolicyDecisionSignalType& WebEngine::PolicyDecisionSignal()
+{
+  return mPlugin->PolicyDecisionSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::CertificateConfirmSignal()
+{
+  return mPlugin->CertificateConfirmSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineCertificateSignalType& WebEngine::SslCertificateChangedSignal()
+{
+  return mPlugin->SslCertificateChangedSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& WebEngine::HttpAuthHandlerSignal()
+{
+  return mPlugin->HttpAuthHandlerSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType& WebEngine::ContextMenuCustomizedSignal()
+{
+  return mPlugin->ContextMenuCustomizedSignal();
+}
+
+Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType& WebEngine::ContextMenuItemSelectedSignal()
+{
+  return mPlugin->ContextMenuItemSelectedSignal();
+}
+
 } // namespace Adaptor
 } // namespace Internal
 } // namespace Dali
index bfac881..d015ea5 100755 (executable)
@@ -494,6 +494,36 @@ public:
    */
   Dali::WebEnginePlugin::WebEngineConsoleMessageSignalType& ConsoleMessageSignal();
 
+  /**
+   @copydoc Dali::WebEngine::PolicyDecisionSignal()
+   */
+  Dali::WebEnginePlugin::WebEnginePolicyDecisionSignalType& PolicyDecisionSignal();
+
+  /**
+   * @copydoc Dali::WebEngine::CertificateConfirmSignal()
+   */
+  Dali::WebEnginePlugin::WebEngineCertificateSignalType& CertificateConfirmSignal();
+
+  /**
+   * @copydoc Dali::WebEngine::SslCertificateChangedSignal()
+   */
+  Dali::WebEnginePlugin::WebEngineCertificateSignalType& SslCertificateChangedSignal();
+
+  /**
+   * @copydoc Dali::WebEngine::HttpAuthHandlerSignal()
+   */
+  Dali::WebEnginePlugin::WebEngineHttpAuthHandlerSignalType& HttpAuthHandlerSignal();
+
+  /**
+   * @copydoc Dali::WebEngine::ContextMenuCustomizedSignal()
+   */
+  Dali::WebEnginePlugin::WebEngineContextMenuCustomizedSignalType& ContextMenuCustomizedSignal();
+
+  /**
+   * @copydoc Dali::WebEngine::ContextMenuItemSelectedSignal()
+   */
+  Dali::WebEnginePlugin::WebEngineContextMenuItemSelectedSignalType& ContextMenuItemSelectedSignal();
+
 private:
   /**
    * @brief Constructor.