mWidth = width;
mHeight = height;
- InitWebView(false);
+ InitWebView();
WebEngineManager::Get().Add(mWebView, this);
}
return;
}
- bool incognito = false;
- for(uint32_t idx = 0; idx < argc; ++idx)
- {
- if(strstr(argv[idx], "--incognito"))
- {
- incognito = true;
- break;
- }
- }
-
mWidth = width;
mHeight = height;
- InitWebView(incognito);
+ InitWebView();
WebEngineManager::Get().Add(mWebView, this);
}
-void TizenWebEngineChromium::InitWebView(bool incognito)
+void TizenWebEngineChromium::InitWebView()
{
- Ewk_Context* context = nullptr;
- if(incognito)
- {
- mWebView = ewk_view_add_in_incognito_mode(ecore_evas_get(WebEngineManager::Get().GetWindow()));
- context = ewk_view_context_get(mWebView);
- }
- else
- {
- context = ewk_context_default_get();
- mWebView = ewk_view_add(ecore_evas_get(WebEngineManager::Get().GetWindow()));
- }
- WebEngineManager::Get().SetContext(context);
+ Ecore_Wl2_Window* win = AnyCast<Ecore_Wl2_Window*>(Adaptor::Get().GetNativeWindowHandle());
+ Ewk_Context* context = ewk_context_default_get();
ewk_context_max_refresh_rate_set(context, 60);
+ mWebView = ewk_view_add(ecore_evas_get(WebEngineManager::Get().GetWindow()));
ewk_view_offscreen_rendering_enabled_set(mWebView, true);
-
- Ecore_Wl2_Window* win = AnyCast<Ecore_Wl2_Window*>(Adaptor::Get().GetNativeWindowHandle());
ewk_view_ime_window_set(mWebView, win);
Ewk_Settings* settings = ewk_view_settings_get(mWebView);
static Eina_Bool OnGeolocationPermission(Evas_Object*, Ewk_Geolocation_Permission_Request* request, void* data);
void UpdateImage(tbm_surface_h buffer);
- void InitWebView(bool incognito);
+ void InitWebView();
bool FeedMouseEvent(const TouchEvent& touch);
bool FeedTouchEvent(const TouchEvent& touch);
#include <dali/devel-api/adaptor-framework/lifecycle-controller.h>
#include <dali/integration-api/debug.h>
+#include <ewk_context.h>
+#include <ewk_context_internal.h>
#include <ewk_main.h>
#include <memory>
ewk_init();
mWindow = ecore_evas_new("wayland_egl", 0, 0, 1, 1, 0);
+ Ewk_Context* context = ewk_context_default_get();
+ mWebEngineContext.reset(new TizenWebEngineContext(context));
+
+ Ewk_Cookie_Manager* manager = ewk_context_cookie_manager_get(context);
+ mWebEngineCookieManager.reset(new TizenWebEngineCookieManager(manager));
Dali::LifecycleController::Get().TerminateSignal().Connect(mSlotDelegate, &WebEngineManager::OnTerminated);
DALI_LOG_RELEASE_INFO("#WebEngineManager is created fully.\n");
return mWindow;
}
-void WebEngineManager::SetContext(Ewk_Context* context)
-{
- mWebEngineContext.reset(new TizenWebEngineContext(context));
-
- Ewk_Cookie_Manager* manager = ewk_context_cookie_manager_get(context);
- mWebEngineCookieManager.reset(new TizenWebEngineCookieManager(manager));
-}
-
Dali::WebEngineContext* WebEngineManager::GetContext()
{
return mWebEngineContext.get();
#define DALI_PLUGIN_TIZEN_WEB_ENGINE_MANAGER_H
/*
- * Copyright (c) 2023 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2022 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.
#include <dali/devel-api/adaptor-framework/web-engine/web-engine-plugin.h>
#include <dali/public-api/signals/slot-delegate.h>
-#include <ewk_context.h>
-
#include <map>
#include <memory>
Ecore_Evas* GetWindow();
- void SetContext(Ewk_Context* context);
-
Dali::WebEngineContext* GetContext();
Dali::WebEngineCookieManager* GetCookieManager();