This commit resolves compiler errors to enable EFL port.
Change-Id: I52dad48542d849560d6a1b702fc2daf2603c1b52
Signed-off-by: Chandan Padhi <c.padhi@samsung.com>
return;
}
- scoped_refptr<ui::ContextProviderCommandBuffer> worker_context_provider =
+ scoped_refptr<ws::ContextProviderCommandBuffer> worker_context_provider =
SharedCompositorWorkerContextProvider();
if (!worker_context_provider) {
// Cause the compositor to wait and try again.
return categorized_worker_pool_.get();
}
-scoped_refptr<ui::ContextProviderCommandBuffer>
+scoped_refptr<ws::ContextProviderCommandBuffer>
RenderThreadImpl::SharedCompositorWorkerContextProvider() {
DCHECK(IsMainThread());
// Try to reuse existing shared worker context provider.
// Returns a worker context provider that will be bound on the compositor
// thread.
- scoped_refptr<ui::ContextProviderCommandBuffer>
+ scoped_refptr<ws::ContextProviderCommandBuffer>
SharedCompositorWorkerContextProvider();
media::GpuVideoAcceleratorFactories* GetGpuFactories();
scoped_refptr<viz::ContextProvider> video_frame_compositor_context_provider_;
- scoped_refptr<ui::ContextProviderCommandBuffer>
+ scoped_refptr<ws::ContextProviderCommandBuffer>
shared_worker_context_provider_;
std::unique_ptr<AudioRendererMixerManager> audio_renderer_mixer_manager_;
void RenderWidget::DidHandleGestureEvent(const WebGestureEvent& event,
bool event_cancelled) {
-#if defined(OS_ANDROID) || defined(USE_AURA) || defined(USE_EFL)
if (event_cancelled) {
// The |owner_delegate_| doesn't need to hear about cancelled events.
return;
}
-#if defined(OS_ANDROID) || defined(USE_AURA)
+#if defined(OS_ANDROID) || defined(USE_AURA) || defined(USE_EFL)
if (event.GetType() == WebInputEvent::kGestureTap) {
ShowVirtualKeyboard();
} else if (event.GetType() == WebInputEvent::kGestureLongPress) {
#endif
#endif
+#ifndef _EVAS_GL_H
#include <GLES2/gl2chromium_autogen.h>
+#endif
#endif // GPU_GLES2_GL2CHROMIUM_H_
NOTIMPLEMENTED();
}
+void GLES2ImplementationEfl::FramebufferParameteri(GLenum /* target */,
+ GLenum /* pname */,
+ GLint /* param */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::BindImageTexture(GLuint /* unit */,
+ GLuint /* texture */,
+ GLint /* level */,
+ GLboolean /* layered */,
+ GLint /* layer */,
+ GLenum /* access */,
+ GLenum /* format */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::DispatchCompute(GLuint /* num_groups_x */,
+ GLuint /* num_groups_y */,
+ GLuint /* num_groups_z */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::MemoryBarrierEXT(GLbitfield /* barriers */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::MemoryBarrierByRegion(GLbitfield /* barriers */) {
+ NOTIMPLEMENTED();
+}
+
void GLES2ImplementationEfl::SwapBuffers(GLuint64 /* swap_id */,
GLbitfield /* flags */) {
NOTIMPLEMENTED();
NOTIMPLEMENTED();
}
-void GLES2ImplementationEfl::CompressedCopyTextureCHROMIUM(
- GLuint /* source_id */,
- GLuint /* dest_id */) {
- NOTIMPLEMENTED();
-}
-
void GLES2ImplementationEfl::DrawArraysInstancedANGLE(GLenum /* mode */,
GLint /* first */,
GLsizei /* count */,
NOTIMPLEMENTED();
}
+void GLES2ImplementationEfl::FramebufferTextureMultiviewLayeredANGLE(
+ GLenum /* target */,
+ GLenum /* attachment */,
+ GLuint /* texture */,
+ GLint /* level */,
+ GLint /* baseViewIndex */,
+ GLsizei /* numViews */) {
+ NOTIMPLEMENTED();
+}
+
+void GLES2ImplementationEfl::MaxShaderCompilerThreadsKHR(GLuint /* count */) {
+ NOTIMPLEMENTED();
+}
+
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_EFL_AUTOGEN_H_
void DeleteVertexArraysOES(GLsizei n, const GLuint* arrays) override;
GLboolean IsVertexArrayOES(GLuint array) override;
void BindVertexArrayOES(GLuint array) override;
+void FramebufferParameteri(GLenum target, GLenum pname, GLint param) override;
+void BindImageTexture(GLuint unit,
+ GLuint texture,
+ GLint level,
+ GLboolean layered,
+ GLint layer,
+ GLenum access,
+ GLenum format) override;
+void DispatchCompute(GLuint num_groups_x,
+ GLuint num_groups_y,
+ GLuint num_groups_z) override;
+void MemoryBarrierEXT(GLbitfield barriers) override;
+void MemoryBarrierByRegion(GLbitfield barriers) override;
void SwapBuffers(GLuint64 swap_id, GLbitfield flags) override;
GLuint GetMaxValueInBufferCHROMIUM(GLuint buffer_id,
GLsizei count,
GLboolean unpack_flip_y,
GLboolean unpack_premultiply_alpha,
GLboolean unpack_unmultiply_alpha) override;
-void CompressedCopyTextureCHROMIUM(GLuint source_id, GLuint dest_id) override;
void DrawArraysInstancedANGLE(GLenum mode,
GLint first,
GLsizei count,
void WaitGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void DestroyGpuFenceCHROMIUM(GLuint gpu_fence_id) override;
void InvalidateReadbackBufferShadowDataCHROMIUM(GLuint buffer_id) override;
+void FramebufferTextureMultiviewLayeredANGLE(GLenum target,
+ GLenum attachment,
+ GLuint texture,
+ GLint level,
+ GLint baseViewIndex,
+ GLsizei numViews) override;
+void MaxShaderCompilerThreadsKHR(GLuint count) override;
#endif // GPU_COMMAND_BUFFER_CLIENT_GLES2_IMPLEMENTATION_EFL_HEADER_AUTOGEN_H_
extern "C" typedef struct _GLColorSpace* GLColorSpace;
extern "C" typedef struct _ClientGpuFence* ClientGpuFence;
-// For desktop build using efl-1.9.x ~ efl-1.11.x
-// GLsync, GL*64, EvasGL*64 are not defined by Evas_GL.h
-#if defined(OS_TIZEN)
-typedef khronos_int64_t GLint64;
-typedef khronos_uint64_t GLuint64;
-#else
-typedef signed long GLint64;
-typedef unsigned long GLuint64;
-#endif
-
namespace gpu {
namespace gles2 {
#ifndef GL_EXT_EGL_image_storage
#define GL_EXT_EGL_image_storage 1
+typedef void* GLeglImageOES;
typedef void(GL_APIENTRYP PFNGLEGLIMAGETARGETTEXSTORAGEEXTPROC)(
GLenum target,
GLeglImageOES image,
#include <stdint.h>
typedef int32_t khronos_int32_t;
typedef uint32_t khronos_uint32_t;
+
+#ifndef _EVAS_GL_H
typedef int64_t khronos_int64_t;
typedef uint64_t khronos_uint64_t;
+#endif
+
#define KHRONOS_SUPPORT_INT64 1
#define KHRONOS_SUPPORT_FLOAT 1
return nullptr;
}
+gpu::SharedImageInterface* EvasGLContextProvider::SharedImageInterface() {
+ return nullptr;
+}
+
viz::ContextCacheController* EvasGLContextProvider::CacheController() {
return cache_controller_.get();
}
gpu::gles2::GLES2Interface* ContextGL() override;
gpu::ContextSupport* ContextSupport() override;
class GrContext* GrContext() override;
+ gpu::SharedImageInterface* SharedImageInterface() override;
viz::ContextCacheController* CacheController() override;
base::Lock* GetLock() override;
const gpu::Capabilities& ContextCapabilities() const override;
child_id_ = resource_provider_->CreateChild(
base::Bind(&EvasGLDelegatedFrameHost::UnrefResources,
- weak_ptr_factory_.GetWeakPtr()));
+ weak_ptr_factory_.GetWeakPtr()),
+ true);
renderer_ = std::make_unique<viz::GLRenderer>(
&settings_, output_surface_.get(), resource_provider_.get(), nullptr);
return 0;
}
+#if BUILDFLAG(ENABLE_VULKAN)
+gpu::VulkanSurface* EvasGLOutputSurface::GetVulkanSurface() {
+ NOTIMPLEMENTED();
+ return nullptr;
+}
+#endif
+
} // namespace content
gfx::BufferFormat GetOverlayBufferFormat() const override;
uint32_t GetFramebufferCopyTextureFormat() override;
unsigned UpdateGpuFence() override;
+#if BUILDFLAG(ENABLE_VULKAN)
+ gpu::VulkanSurface* GetVulkanSurface() override;
+#endif
};
} // namespace content
#include "content/browser/renderer_host/web_event_factory_efl.h"
#include "content/common/cursors/webcursor_efl.h"
#include "content/common/input_messages.h"
+#include "content/common/text_input_state.h"
#include "content/common/view_messages.h"
+#include "content/common/widget_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/context_factory.h"
#include "content/public/browser/render_process_host.h"
device_scale_factor_(1.0f),
magnifier_(false),
is_loading_(false),
- gesture_recognizer_(ui::GestureRecognizer::Create()),
+ gesture_recognizer_(std::make_unique<ui::GestureRecognizerImpl>()),
current_orientation_(0),
evas_gl_(NULL),
evas_gl_api_(NULL),
// This is a hack. See WebContentsView::SizeContents
int width = std::min(size.width(), EFL_MAX_WIDTH);
int height = std::min(size.height(), EFL_MAX_HEIGHT);
+#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
if (popup_type_ != blink::kWebPopupTypeNone) {
// We're a popup, honor the size request.
Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_);
ecore_evas_resize(ee, width, height);
}
-
+#endif
// Update the size of the RWH.
// if (requested_size_.width() != width ||
// requested_size_.height() != height) {
}
void RenderWidgetHostViewEfl::SelectionBoundsChanged(
- const ViewHostMsg_SelectionBounds_Params& params) {
- ViewHostMsg_SelectionBounds_Params guest_params(params);
+ const WidgetHostMsg_SelectionBounds_Params& params) {
+ WidgetHostMsg_SelectionBounds_Params guest_params(params);
guest_params.anchor_rect =
ConvertRectToPixel(device_scale_factor_, params.anchor_rect);
guest_params.focus_rect =
frame.metadata.selection.is_editable);
GetSelectionController()->SetSelectionEmpty(
frame.metadata.selection.is_empty_text_form_control);
-#endif
GetSelectionController()->OnSelectionChanged(frame.metadata.selection.start,
frame.metadata.selection.end);
+#endif
}
SwapBrowserFrame(local_surface_id, std::move(frame));
void RenderWidgetHostViewEfl::ClearCompositorFrame() {}
+void RenderWidgetHostViewEfl::ResetFallbackToFirstNavigationSurface() {}
+
void RenderWidgetHostViewEfl::ScrollFocusedEditableNode() {
// If long-pressing, do not perform zoom to focused element.
if (GetSelectionController() && !GetSelectionController()->GetLongPressed()) {
typedef EvasGLuint64 GLuint64;
#else
typedef struct __GLsync* GLsync;
-typedef signed long GLint64;
-typedef unsigned long GLuint64;
#endif
-struct TextInputState;
-
namespace ui {
class GestureEvent;
class TouchEvent;
class RenderWidgetHostView;
class WebContents;
class ScreenshotCapturedCallback;
+struct TextInputState;
// RenderWidgetHostView class hierarchy described in render_widget_host_view.h.
class CONTENT_EXPORT RenderWidgetHostViewEfl
size_t,
const gfx::Range&) override;
void SelectionBoundsChanged(
- const ViewHostMsg_SelectionBounds_Params&) override;
+ const WidgetHostMsg_SelectionBounds_Params&) override;
void SetWantsAnimateOnlyBeginFrames() override;
void SetNeedsBeginFrames(bool needs_begin_frames) override;
void DidOverscroll(const ui::DidOverscrollParams& params) override;
void DidStopFlinging() override;
void ShowDisambiguationPopup(const gfx::Rect& rect_pixels,
- const SkBitmap& zoomed_bitmap) override;
+ const SkBitmap& zoomed_bitmap);
void DisambiguationPopupDismissed();
void HandleDisambiguationPopupMouseDownEvent(Evas_Event_Mouse_Down*);
void HandleDisambiguationPopupMouseUpEvent(Evas_Event_Mouse_Up*);
viz::CompositorFrame frame,
base::Optional<viz::HitTestRegionList> hit_test_region_list) override;
void ClearCompositorFrame() override;
+ void ResetFallbackToFirstNavigationSurface() override;
// ui::GestureEventHelper implementation.
bool CanDispatchToConsumer(ui::GestureConsumer* consumer) override;
int32_t route_id,
int32_t main_frame_route_id) {
if (route_id != MSG_ROUTING_NONE) {
+#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
RenderViewHost* rvh = RenderViewHost::FromID(render_process_id, route_id);
// If the embedder didn't create a WebContents for this route, we need to
// delete the RenderView that had already been created.
if (rvh)
rvh->Send(new ViewMsg_Close(route_id));
+#endif
}
if (ResourceDispatcherHostImpl::Get()) {
return view;
}
-RenderWidgetHostViewBase* WebContentsViewEfl::CreateViewForPopupWidget(
+RenderWidgetHostViewBase* WebContentsViewEfl::CreateViewForChildWidget(
RenderWidgetHost* render_widget_host) {
return new RenderWidgetHostViewEfl(render_widget_host, *web_contents_);
}
void CreateView(const gfx::Size&, gfx::NativeView context) override;
RenderWidgetHostViewBase* CreateViewForWidget(
RenderWidgetHost* render_widget_host, bool is_guest_view_hack) override;
- RenderWidgetHostViewBase* CreateViewForPopupWidget(
+ RenderWidgetHostViewBase* CreateViewForChildWidget(
RenderWidgetHost* render_widget_host) override;
void SetPageTitle(const base::string16& title) override;
void RenderViewCreated(RenderViewHost* host) override;
return GestureRecognizerImpl::GetGestureProviderForConsumer(c);
}
-// GestureRecognizer, static
-GestureRecognizer* GestureRecognizer::Create() {
- return new GestureRecognizerImplEfl();
-}
-
} // namespace ui
#include "ui/gl/gl_export.h"
#include "ui/gl/gl_implementation.h"
-#include "ui/gl/gl_implementation_osmesa.h"
#include "gpu/command_buffer/service/texture_manager.h"
using namespace gl;
#include "ui/ozone/ozone_platform_efl.h"
#include "ui/display/types/native_display_delegate.h"
+#include "ui/events/system_input_injector.h"
#include "ui/ozone/public/gpu_platform_support_host.h"
#include "ui/ozone/public/ozone_platform.h"
#include "ui/ozone/surface_factory_efl.h"
"eweb_view_callbacks.h",
"ewk_global_data.cc",
"ewk_global_data.h",
- "file_chooser_controller_efl.cc",
- "file_chooser_controller_efl.h",
"geolocation_permission_popup.cc",
"geolocation_permission_popup.h",
"http_user_agent_settings_efl.cc",
# FIXME: ewk_bringup definition should be removed.
if (!ewk_bringup) {
sources += [
+ "file_chooser_controller_efl.cc",
+ "file_chooser_controller_efl.h",
"renderer/plugins/plugin_placeholder_efl.cc",
"renderer/plugins/plugin_placeholder_efl.h",
]
#include "base/bind.h"
#include "base/logging.h"
+#include "base/task/post_task.h"
#include "base/threading/thread_task_runner_handle.h"
#include "content/browser/appcache/appcache_service_impl.h"
#include "content/common/render_messages_efl.h"
#include "content/public/browser/browser_context.h"
+#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/dom_storage_context.h"
#include "content/public/browser/local_storage_usage_info.h"
waiting_for_clear_cache_ = true;
DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::UI));
- content::BrowserThread::PostTask(
- content::BrowserThread::IO, FROM_HERE,
- base::Bind(&BrowsingDataRemoverEfl::ClearNetworkCacheOnIOThread,
- base::Unretained(this)));
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
+ base::Bind(&BrowsingDataRemoverEfl::ClearNetworkCacheOnIOThread,
+ base::Unretained(this)));
}
void BrowsingDataRemoverEfl::ClearNetworkCacheOnIOThread() {
next_cache_state_ = STATE_NONE;
// Notify the UI thread that we are done.
- content::BrowserThread::PostTask(
- content::BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(&BrowsingDataRemoverEfl::ClearedCache,
base::Unretained(this)));
return;
quota_manager_ = content::BrowserContext::GetStoragePartition(browser_context_, NULL)->GetQuotaManager();
}
waiting_for_clear_quota_managed_data_ = true;
- content::BrowserThread::PostTask(
- content::BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&BrowsingDataRemoverEfl::ClearQuotaManagedDataOnIOThread,
base::Unretained(this)));
}
if (BrowserThread::CurrentlyOn(BrowserThread::UI)) {
// TODO: Using base::Unretained is not thread safe
// It may happen that on IO thread this ptr will be already deleted
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&BrowsingDataRemoverEfl::DeleteAppCachesForOrigin,
base::Unretained(this), origin));
return;
quota_managed_origins_to_delete_count_ != 0)
return;
- content::BrowserThread::PostTask(
- content::BrowserThread::UI, FROM_HERE,
- base::Bind(&BrowsingDataRemoverEfl::OnQuotaManagedDataDeleted,
- base::Unretained(this)));
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
+ base::Bind(&BrowsingDataRemoverEfl::OnQuotaManagedDataDeleted,
+ base::Unretained(this)));
}
void BrowsingDataRemoverEfl::OnQuotaManagedDataDeleted() {
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include "base/files/file_util.h"
#include "favicon_database.h"
-#include "favicon_database_p.h"
-#include "favicon_commands.h"
-#include <iostream>
#include <cstdio>
+#include <iostream>
+#include "base/files/file_util.h"
+#include "base/task/post_task.h"
+#include "content/public/browser/browser_task_traits.h"
+#include "favicon_commands.h"
+#include "favicon_database_p.h"
#define CHECK_OPEN if (!Open()) {\
return;\
content::BrowserThread::DB);
#else
scoped_refptr<base::SingleThreadTaskRunner> ptr =
- content::BrowserThread::GetTaskRunnerForThread(
- content::BrowserThread::UI);
+ base::CreateSingleThreadTaskRunnerWithTraits(
+ {content::BrowserThread::UI});
#endif
ptr->PostTask(FROM_HERE, base::Bind(&FaviconDatabasePrivate::performSync, d->weakPtrFactory.GetWeakPtr()));
}
// found in the LICENSE file.
#include "favicon_database_p.h"
-#include "favicon_commands.h"
#include <iostream>
+#include "base/task/post_task.h"
+#include "content/public/browser/browser_task_traits.h"
+#include "favicon_commands.h"
const char * const FaviconDatabasePrivate::pageUrlToFaviconUrlTable = "url_to_favicon_url";
const char * const FaviconDatabasePrivate::faviconUrlToBitmapTable = "favicon_url_to_bitmap";
return content::BrowserThread::GetTaskRunnerForThread(
content::BrowserThread::DB);
#else
- return content::BrowserThread::GetTaskRunnerForThread(
- content::BrowserThread::UI);
+ return base::CreateSingleThreadTaskRunnerWithTraits(
+ {content::BrowserThread::UI});
#endif
}
#include "browser/geolocation/geolocation_permission_context_efl.h"
#include "common/web_contents_utils.h"
+#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "eweb_view.h"
#include "eweb_view_callbacks.h"
int render_frame_id,
const GURL& requesting_frame,
base::Callback<void(PermissionStatus)> callback) const {
- content::BrowserThread::PostTask(
- content::BrowserThread::UI,
- FROM_HERE,
- base::Bind(
- &GeolocationPermissionContextEfl::RequestPermissionOnUIThread,
- weak_ptr_factory_.GetWeakPtr(),
- render_process_id,
- render_frame_id,
- requesting_frame,
- callback));
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
+ base::Bind(&GeolocationPermissionContextEfl::RequestPermissionOnUIThread,
+ weak_ptr_factory_.GetWeakPtr(), render_process_id,
+ render_frame_id, requesting_frame, callback));
}
void GeolocationPermissionContextEfl::CancelPermissionRequest(
DCHECK(render_process_id_ != -1);
DCHECK(render_frame_id_ != -1);
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(&LoginDelegateEfl::HandleHttpAuthRequestOnUIThread, this));
}
void LoginDelegateEfl::Proceed(const char* user, const char* password) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
- base::Bind(&LoginDelegateEfl::ProceedOnIOThread,
- this, base::UTF8ToUTF16(user), base::UTF8ToUTF16(password)));
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
+ base::Bind(&LoginDelegateEfl::ProceedOnIOThread, this,
+ base::UTF8ToUTF16(user), base::UTF8ToUTF16(password)));
}
void LoginDelegateEfl::Cancel() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&LoginDelegateEfl::CancelOnIOThread, this));
}
#include "base/strings/utf_string_conversions.h"
#include "common/web_contents_utils.h"
#include "content/public/browser/browser_thread.h"
-#include "content/public/common/notification_resources.h"
-#include "content/public/common/platform_notification_data.h"
#include "eweb_view.h"
#include "private/ewk_notification_private.h"
BrowserContext* browser_context,
const std::string& notification_id,
const GURL& origin,
- const PlatformNotificationData& notification_data,
- const NotificationResources& notification_resources) {
+ const blink::PlatformNotificationData& notification_data,
+ const blink::NotificationResources& notification_resources) {
BrowserContextEfl* browser_context_efl =
static_cast<BrowserContextEfl*>(browser_context);
CHECK(browser_context_efl);
const std::string& notification_id,
const GURL& service_worker_origin,
const GURL& origin,
- const PlatformNotificationData& notification_data,
- const NotificationResources& notification_resources) {
+ const blink::PlatformNotificationData& notification_data,
+ const blink::NotificationResources& notification_resources) {
NOTIMPLEMENTED();
}
BrowserContext* browser_context,
const std::string& notification_id,
const GURL& origin,
- const PlatformNotificationData& notification_data,
- const NotificationResources& notification_resources) override;
+ const blink::PlatformNotificationData& notification_data,
+ const blink::NotificationResources& notification_resources) override;
// Displays the persistent notification described in |notification_data| to
// the user. This method must be called on the UI thread.
const std::string& notification_id,
const GURL& service_worker_origin,
const GURL& origin,
- const PlatformNotificationData& notification_data,
- const NotificationResources& notification_resources) override;
+ const blink::PlatformNotificationData& notification_data,
+ const blink::NotificationResources& notification_resources) override;
// Closes the persistent notification identified by
// |persistent_notification_id|. This method must be called on the UI thread.
}
int PermissionManagerEfl::SubscribePermissionStatusChange(
- PermissionType permission,
- const GURL& requesting_origin,
- const GURL& embedding_origin,
- const base::Callback<void(PermissionStatus)>& callback) {
-return -1;
+ PermissionType permission,
+ content::RenderFrameHost* render_frame_host,
+ const GURL& requesting_origin,
+ const base::Callback<void(PermissionStatus)>& callback) {
+ return -1;
}
void PermissionManagerEfl::UnsubscribePermissionStatusChange(
// Returns the subscription_id to be used to unsubscribe.
int SubscribePermissionStatusChange(
PermissionType permission,
+ content::RenderFrameHost* render_frame_host,
const GURL& requesting_origin,
- const GURL& embedding_origin,
const base::Callback<void(blink::mojom::PermissionStatus)>& callback)
override;
// accept them without EWK-specific logic. For example notification icon is internal
// chromium download
if (render_process_id_ > 0 && (render_frame_id_ > 0 || render_view_id_ > 0)) {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&PolicyResponseDelegateEfl::HandlePolicyResponseOnUIThread, this));
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
+ base::Bind(&PolicyResponseDelegateEfl::HandlePolicyResponseOnUIThread,
+ this));
} else {
// Async call required!
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&PolicyResponseDelegateEfl::UseResponseOnIOThread, this));
}
}
void PolicyResponseDelegateEfl::UseResponse() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&PolicyResponseDelegateEfl::UseResponseOnIOThread, this));
}
void PolicyResponseDelegateEfl::IgnoreResponse() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&PolicyResponseDelegateEfl::IgnoreResponseOnIOThread, this));
}
int render_process_id,
const QuotaPermissionContext::PermissionCallback& callback) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(&QuotaPermissionContextEfl::RequestQuotaPermission, this,
params, render_process_id, callback));
return;
DCHECK_EQ(false, callback.is_null());
if (!content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)) {
- content::BrowserThread::PostTask(
- content::BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&QuotaPermissionContextEfl::DispatchCallback, callback,
response));
return;
#include "resource_dispatcher_host_delegate_efl.h"
+#include "base/task/post_task.h"
#include "browser/login_delegate_efl.h"
#include "browser/mime_override_manager_efl.h"
#include "browser_context_efl.h"
#include "common/web_contents_utils.h"
+#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/resource_request_info.h"
#include "content/public/browser/web_contents.h"
// Since called by IO thread callback trigger needs to
// be posted to UI thread so that IO thread is unblocked
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(TriggerNewDownloadStartCallbackOnUIThread, render_process_id,
render_view_id, request->url(), user_agent,
content_disposition, mime_type, content_length));
#include "browser/permission_manager_efl.h"
#include "browser/webdata/web_data_service_factory.h"
#include "components/autofill/core/browser/personal_data_manager.h"
-#include "components/autofill/core/common/autofill_pref_names.h"
#include "components/password_manager/core/common/password_manager_pref_names.h"
#include "components/prefs/in_memory_pref_store.h"
#include "components/prefs/pref_registry_simple.h"
#include "components/user_prefs/user_prefs.h"
#include "components/visitedlink/browser/visitedlink_master.h"
#include "content/common/paths_efl.h"
+#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"
#include "eweb_context.h"
#include "network_delegate_efl.h"
-using namespace autofill::prefs;
+using namespace prefs;
using namespace password_manager::prefs;
using std::pair;
PrefRegistrySimple* pref_registry = new PrefRegistrySimple();
+#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
pref_registry->RegisterBooleanPref(kAutofillEnabled, true);
pref_registry->RegisterBooleanPref(kAutofillWalletImportEnabled, true);
+#endif
pref_registry->RegisterBooleanPref(kCredentialsEnableService, true);
PrefServiceFactory pref_service_factory;
return path;
}
+base::FilePath BrowserContextEfl::GetCachePath() const {
+ NOTIMPLEMENTED();
+ return base::FilePath();
+}
+
BackgroundSyncController* BrowserContextEfl::GetBackgroundSyncController() {
return nullptr;
}
// NetWorkDelegate must be created on IO thread
base::WaitableEvent done(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(CreateNetworkDelegateOnIOThread, this, &done));
done.Wait();
}
request_context_getter_ = new URLRequestContextGetterEfl(
std::move(network_delegate_for_getter_), false, cache_base_path,
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
+ base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}),
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
BrowserThread::GetTaskRunnerForThread(BrowserThread::FILE),
#else
- BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+ base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}),
#endif
protocol_handlers, std::move(request_interceptors), NULL);
web_context_->cookieManager()->SetRequestContextGetter(
}
PushMessagingService* GetPushMessagingService() override { return 0; }
base::FilePath GetPath() const override;
+ base::FilePath GetCachePath() const override;
BackgroundSyncController* GetBackgroundSyncController() override;
net::URLRequestContextGetter* CreateRequestContextForStoragePartition(
const base::FilePath& partition_path,
#include "web_contents_view_delegate_ewk.h"
#include "devtools_manager_delegate_efl.h"
#include "browser/editor_client_observer.h"
-//#include "browser/geolocation/access_token_store_efl.h"
#include "browser/quota_permission_context_efl.h"
#include "browser/render_message_filter_efl.h"
#include "browser/resource_dispatcher_host_delegate_efl.h"
&pem_certificate))
return;
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(&ContentBrowserClientEfl::SetCertificatePemOnUIThread,
render_process_id, render_view_id, pem_certificate));
}
auto dl_params = std::make_unique<download::DownloadUrlParameters>(
url, frame_host->GetProcess()->GetID(),
frame_host->GetRenderViewHost()->GetRoutingID(),
- frame_host->GetRoutingID(), storage_partition->GetURLRequestContext(),
- NO_TRAFFIC_ANNOTATION_YET);
+ frame_host->GetRoutingID(), NO_TRAFFIC_ANNOTATION_YET);
dl_params->set_post_id(-1);
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
dl_params->set_referrer(
#include "base/logging.h"
#include "base/stl_util.h"
#include "base/synchronization/waitable_event.h"
-#include "content/public/browser/browser_thread.h"
#include "content/browser/storage_partition_impl.h"
+#include "content/public/browser/browser_task_traits.h"
+#include "content/public/browser/browser_thread.h"
#include "eweb_context.h"
#include "net/base/net_errors.h"
#include "net/base/static_cookie_policy.h"
#include "net/cookies/canonical_cookie.h"
-#include "net/cookies/cookie_util.h"
-#include "net/cookies/parsed_cookie.h"
#include "net/cookies/cookie_monster.h"
#include "net/cookies/cookie_options.h"
+#include "net/cookies/cookie_util.h"
+#include "net/cookies/parsed_cookie.h"
#include "net/url_request/url_request_context.h"
#include "net/url_request/url_request_context_getter.h"
#include "url/gurl.h"
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
std::unique_ptr<net::CookieStore> cookie_store = GetCookieStore();
if (cookie_store.get()) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(DeleteCookiesOnIOThread,
base::Passed(std::move(cookie_store)), url, cookie_name));
}
scoped_refptr<content::URLRequestContextGetterEfl> context_getter = GetContextGetter();
if (context_getter.get()) {
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
- base::Bind(SetStoragePathOnIOThread,
- context_getter,
- path,
- persist_session_cookies,
- file_storage_type));
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
+ base::Bind(SetStoragePathOnIOThread, context_getter, path,
+ persist_session_cookies, file_storage_type));
}
}
void CookieManager::GetAcceptPolicyAsync(Ewk_Cookie_Manager_Policy_Async_Get_Cb callback, void *data) {
AutoLock lock(lock_);
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&TriggerHostPolicyGetCallbackAsyncOnUIThread,
- cookie_policy_,
- callback,
- data));
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
+ base::Bind(&TriggerHostPolicyGetCallbackAsyncOnUIThread, cookie_policy_,
+ callback, data));
}
void CookieManager::GetHostNamesWithCookiesAsync(AsyncHostnamesGetCb callback, void *data) {
host_callback_queue_.push(new EwkGetHostCallback(callback, data));
std::unique_ptr<net::CookieStore> cookie_store = GetCookieStore();
if (cookie_store.get()) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&CookieManager::FetchCookiesOnIOThread, GetSharedThis(),
base::Passed(std::move(cookie_store))));
}
void CookieManager::OnFetchComplete(const net::CookieList& cookies) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&CookieManager::OnFetchComplete,
- GetSharedThis(),
- cookies));
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
+ base::Bind(&CookieManager::OnFetchComplete, GetSharedThis(), cookies));
return;
}
if (!host_callback_queue_.empty()) {
std::string cookie_value;
base::WaitableEvent completion(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
- base::Bind(GetCookieValueOnIOThread,
- base::Passed(std::move(cookie_store)),
- GURL(url), &cookie_value, &completion));
+ base::PostTaskWithTraits(FROM_HERE, {BrowserThread::IO},
+ base::Bind(GetCookieValueOnIOThread,
+ base::Passed(std::move(cookie_store)),
+ GURL(url), &cookie_value, &completion));
// allow wait temporarily.
completion.Wait();
return cookie_value;
DevToolsManagerDelegateEfl::~DevToolsManagerDelegateEfl() {
}
-bool DevToolsManagerDelegateEfl::HandleCommand(
- content::DevToolsAgentHost* agent_host,
- DevToolsAgentHostClient* client,
- base::DictionaryValue* command_dict) {
- return false;
-}
-
} // namespace content
// content::DevToolsManagerDelegate implementation.
virtual void Inspect(content::DevToolsAgentHost* agent_host) override{};
- virtual bool HandleCommand(DevToolsAgentHost* agent_host,
+ virtual void HandleCommand(DevToolsAgentHost* agent_host,
DevToolsAgentHostClient* client,
- base::DictionaryValue* command) override;
+ std::unique_ptr<base::DictionaryValue> command,
+ const std::string& message,
+ NotHandledCallback callback) override{};
private:
DISALLOW_COPY_AND_ASSIGN(DevToolsManagerDelegateEfl);
#endif
#include "base/synchronization/waitable_event.h"
-#include "components/autofill/content/browser/content_autofill_driver.h"
#include "browser/favicon/favicon_database.h"
#include "browser/webdata/web_data_service_factory.h"
+#include "components/autofill/content/browser/content_autofill_driver.h"
#include "content/public/browser/appcache_service.h"
#include "content/public/browser/browser_context.h"
+#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/dom_storage_context.h"
#include "content/public/browser/local_storage_usage_info.h"
// We still trigger callback.
usage = 0;
}
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(callback, usage, user_data));
+ base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
+ base::Bind(callback, usage, user_data));
}
void OnGetWebDBOrigins(Ewk_Web_Database_Origins_Get_Callback callback,
_Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
origins = eina_list_append(origins, sec_origin);
}
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(callback, origins, user_data));
+ base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
+ base::Bind(callback, origins, user_data));
}
void GetWebDBOriginsOnDBThread(Ewk_Web_Database_Origins_Get_Callback callback,
_Ewk_Security_Origin* sec_origin = new _Ewk_Security_Origin(*iter);
origins = eina_list_append(origins, sec_origin);
}
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(callback, origins, user_data));
+ base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
+ base::Bind(callback, origins, user_data));
}
void GetFileSystemOriginsOnFILEThread(
config.proxy_rules().ParseFromString(proxy_uri_);
base::WaitableEvent done(base::WaitableEvent::ResetPolicy::AUTOMATIC,
base::WaitableEvent::InitialState::NOT_SIGNALED);
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&SetProxyConfigCallbackOnIOThread, &done,
base::RetainedRef(BrowserContext::GetDefaultStoragePartition(
browser_context())
void EWebContext::DeleteAllApplicationCache() {
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- BrowserThread::PostTask(BrowserThread::IO, FROM_HERE,
- base::Bind(&EWebContext::DeleteAllApplicationCache,
- base::Unretained(this)));
+ base::PostTaskWithTraits(FROM_HERE, {BrowserThread::IO},
+ base::Bind(&EWebContext::DeleteAllApplicationCache,
+ base::Unretained(this)));
return;
}
BrowsingDataRemoverEfl* remover =
const GURL& url,
Ewk_Web_Application_Cache_Usage_For_Origin_Get_Callback callback,
void* user_data) {
+#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
content::StoragePartition* partition =
BrowserContext::GetStoragePartition(browser_context_.get(), NULL);
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(
&storage::QuotaManager::GetUsageAndQuota,
partition->GetQuotaManager(), url,
blink::mojom::StorageType::kTemporary,
base::Bind(&OnTemporaryUsageAndQuotaObtained, callback, user_data)));
+#endif
}
void EWebContext::WebStorageDelete() {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(&EWebContext::WebStorageDelete, base::Unretained(this)));
return;
}
void EWebContext::WebStorageDeleteForOrigin(const GURL& origin) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&EWebContext::WebStorageDeleteForOrigin,
- base::Unretained(this), origin));
+ base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
+ base::Bind(&EWebContext::WebStorageDeleteForOrigin,
+ base::Unretained(this), origin));
return;
}
content::StoragePartition* partition =
void EWebContext::IndexedDBDelete() {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(&EWebContext::IndexedDBDelete, base::Unretained(this)));
return;
}
void EWebContext::WebDBDelete(const GURL& host) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(&EWebContext::WebDBDelete, base::Unretained(this), host));
return;
}
void EWebContext::FileSystemDelete(const GURL& host) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&EWebContext::FileSystemDelete,
- base::Unretained(this), host));
+ base::PostTaskWithTraits(FROM_HERE, {BrowserThread::UI},
+ base::Bind(&EWebContext::FileSystemDelete,
+ base::Unretained(this), host));
return;
}
BrowsingDataRemoverEfl* remover =
void EWebContext::ClearCandidateData() {
#if defined(TIZEN_AUTOFILL_SUPPORT)
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(&EWebContext::ClearCandidateData, base::Unretained(this)));
return;
}
#include "content/common/frame_messages.h"
#include "content/common/view_messages.h"
#include "content/public/browser/browser_message_filter.h"
+#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/host_zoom_map.h"
#include "content/public/browser/navigation_controller.h"
#include "services/network/public/cpp/resource_request_body.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/blink/public/platform/web_string.h"
-#include "third_party/blink/public/web/web_find_options.h"
#include "tizen/system_info.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/display/screen.h"
previous_text_ = find_text;
}
+#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
blink::WebFindOptions web_find_options;
web_find_options.forward = !(find_options & EWK_FIND_OPTIONS_BACKWARDS);
web_find_options.match_case =
web_find_options.find_next = find_next;
web_contents_->Find(current_find_request_id_, find_text, web_find_options);
+#endif
}
void EWebView::SetScale(double scale_factor, int x, int y) {
}
bool EWebView::GetLinkMagnifierEnabled() const {
+#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
return web_contents_->GetMutableRendererPrefs()
->tap_multiple_targets_strategy ==
TAP_MULTIPLE_TARGETS_STRATEGY_POPUP;
+#else
+ return false;
+#endif
}
void EWebView::SetLinkMagnifierEnabled(bool enabled) {
+#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
web_contents_->GetMutableRendererPrefs()->tap_multiple_targets_strategy =
enabled ? TAP_MULTIPLE_TARGETS_STRATEGY_POPUP
: TAP_MULTIPLE_TARGETS_STRATEGY_NONE;
+#endif
web_contents_->GetRenderViewHost()->SyncRendererPrefs();
}
}
void EWebView::ShowFileChooser(content::RenderFrameHost* render_frame_host,
- const content::FileChooserParams& params) {
+ const blink::mojom::FileChooserParams& params) {
if (!IsMobileProfile() && !IsWearableProfile())
return;
-#if !defined(EWK_BRINGUP)
+#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
if (params.capture) {
const std::string capture_types[] = {"video/*", "audio/*", "image/*"};
unsigned int capture_types_num =
}
}
}
-#endif
file_chooser_.reset(
new content::FileChooserControllerEfl(render_frame_host, ¶ms));
file_chooser_->Open();
+#endif
}
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
}
void EWebView::HandleRendererProcessCrash() {
- BrowserThread::PostTask(BrowserThread::UI, FROM_HERE,
- base::Bind(&EWebView::InvokeWebProcessCrashedCallback,
- base::Unretained(this)));
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
+ base::Bind(&EWebView::InvokeWebProcessCrashedCallback,
+ base::Unretained(this)));
}
void EWebView::InitializeContent() {
DCHECK(render_view_host);
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
- BrowserThread::PostTask(
- BrowserThread::UI, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::UI},
base::Bind(&EWebView::SendDelayedMessages, base::Unretained(this),
render_view_host));
return;
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_efl_delegate.h"
#include "content/public/common/context_menu_params.h"
-#include "content/public/common/file_chooser_params.h"
#include "content/public/common/input_event_ack_state.h"
#include "content/public/common/menu_item.h"
#include "context_menu_controller_efl.h"
#include "ui/gfx/geometry/point.h"
#include "ui/gfx/geometry/size.h"
#include "web_contents_delegate_efl.h"
-//#include "third_party/blink/public/web/WebViewModeEnums.h"
namespace content {
class RenderFrameHost;
void GetSessionData(const char** data, unsigned* length) const;
bool RestoreFromSessionData(const char* data, unsigned length);
void ShowFileChooser(content::RenderFrameHost* render_frame_host,
- const content::FileChooserParams&);
+ const blink::mojom::FileChooserParams&);
void SetBrowserFont();
void SetCertificatePem(const std::string& certificate);
bool IsDragging() const;
} formNavigation;
formNavigation formNavigation_;
std::unique_ptr<content::ContextMenuControllerEfl> context_menu_;
+#if !defined(EWK_BRINGUP) // FIXME: m71 bringup
std::unique_ptr<content::FileChooserControllerEfl> file_chooser_;
+#endif
std::unique_ptr<content::PopupControllerEfl> popup_controller_;
base::string16 previous_text_;
int current_find_request_id_;
std::unique_ptr<ScrollDetector> scroll_detector_;
#if defined(OS_TIZEN)
- content::FileChooserParams::Mode filechooser_mode_;
+ blink::mojom::FileChooserParams::Mode filechooser_mode_;
#endif
std::map<const _Ewk_Quota_Permission_Request*,
content::QuotaPermissionContext::PermissionCallback>
#define file_chooser_controller_efl_h
#include <Evas.h>
-#include "content/public/common/file_chooser_params.h"
namespace content {
}
FileChooserControllerEfl(RenderFrameHost* render_frame_host,
- const content::FileChooserParams* params)
+ const blink::mojom::FileChooserParams* params)
: render_frame_host_(render_frame_host), params_(params) {
ParseParams();
}
void Open();
- const content::FileChooserParams* GetParams() {
- return params_;
- }
+ const blink::mojom::FileChooserParams* GetParams() { return params_; }
- void SetParams(const content::FileChooserParams* params) {
+ void SetParams(const blink::mojom::FileChooserParams* params) {
params_ = params;
}
void ParseParams();
RenderFrameHost* render_frame_host_;
- const content::FileChooserParams* params_;
+ const blink::mojom::FileChooserParams* params_;
std::string title_;
std::string def_file_name_;
Eina_Bool is_save_file_;
}
bool NetworkDelegateEfl::OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) {
+ const CookieList& cookie_list,
+ bool allowed_from_caller) {
if (!cookie_manager_.get())
return false;
return cookie_manager_->OnCanGetCookies(request, cookie_list);
bool NetworkDelegateEfl::OnCanSetCookie(const URLRequest& request,
const CanonicalCookie& cookie,
- CookieOptions* options) {
+ CookieOptions* options,
+ bool allowed_from_caller) {
if (!cookie_manager_.get())
return false;
return cookie_manager_->OnCanSetCookie(request, std::string(), options);
AuthCredentials* credentials) override;
bool OnCanGetCookies(const URLRequest& request,
- const CookieList& cookie_list) override;
+ const CookieList& cookie_list,
+ bool allowed_from_caller) override;
bool OnCanSetCookie(const URLRequest& request,
const CanonicalCookie& cookie,
- CookieOptions* options) override;
+ CookieOptions* options,
+ bool allowed_from_caller) override;
bool OnCanAccessFile(const URLRequest& request,
const base::FilePath& original_path,
#include "common/render_messages_ewk.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
+#include "printing/metafile_skia.h"
#include "printing/metafile_skia_wrapper.h"
-#include "printing/pdf_metafile_skia.h"
#include "printing/units.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/blink/public/web/web_frame.h"
const PrintPageParams& params,
const gfx::Size& canvas_size,
blink::WebFrame* frame,
- printing::PdfMetafileSkia* metafile) {
+ printing::MetafileSkia* metafile) {
PrintParams result;
double scale_factor = 1.0f;
gfx::Rect canvas_area(canvas_size);
}
namespace printing {
-class PdfMetafileSkia;
+class MetafileSkia;
}
struct PrintPagesParams;
bool PrintPagesToPdf(blink::WebFrame* frame, int page_count,
const gfx::Size& canvas_size);
bool PrintPageInternal(const PrintPageParams& params,
- const gfx::Size& canvas_size, blink::WebFrame* frame, printing::PdfMetafileSkia* metafile);
+ const gfx::Size& canvas_size,
+ blink::WebFrame* frame,
+ printing::MetafileSkia* metafile);
bool RenderPagesForPrint(blink::WebFrame* frame);
std::unique_ptr<PrintPagesParams> print_pages_params_;
#endif
//Changes in PageScaleFactorLimits are applied when layoutUpdated is called
//So using this notification to update minimum and maximum page scale factor values
- virtual void DidUpdateLayout() override;
+ virtual void DidUpdateLayout();
void DidHandleGestureEvent(const blink::WebGestureEvent& event) override;
#include "base/files/file_util.h"
#include "base/memory/ptr_util.h"
#include "base/strings/string_number_conversions.h"
-#include "base/task_scheduler/post_task.h"
-//#include "base/threading/sequenced_worker_pool.h"
+#include "base/task/post_task.h"
#include "components/network_session_configurator/common/network_switches.h"
+#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/cookie_store_factory.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
url_request_context_->set_network_delegate(network_delegate_.get());
storage_.reset(
new net::URLRequestContextStorage(url_request_context_.get()));
- storage_->set_cookie_store(CreateCookieStore(CookieStoreConfig()));
+ storage_->set_cookie_store(
+ CreateCookieStore(CookieStoreConfig(), net_log_));
storage_->set_channel_id_service(base::WrapUnique(
new net::ChannelIDService(new net::DefaultChannelIDStore(NULL))));
storage_->set_http_user_agent_settings(
url::kFileScheme,
base::WrapUnique(new net::WrtFileProtocolHandler(
base::CreateTaskRunnerWithTraits(
- {base::MayBlock(), base::TaskPriority::BACKGROUND,
+ {base::MayBlock(), base::TaskPriority::BEST_EFFORT,
base::TaskShutdownBehavior::SKIP_ON_SHUTDOWN})
.get())));
DCHECK(set_protocol);
scoped_refptr<base::SingleThreadTaskRunner>
URLRequestContextGetterEfl::GetNetworkTaskRunner() const {
- return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO);
+ return base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO});
}
net::HostResolver* URLRequestContextGetterEfl::host_resolver() {
}
if (!BrowserThread::CurrentlyOn(BrowserThread::IO)) {
- BrowserThread::PostTask(
- BrowserThread::IO, FROM_HERE,
+ base::PostTaskWithTraits(
+ FROM_HERE, {BrowserThread::IO},
base::Bind(&URLRequestContextGetterEfl::SetCookieStoragePath, this,
path, persist_session_cookies, file_storage));
return;
if (base::DirectoryExists(path) || base::CreateDirectory(path)) {
const base::FilePath& cookie_path = path.AppendASCII("Cookies");
persistent_store = new net::SQLitePersistentCookieStore(
- cookie_path, BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
+ cookie_path,
+ base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}),
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
BrowserThread::GetTaskRunnerForThread(BrowserThread::DB),
#else
- BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+ base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}),
#endif
persist_session_cookies, NULL);
} else {
// cookie store, if any, will be automatically flushed and closed when no
// longer referenced.
std::unique_ptr<net::CookieMonster> cookie_monster(
- new net::CookieMonster(persistent_store.get(), NULL));
+ new net::CookieMonster(persistent_store.get(), nullptr, nullptr));
if (persistent_store.get() && persist_session_cookies)
cookie_monster->SetPersistSessionCookies(true);
CookieStoreConfig config(
cookie_store_path_.Append(FILE_PATH_LITERAL("Cookies")), false, false,
nullptr);
- cookie_store_ = CreateCookieStore(config);
+ cookie_store_ = CreateCookieStore(config, net_log_);
net::CookieMonster* cookie_monster =
static_cast<net::CookieMonster*>(cookie_store_.get());
cookie_monster->SetPersistSessionCookies(persist_session_cookies);
#define _URL_REQUEST_CONTEXT_GETTER_EFL_H_
#include "base/memory/weak_ptr.h"
+#include "base/task/post_task.h"
#include "content/public/browser/browser_context.h"
+#include "content/public/browser/browser_task_traits.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/content_browser_client.h"
#include "net/base/network_delegate.h"
bool ignore_certificate_errors = false,
const base::FilePath& base_path = base::FilePath(),
const scoped_refptr<base::SingleThreadTaskRunner>& io_task_runner =
- BrowserThread::GetTaskRunnerForThread(BrowserThread::IO),
+ base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}),
const scoped_refptr<base::SingleThreadTaskRunner>& file_task_runner =
- BrowserThread::GetTaskRunnerForThread(BrowserThread::UI),
+ base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}),
ProtocolHandlerMap* protocol_handlers = NULL,
URLRequestInterceptorScopedVector request_interceptors =
URLRequestInterceptorScopedVector(),
#include "eweb_view_callbacks.h"
#include "net/base/load_states.h"
#include "net/http/http_response_headers.h"
-#include "printing/pdf_metafile_skia.h"
+#include "printing/metafile_skia.h"
#include "private/ewk_certificate_private.h"
#include "private/ewk_console_message_private.h"
#include "private/ewk_custom_handlers_private.h"
namespace content {
-void WritePdfDataToFile(printing::PdfMetafileSkia* metafile,
+void WritePdfDataToFile(printing::MetafileSkia* metafile,
const base::FilePath& filename) {
#if !defined(EWK_BRINGUP) // FIXME: m67 bringup
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE));
return;
}
- std::unique_ptr<printing::PdfMetafileSkia> metafile(
- new printing::PdfMetafileSkia());
+ std::unique_ptr<printing::MetafileSkia> metafile(
+ new printing::MetafileSkia());
if (!metafile->InitFromData(shared_buf.memory(), params.data_size)) {
NOTREACHED() << "Invalid metafile header";
return;
return true;
}
-void WebContentsDelegateEfl::RunFileChooser(RenderFrameHost* render_frame_host,
- const FileChooserParams& params) {
+void WebContentsDelegateEfl::RunFileChooser(
+ RenderFrameHost* render_frame_host,
+ std::unique_ptr<FileSelectListener> listener,
+ const blink::mojom::FileChooserParams& params) {
web_view_->ShowFileChooser(render_frame_host, params);
}
int32_t line_no,
const base::string16& source_id) override;
void RunFileChooser(content::RenderFrameHost* render_frame_host,
- const FileChooserParams& params) override;
+ std::unique_ptr<FileSelectListener> listener,
+ const blink::mojom::FileChooserParams& params) override;
ColorChooser* OpenColorChooser(
WebContents* web_contents,
SkColor color,
int GetData(std::string* mime_type,
std::string* charset,
std::string* data,
- const CompletionCallback& callback) const override;
+ CompletionOnceCallback callback) const override;
private:
~WrtURLRequestDataJob() override {}
int WrtURLRequestDataJob::GetData(std::string* mime_type,
std::string* charset,
std::string* data,
- const CompletionCallback& callback) const {
+ CompletionOnceCallback callback) const {
if (!data_url_.is_valid())
return ERR_INVALID_URL;