From 1ce13f6a03ebf611038a667d1f683a5fd6121e1a Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Thu, 3 Jan 2019 05:16:31 -0800 Subject: [PATCH] [M71 Dev][EFL] Fix compilation errors for desktop build This commit resolves compiler errors to enable EFL port. Change-Id: I52dad48542d849560d6a1b702fc2daf2603c1b52 Signed-off-by: Chandan Padhi --- content/renderer/render_thread_impl.cc | 4 +- content/renderer/render_thread_impl.h | 4 +- content/renderer/render_widget.cc | 3 +- gpu/GLES2/gl2chromium.h | 2 + .../client/gles2_implementation_efl_autogen.h | 50 +++++++++++++++--- .../gles2_implementation_efl_header_autogen.h | 21 +++++++- gpu/command_buffer/client/gles2_interface.h | 10 ---- third_party/khronos/GLES2/gl2ext.h | 1 + third_party/khronos/KHR/khrplatform.h | 4 ++ .../browser/compositor/evasgl_context_provider.cc | 4 ++ .../browser/compositor/evasgl_context_provider.h | 1 + .../compositor/evasgl_delegated_frame_host.cc | 3 +- .../browser/compositor/evasgl_output_surface.cc | 7 +++ .../browser/compositor/evasgl_output_surface.h | 3 ++ .../renderer_host/render_widget_host_view_efl.cc | 15 ++++-- .../renderer_host/render_widget_host_view_efl.h | 10 ++-- .../browser/web_contents/web_contents_impl_efl.cc | 2 + .../browser/web_contents/web_contents_view_efl.cc | 2 +- .../browser/web_contents/web_contents_view_efl.h | 2 +- .../events/gestures/gesture_recognizer_impl_efl.cc | 5 -- .../chromium_impl/ui/gl/gl_current_context_efl.cc | 1 - .../chromium_impl/ui/ozone/ozone_platform_efl.cc | 1 + tizen_src/ewk/efl_integration/BUILD.gn | 4 +- .../browser/browsing_data_remover_efl.cc | 30 ++++++----- .../browser/favicon/favicon_database.cc | 14 ++--- .../browser/favicon/favicon_database_p.cc | 8 +-- .../geolocation_permission_context_efl.cc | 16 +++--- .../efl_integration/browser/login_delegate_efl.cc | 13 +++-- .../notification/notification_controller_efl.cc | 10 ++-- .../notification/notification_controller_efl.h | 8 +-- .../browser/permission_manager_efl.cc | 10 ++-- .../browser/permission_manager_efl.h | 2 +- .../browser/policy_response_delegate_efl.cc | 15 ++++-- .../browser/quota_permission_context_efl.cc | 8 +-- .../resource_dispatcher_host_delegate_efl.cc | 6 ++- .../ewk/efl_integration/browser_context_efl.cc | 19 ++++--- .../ewk/efl_integration/browser_context_efl.h | 1 + .../efl_integration/content_browser_client_efl.cc | 5 +- .../efl_integration/context_menu_controller_efl.cc | 3 +- tizen_src/ewk/efl_integration/cookie_manager.cc | 49 +++++++++--------- .../devtools_manager_delegate_efl.cc | 7 --- .../devtools_manager_delegate_efl.h | 6 ++- tizen_src/ewk/efl_integration/eweb_context.cc | 59 ++++++++++++---------- tizen_src/ewk/efl_integration/eweb_view.cc | 27 ++++++---- tizen_src/ewk/efl_integration/eweb_view.h | 8 +-- .../efl_integration/file_chooser_controller_efl.h | 11 ++-- .../ewk/efl_integration/network_delegate_efl.cc | 6 ++- .../ewk/efl_integration/network_delegate_efl.h | 6 ++- .../renderer/print_web_view_helper_efl.cc | 4 +- .../renderer/print_web_view_helper_efl.h | 6 ++- .../renderer/render_view_observer_efl.h | 2 +- .../url_request_context_getter_efl.cc | 24 +++++---- .../url_request_context_getter_efl.h | 6 ++- .../efl_integration/web_contents_delegate_efl.cc | 14 ++--- .../efl_integration/web_contents_delegate_efl.h | 3 +- .../wrt/wrt_file_protocol_handler.cc | 4 +- 56 files changed, 334 insertions(+), 235 deletions(-) diff --git a/content/renderer/render_thread_impl.cc b/content/renderer/render_thread_impl.cc index c8cc770..dda02d7 100644 --- a/content/renderer/render_thread_impl.cc +++ b/content/renderer/render_thread_impl.cc @@ -1973,7 +1973,7 @@ void RenderThreadImpl::RequestNewLayerTreeFrameSink( return; } - scoped_refptr worker_context_provider = + scoped_refptr worker_context_provider = SharedCompositorWorkerContextProvider(); if (!worker_context_provider) { // Cause the compositor to wait and try again. @@ -2266,7 +2266,7 @@ base::TaskRunner* RenderThreadImpl::GetWorkerTaskRunner() { return categorized_worker_pool_.get(); } -scoped_refptr +scoped_refptr RenderThreadImpl::SharedCompositorWorkerContextProvider() { DCHECK(IsMainThread()); // Try to reuse existing shared worker context provider. diff --git a/content/renderer/render_thread_impl.h b/content/renderer/render_thread_impl.h index 2458bcc..3568ba6 100644 --- a/content/renderer/render_thread_impl.h +++ b/content/renderer/render_thread_impl.h @@ -395,7 +395,7 @@ class CONTENT_EXPORT RenderThreadImpl // Returns a worker context provider that will be bound on the compositor // thread. - scoped_refptr + scoped_refptr SharedCompositorWorkerContextProvider(); media::GpuVideoAcceleratorFactories* GetGpuFactories(); @@ -671,7 +671,7 @@ class CONTENT_EXPORT RenderThreadImpl scoped_refptr video_frame_compositor_context_provider_; - scoped_refptr + scoped_refptr shared_worker_context_provider_; std::unique_ptr audio_renderer_mixer_manager_; diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index 288bbaa..8723d03 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -2412,13 +2412,12 @@ blink::WebScreenInfo RenderWidget::GetScreenInfo() { 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) { diff --git a/gpu/GLES2/gl2chromium.h b/gpu/GLES2/gl2chromium.h index 42889dd..25b0d7f 100644 --- a/gpu/GLES2/gl2chromium.h +++ b/gpu/GLES2/gl2chromium.h @@ -23,7 +23,9 @@ #endif #endif +#ifndef _EVAS_GL_H #include +#endif #endif // GPU_GLES2_GL2CHROMIUM_H_ diff --git a/gpu/command_buffer/client/gles2_implementation_efl_autogen.h b/gpu/command_buffer/client/gles2_implementation_efl_autogen.h index 38c9146..e1b8d32 100644 --- a/gpu/command_buffer/client/gles2_implementation_efl_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_efl_autogen.h @@ -1516,6 +1516,36 @@ void GLES2ImplementationEfl::BindVertexArrayOES(GLuint /* array */) { 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(); @@ -1708,12 +1738,6 @@ void GLES2ImplementationEfl::CopySubTextureCHROMIUM( NOTIMPLEMENTED(); } -void GLES2ImplementationEfl::CompressedCopyTextureCHROMIUM( - GLuint /* source_id */, - GLuint /* dest_id */) { - NOTIMPLEMENTED(); -} - void GLES2ImplementationEfl::DrawArraysInstancedANGLE(GLenum /* mode */, GLint /* first */, GLsizei /* count */, @@ -2217,4 +2241,18 @@ void GLES2ImplementationEfl::InvalidateReadbackBufferShadowDataCHROMIUM( 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_ diff --git a/gpu/command_buffer/client/gles2_implementation_efl_header_autogen.h b/gpu/command_buffer/client/gles2_implementation_efl_header_autogen.h index 04a51a5..87372d4 100644 --- a/gpu/command_buffer/client/gles2_implementation_efl_header_autogen.h +++ b/gpu/command_buffer/client/gles2_implementation_efl_header_autogen.h @@ -596,6 +596,19 @@ void GenVertexArraysOES(GLsizei n, GLuint* arrays) override; 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, @@ -690,7 +703,6 @@ void CopySubTextureCHROMIUM(GLuint source_id, 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, @@ -908,4 +920,11 @@ GLuint CreateClientGpuFenceCHROMIUM(ClientGpuFence source) override; 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_ diff --git a/gpu/command_buffer/client/gles2_interface.h b/gpu/command_buffer/client/gles2_interface.h index 801676e..85aa954 100644 --- a/gpu/command_buffer/client/gles2_interface.h +++ b/gpu/command_buffer/client/gles2_interface.h @@ -25,16 +25,6 @@ extern "C" typedef struct _ClientBuffer* ClientBuffer; 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 { diff --git a/third_party/khronos/GLES2/gl2ext.h b/third_party/khronos/GLES2/gl2ext.h index da10c65..641034e 100644 --- a/third_party/khronos/GLES2/gl2ext.h +++ b/third_party/khronos/GLES2/gl2ext.h @@ -1125,6 +1125,7 @@ GL_APICALL void GL_APIENTRY glGetSyncivAPPLE (GLsync sync, GLenum pname, GLsizei #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, diff --git a/third_party/khronos/KHR/khrplatform.h b/third_party/khronos/KHR/khrplatform.h index ee72408..e9db93a 100644 --- a/third_party/khronos/KHR/khrplatform.h +++ b/third_party/khronos/KHR/khrplatform.h @@ -156,8 +156,12 @@ #include 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 diff --git a/tizen_src/chromium_impl/content/browser/compositor/evasgl_context_provider.cc b/tizen_src/chromium_impl/content/browser/compositor/evasgl_context_provider.cc index 2da4eb1..c1ca43a 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/evasgl_context_provider.cc +++ b/tizen_src/chromium_impl/content/browser/compositor/evasgl_context_provider.cc @@ -38,6 +38,10 @@ class GrContext* EvasGLContextProvider::GrContext() { return nullptr; } +gpu::SharedImageInterface* EvasGLContextProvider::SharedImageInterface() { + return nullptr; +} + viz::ContextCacheController* EvasGLContextProvider::CacheController() { return cache_controller_.get(); } diff --git a/tizen_src/chromium_impl/content/browser/compositor/evasgl_context_provider.h b/tizen_src/chromium_impl/content/browser/compositor/evasgl_context_provider.h index 42b2fbd..dcab36f 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/evasgl_context_provider.h +++ b/tizen_src/chromium_impl/content/browser/compositor/evasgl_context_provider.h @@ -28,6 +28,7 @@ class CONTENT_EXPORT EvasGLContextProvider 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; diff --git a/tizen_src/chromium_impl/content/browser/compositor/evasgl_delegated_frame_host.cc b/tizen_src/chromium_impl/content/browser/compositor/evasgl_delegated_frame_host.cc index e8515c9..8a717ed 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/evasgl_delegated_frame_host.cc +++ b/tizen_src/chromium_impl/content/browser/compositor/evasgl_delegated_frame_host.cc @@ -41,7 +41,8 @@ void EvasGLDelegatedFrameHost::Initialize() { child_id_ = resource_provider_->CreateChild( base::Bind(&EvasGLDelegatedFrameHost::UnrefResources, - weak_ptr_factory_.GetWeakPtr())); + weak_ptr_factory_.GetWeakPtr()), + true); renderer_ = std::make_unique( &settings_, output_surface_.get(), resource_provider_.get(), nullptr); diff --git a/tizen_src/chromium_impl/content/browser/compositor/evasgl_output_surface.cc b/tizen_src/chromium_impl/content/browser/compositor/evasgl_output_surface.cc index c08ef09..6d5a16b 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/evasgl_output_surface.cc +++ b/tizen_src/chromium_impl/content/browser/compositor/evasgl_output_surface.cc @@ -64,4 +64,11 @@ unsigned EvasGLOutputSurface::UpdateGpuFence() { return 0; } +#if BUILDFLAG(ENABLE_VULKAN) +gpu::VulkanSurface* EvasGLOutputSurface::GetVulkanSurface() { + NOTIMPLEMENTED(); + return nullptr; +} +#endif + } // namespace content diff --git a/tizen_src/chromium_impl/content/browser/compositor/evasgl_output_surface.h b/tizen_src/chromium_impl/content/browser/compositor/evasgl_output_surface.h index 2e7bf81..b83f3d28 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/evasgl_output_surface.h +++ b/tizen_src/chromium_impl/content/browser/compositor/evasgl_output_surface.h @@ -38,6 +38,9 @@ class CONTENT_EXPORT EvasGLOutputSurface : public viz::OutputSurface { gfx::BufferFormat GetOverlayBufferFormat() const override; uint32_t GetFramebufferCopyTextureFormat() override; unsigned UpdateGpuFence() override; +#if BUILDFLAG(ENABLE_VULKAN) + gpu::VulkanSurface* GetVulkanSurface() override; +#endif }; } // namespace content diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc index b22225e..4ee40d3 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc @@ -32,7 +32,9 @@ #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" @@ -159,7 +161,7 @@ RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget_host, device_scale_factor_(1.0f), magnifier_(false), is_loading_(false), - gesture_recognizer_(ui::GestureRecognizer::Create()), + gesture_recognizer_(std::make_unique()), current_orientation_(0), evas_gl_(NULL), evas_gl_api_(NULL), @@ -563,12 +565,13 @@ void RenderWidgetHostViewEfl::SetSize(const gfx::Size& size) { // 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) { @@ -799,8 +802,8 @@ void RenderWidgetHostViewEfl::SelectionChanged(const base::string16& text, } 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 = @@ -1530,9 +1533,9 @@ void RenderWidgetHostViewEfl::SubmitCompositorFrame( 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)); @@ -1540,6 +1543,8 @@ void RenderWidgetHostViewEfl::SubmitCompositorFrame( void RenderWidgetHostViewEfl::ClearCompositorFrame() {} +void RenderWidgetHostViewEfl::ResetFallbackToFirstNavigationSurface() {} + void RenderWidgetHostViewEfl::ScrollFocusedEditableNode() { // If long-pressing, do not perform zoom to focused element. if (GetSelectionController() && !GetSelectionController()->GetLongPressed()) { diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h index 82bc3e8..7d58478 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h +++ b/tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h @@ -43,12 +43,8 @@ typedef EvasGLint64 GLint64; 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; @@ -71,6 +67,7 @@ class RenderWidgetHostImpl; class RenderWidgetHostView; class WebContents; class ScreenshotCapturedCallback; +struct TextInputState; // RenderWidgetHostView class hierarchy described in render_widget_host_view.h. class CONTENT_EXPORT RenderWidgetHostViewEfl @@ -137,7 +134,7 @@ 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; @@ -152,7 +149,7 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl 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*); @@ -165,6 +162,7 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl viz::CompositorFrame frame, base::Optional hit_test_region_list) override; void ClearCompositorFrame() override; + void ResetFallbackToFirstNavigationSurface() override; // ui::GestureEventHelper implementation. bool CanDispatchToConsumer(ui::GestureConsumer* consumer) override; diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc index 26455ef..a4c499b 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc @@ -186,12 +186,14 @@ void WebContentsImplEfl::CancelWindowRequest(int32_t render_process_id, 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()) { diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.cc b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.cc index 809e86b..2c54cd9 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.cc +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.cc @@ -106,7 +106,7 @@ RenderWidgetHostViewBase* WebContentsViewEfl::CreateViewForWidget( return view; } -RenderWidgetHostViewBase* WebContentsViewEfl::CreateViewForPopupWidget( +RenderWidgetHostViewBase* WebContentsViewEfl::CreateViewForChildWidget( RenderWidgetHost* render_widget_host) { return new RenderWidgetHostViewEfl(render_widget_host, *web_contents_); } diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.h b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.h index 47fe4a0..b1cf32e 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.h +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.h @@ -39,7 +39,7 @@ class CONTENT_EXPORT WebContentsViewEfl 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; diff --git a/tizen_src/chromium_impl/ui/events/gestures/gesture_recognizer_impl_efl.cc b/tizen_src/chromium_impl/ui/events/gestures/gesture_recognizer_impl_efl.cc index f92accb..5c772c0 100644 --- a/tizen_src/chromium_impl/ui/events/gestures/gesture_recognizer_impl_efl.cc +++ b/tizen_src/chromium_impl/ui/events/gestures/gesture_recognizer_impl_efl.cc @@ -28,10 +28,5 @@ GestureProviderAura* GestureRecognizerImplEfl::GetGestureProviderForConsumer( return GestureRecognizerImpl::GetGestureProviderForConsumer(c); } -// GestureRecognizer, static -GestureRecognizer* GestureRecognizer::Create() { - return new GestureRecognizerImplEfl(); -} - } // namespace ui diff --git a/tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc b/tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc index 8b633fc..2e8fbee 100644 --- a/tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc +++ b/tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc @@ -4,7 +4,6 @@ #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; diff --git a/tizen_src/chromium_impl/ui/ozone/ozone_platform_efl.cc b/tizen_src/chromium_impl/ui/ozone/ozone_platform_efl.cc index 19fcc44..122adef 100644 --- a/tizen_src/chromium_impl/ui/ozone/ozone_platform_efl.cc +++ b/tizen_src/chromium_impl/ui/ozone/ozone_platform_efl.cc @@ -5,6 +5,7 @@ #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" diff --git a/tizen_src/ewk/efl_integration/BUILD.gn b/tizen_src/ewk/efl_integration/BUILD.gn index 4598eb1..e2c28a3 100644 --- a/tizen_src/ewk/efl_integration/BUILD.gn +++ b/tizen_src/ewk/efl_integration/BUILD.gn @@ -245,8 +245,6 @@ shared_library("chromium-ewk") { "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", @@ -542,6 +540,8 @@ shared_library("chromium-ewk") { # 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", ] diff --git a/tizen_src/ewk/efl_integration/browser/browsing_data_remover_efl.cc b/tizen_src/ewk/efl_integration/browser/browsing_data_remover_efl.cc index 758dda6..a1eb65b 100644 --- a/tizen_src/ewk/efl_integration/browser/browsing_data_remover_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/browsing_data_remover_efl.cc @@ -6,10 +6,12 @@ #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" @@ -82,10 +84,10 @@ void BrowsingDataRemoverEfl::ClearNetworkCache() { 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() { @@ -150,8 +152,8 @@ void BrowsingDataRemoverEfl::DoClearCache(int rv) { 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; @@ -221,8 +223,8 @@ void BrowsingDataRemoverEfl::RemoveImpl(int remove_mask, 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))); } @@ -250,8 +252,8 @@ void BrowsingDataRemoverEfl::DeleteAppCachesForOrigin( 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; @@ -363,10 +365,10 @@ void BrowsingDataRemoverEfl::CheckQuotaManagedDataDeletionStatus() { 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() { diff --git a/tizen_src/ewk/efl_integration/browser/favicon/favicon_database.cc b/tizen_src/ewk/efl_integration/browser/favicon/favicon_database.cc index 7f58f2b..afd7bb7 100644 --- a/tizen_src/ewk/efl_integration/browser/favicon/favicon_database.cc +++ b/tizen_src/ewk/efl_integration/browser/favicon/favicon_database.cc @@ -2,12 +2,14 @@ // 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 #include +#include +#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;\ @@ -213,8 +215,8 @@ void FaviconDatabase::SyncSQLite() { content::BrowserThread::DB); #else scoped_refptr ptr = - content::BrowserThread::GetTaskRunnerForThread( - content::BrowserThread::UI); + base::CreateSingleThreadTaskRunnerWithTraits( + {content::BrowserThread::UI}); #endif ptr->PostTask(FROM_HERE, base::Bind(&FaviconDatabasePrivate::performSync, d->weakPtrFactory.GetWeakPtr())); } diff --git a/tizen_src/ewk/efl_integration/browser/favicon/favicon_database_p.cc b/tizen_src/ewk/efl_integration/browser/favicon/favicon_database_p.cc index 90baf26..d2556ae 100644 --- a/tizen_src/ewk/efl_integration/browser/favicon/favicon_database_p.cc +++ b/tizen_src/ewk/efl_integration/browser/favicon/favicon_database_p.cc @@ -3,8 +3,10 @@ // found in the LICENSE file. #include "favicon_database_p.h" -#include "favicon_commands.h" #include +#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"; @@ -49,8 +51,8 @@ scoped_refptr FaviconDatabasePrivate::taskRunner() return content::BrowserThread::GetTaskRunnerForThread( content::BrowserThread::DB); #else - return content::BrowserThread::GetTaskRunnerForThread( - content::BrowserThread::UI); + return base::CreateSingleThreadTaskRunnerWithTraits( + {content::BrowserThread::UI}); #endif } diff --git a/tizen_src/ewk/efl_integration/browser/geolocation/geolocation_permission_context_efl.cc b/tizen_src/ewk/efl_integration/browser/geolocation/geolocation_permission_context_efl.cc index 583499d..b878e38 100644 --- a/tizen_src/ewk/efl_integration/browser/geolocation/geolocation_permission_context_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/geolocation/geolocation_permission_context_efl.cc @@ -5,6 +5,7 @@ #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" @@ -68,16 +69,11 @@ void GeolocationPermissionContextEfl::RequestPermission( int render_frame_id, const GURL& requesting_frame, base::Callback 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( diff --git a/tizen_src/ewk/efl_integration/browser/login_delegate_efl.cc b/tizen_src/ewk/efl_integration/browser/login_delegate_efl.cc index 8b4cdb9..77a70a2 100644 --- a/tizen_src/ewk/efl_integration/browser/login_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/login_delegate_efl.cc @@ -36,7 +36,8 @@ LoginDelegateEfl::LoginDelegateEfl(net::AuthChallengeInfo* auth_info, net::URLRe 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)); } @@ -45,14 +46,16 @@ LoginDelegateEfl::~LoginDelegateEfl() { 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)); } diff --git a/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.cc b/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.cc index eb8ff89..50242fb6 100644 --- a/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.cc @@ -7,8 +7,6 @@ #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" @@ -95,8 +93,8 @@ void NotificationControllerEfl::DisplayNotification( 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(browser_context); CHECK(browser_context_efl); @@ -154,8 +152,8 @@ void NotificationControllerEfl::DisplayPersistentNotification( 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(); } diff --git a/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h b/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h index 99cf5bf..14a7f58 100644 --- a/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h +++ b/tizen_src/ewk/efl_integration/browser/notification/notification_controller_efl.h @@ -111,8 +111,8 @@ class NotificationControllerEfl: public PlatformNotificationService { 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. @@ -121,8 +121,8 @@ class NotificationControllerEfl: public PlatformNotificationService { 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. diff --git a/tizen_src/ewk/efl_integration/browser/permission_manager_efl.cc b/tizen_src/ewk/efl_integration/browser/permission_manager_efl.cc index 71ab45e..6f66972 100644 --- a/tizen_src/ewk/efl_integration/browser/permission_manager_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/permission_manager_efl.cc @@ -141,11 +141,11 @@ void PermissionManagerEfl::ResetPermission(PermissionType permission, } int PermissionManagerEfl::SubscribePermissionStatusChange( - PermissionType permission, - const GURL& requesting_origin, - const GURL& embedding_origin, - const base::Callback& callback) { -return -1; + PermissionType permission, + content::RenderFrameHost* render_frame_host, + const GURL& requesting_origin, + const base::Callback& callback) { + return -1; } void PermissionManagerEfl::UnsubscribePermissionStatusChange( diff --git a/tizen_src/ewk/efl_integration/browser/permission_manager_efl.h b/tizen_src/ewk/efl_integration/browser/permission_manager_efl.h index 82163e5..1196a6f 100644 --- a/tizen_src/ewk/efl_integration/browser/permission_manager_efl.h +++ b/tizen_src/ewk/efl_integration/browser/permission_manager_efl.h @@ -54,8 +54,8 @@ class CONTENT_EXPORT PermissionManagerEfl // 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& callback) override; diff --git a/tizen_src/ewk/efl_integration/browser/policy_response_delegate_efl.cc b/tizen_src/ewk/efl_integration/browser/policy_response_delegate_efl.cc index 49da299..ad42403 100644 --- a/tizen_src/ewk/efl_integration/browser/policy_response_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/policy_response_delegate_efl.cc @@ -57,11 +57,14 @@ PolicyResponseDelegateEfl::PolicyResponseDelegateEfl( // 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)); } } @@ -122,13 +125,15 @@ void PolicyResponseDelegateEfl::HandlePolicyResponseOnUIThread() { 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)); } diff --git a/tizen_src/ewk/efl_integration/browser/quota_permission_context_efl.cc b/tizen_src/ewk/efl_integration/browser/quota_permission_context_efl.cc index ae8d1db..52e42bd 100644 --- a/tizen_src/ewk/efl_integration/browser/quota_permission_context_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/quota_permission_context_efl.cc @@ -17,8 +17,8 @@ void QuotaPermissionContextEfl::RequestQuotaPermission( 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; @@ -48,8 +48,8 @@ void QuotaPermissionContextEfl::DispatchCallback( 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; diff --git a/tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.cc b/tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.cc index ea8e844..7473084 100644 --- a/tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.cc @@ -4,10 +4,12 @@ #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" @@ -136,8 +138,8 @@ void ResourceDispatcherHostDelegateEfl::TriggerNewDownloadStartCallback( // 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)); diff --git a/tizen_src/ewk/efl_integration/browser_context_efl.cc b/tizen_src/ewk/efl_integration/browser_context_efl.cc index 6bd1949..cb574d4 100644 --- a/tizen_src/ewk/efl_integration/browser_context_efl.cc +++ b/tizen_src/ewk/efl_integration/browser_context_efl.cc @@ -13,7 +13,6 @@ #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" @@ -22,13 +21,14 @@ #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; @@ -135,8 +135,10 @@ BrowserContextEfl::BrowserContextEfl(EWebContext* web_context, bool incognito) 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; @@ -188,6 +190,11 @@ base::FilePath BrowserContextEfl::GetPath() const { return path; } +base::FilePath BrowserContextEfl::GetCachePath() const { + NOTIMPLEMENTED(); + return base::FilePath(); +} + BackgroundSyncController* BrowserContextEfl::GetBackgroundSyncController() { return nullptr; } @@ -214,19 +221,19 @@ net::URLRequestContextGetter* BrowserContextEfl::CreateRequestContext( // 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( diff --git a/tizen_src/ewk/efl_integration/browser_context_efl.h b/tizen_src/ewk/efl_integration/browser_context_efl.h index df1c951..27d3b3f 100644 --- a/tizen_src/ewk/efl_integration/browser_context_efl.h +++ b/tizen_src/ewk/efl_integration/browser_context_efl.h @@ -84,6 +84,7 @@ class BrowserContextEfl : public BrowserContext, } 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, diff --git a/tizen_src/ewk/efl_integration/content_browser_client_efl.cc b/tizen_src/ewk/efl_integration/content_browser_client_efl.cc index 8c13f9a..baad599 100644 --- a/tizen_src/ewk/efl_integration/content_browser_client_efl.cc +++ b/tizen_src/ewk/efl_integration/content_browser_client_efl.cc @@ -14,7 +14,6 @@ #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" @@ -301,8 +300,8 @@ void ContentBrowserClientEfl::SetCertificatePem(const net::SSLInfo& ssl_info, &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)); } diff --git a/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc b/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc index fab1d5b..9820e8b 100644 --- a/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc +++ b/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc @@ -571,8 +571,7 @@ base::FilePath ContextMenuControllerEfl::DownloadFile( auto dl_params = std::make_unique( 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( diff --git a/tizen_src/ewk/efl_integration/cookie_manager.cc b/tizen_src/ewk/efl_integration/cookie_manager.cc index 7fe44ac99..e9dfeab 100644 --- a/tizen_src/ewk/efl_integration/cookie_manager.cc +++ b/tizen_src/ewk/efl_integration/cookie_manager.cc @@ -10,16 +10,17 @@ #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" @@ -125,8 +126,8 @@ void CookieManager::DeleteCookiesAsync(const std::string& url, DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); std::unique_ptr 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)); } @@ -153,22 +154,19 @@ void CookieManager::SetStoragePath(const std::string& path, scoped_refptr 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) { @@ -176,8 +174,8 @@ void CookieManager::GetHostNamesWithCookiesAsync(AsyncHostnamesGetCb callback, v host_callback_queue_.push(new EwkGetHostCallback(callback, data)); std::unique_ptr 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)))); } @@ -197,10 +195,9 @@ void CookieManager::FetchCookiesOnIOThread( 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()) { @@ -316,10 +313,10 @@ std::string CookieManager::GetCookiesForURL(const std::string& url) { 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; diff --git a/tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.cc b/tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.cc index 2c30178..8f0b21f 100644 --- a/tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.cc @@ -104,11 +104,4 @@ DevToolsManagerDelegateEfl::DevToolsManagerDelegateEfl() { DevToolsManagerDelegateEfl::~DevToolsManagerDelegateEfl() { } -bool DevToolsManagerDelegateEfl::HandleCommand( - content::DevToolsAgentHost* agent_host, - DevToolsAgentHostClient* client, - base::DictionaryValue* command_dict) { - return false; -} - } // namespace content diff --git a/tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.h b/tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.h index 6a83247a..141f5d0 100644 --- a/tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/devtools_manager_delegate_efl.h @@ -16,9 +16,11 @@ class DevToolsManagerDelegateEfl : public DevToolsManagerDelegate { // 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 command, + const std::string& message, + NotHandledCallback callback) override{}; private: DISALLOW_COPY_AND_ASSIGN(DevToolsManagerDelegateEfl); diff --git a/tizen_src/ewk/efl_integration/eweb_context.cc b/tizen_src/ewk/efl_integration/eweb_context.cc index f660031d..4ccd687 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.cc +++ b/tizen_src/ewk/efl_integration/eweb_context.cc @@ -12,11 +12,12 @@ #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" @@ -149,8 +150,8 @@ void OnTemporaryUsageAndQuotaObtained( // 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, @@ -162,8 +163,8 @@ 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, @@ -186,8 +187,8 @@ void OnGetFileSystemOrigins(Ewk_Local_File_System_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( @@ -500,8 +501,8 @@ void EWebContext::SetProxyUri(const char* uri) { 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()) @@ -530,9 +531,9 @@ Ewk_Cookie_Manager* EWebContext::ewkCookieManager() { 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 = @@ -569,22 +570,24 @@ void EWebContext::GetApplicationCacheUsage( 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; } @@ -595,9 +598,9 @@ void EWebContext::WebStorageDelete() { 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 = @@ -622,8 +625,8 @@ void EWebContext::WebStorageOriginsAllGet( 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; } @@ -634,8 +637,8 @@ void EWebContext::IndexedDBDelete() { 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; } @@ -658,9 +661,9 @@ void EWebContext::GetAllOriginsWithWebDB( 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 = @@ -715,8 +718,8 @@ Evas_Object* EWebContext::AddFaviconObject(const char* uri, 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; } diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 1a0aa92..028bf88 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -29,6 +29,7 @@ #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" @@ -50,7 +51,6 @@ #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" @@ -1131,6 +1131,7 @@ void EWebView::Find(const char* text, Ewk_Find_Options find_options) { 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 = @@ -1138,6 +1139,7 @@ void EWebView::Find(const char* text, Ewk_Find_Options find_options) { 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) { @@ -1490,15 +1492,21 @@ void EWebView::QuotaRequestCancel( } 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(); } @@ -1970,11 +1978,11 @@ bool EWebView::IsDragging() const { } 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 = @@ -1989,10 +1997,10 @@ void EWebView::ShowFileChooser(content::RenderFrameHost* render_frame_host, } } } -#endif file_chooser_.reset( new content::FileChooserControllerEfl(render_frame_host, ¶ms)); file_chooser_->Open(); +#endif } #if !defined(EWK_BRINGUP) // FIXME: m67 bringup @@ -2080,9 +2088,10 @@ void EWebView::InvokeWebProcessCrashedCallback() { } 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() { @@ -2324,8 +2333,8 @@ void EWebView::SendDelayedMessages(RenderViewHost* render_view_host) { 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; diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 138a966..d1ae81c 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -29,7 +29,6 @@ #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" @@ -51,7 +50,6 @@ #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; @@ -418,7 +416,7 @@ class EWebView { 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; @@ -534,7 +532,9 @@ class EWebView { } formNavigation; formNavigation formNavigation_; std::unique_ptr context_menu_; +#if !defined(EWK_BRINGUP) // FIXME: m71 bringup std::unique_ptr file_chooser_; +#endif std::unique_ptr popup_controller_; base::string16 previous_text_; int current_find_request_id_; @@ -584,7 +584,7 @@ class EWebView { std::unique_ptr scroll_detector_; #if defined(OS_TIZEN) - content::FileChooserParams::Mode filechooser_mode_; + blink::mojom::FileChooserParams::Mode filechooser_mode_; #endif std::map diff --git a/tizen_src/ewk/efl_integration/file_chooser_controller_efl.h b/tizen_src/ewk/efl_integration/file_chooser_controller_efl.h index 02bffdb..3fb5eb6 100644 --- a/tizen_src/ewk/efl_integration/file_chooser_controller_efl.h +++ b/tizen_src/ewk/efl_integration/file_chooser_controller_efl.h @@ -6,7 +6,6 @@ #define file_chooser_controller_efl_h #include -#include "content/public/common/file_chooser_params.h" namespace content { @@ -23,7 +22,7 @@ class FileChooserControllerEfl { } FileChooserControllerEfl(RenderFrameHost* render_frame_host, - const content::FileChooserParams* params) + const blink::mojom::FileChooserParams* params) : render_frame_host_(render_frame_host), params_(params) { ParseParams(); } @@ -31,11 +30,9 @@ class FileChooserControllerEfl { 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; } @@ -51,7 +48,7 @@ class FileChooserControllerEfl { 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_; diff --git a/tizen_src/ewk/efl_integration/network_delegate_efl.cc b/tizen_src/ewk/efl_integration/network_delegate_efl.cc index 53d44d6..600e552 100644 --- a/tizen_src/ewk/efl_integration/network_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/network_delegate_efl.cc @@ -24,7 +24,8 @@ NetworkDelegate::AuthRequiredResponse NetworkDelegateEfl::OnAuthRequired( } 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); @@ -32,7 +33,8 @@ bool NetworkDelegateEfl::OnCanGetCookies(const URLRequest& request, 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); diff --git a/tizen_src/ewk/efl_integration/network_delegate_efl.h b/tizen_src/ewk/efl_integration/network_delegate_efl.h index 80a53dd..eaa4581 100644 --- a/tizen_src/ewk/efl_integration/network_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/network_delegate_efl.h @@ -24,11 +24,13 @@ class NetworkDelegateEfl : public NetworkDelegateImpl { 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, diff --git a/tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.cc b/tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.cc index 4157e31..1accac7 100644 --- a/tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.cc @@ -9,8 +9,8 @@ #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" @@ -197,7 +197,7 @@ bool PrintWebViewHelperEfl::PrintPageInternal( 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); diff --git a/tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.h b/tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.h index 0487acf..21ebd3b 100644 --- a/tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.h +++ b/tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.h @@ -17,7 +17,7 @@ class WebFrame; } namespace printing { -class PdfMetafileSkia; +class MetafileSkia; } struct PrintPagesParams; @@ -33,7 +33,9 @@ class PrintWebViewHelperEfl { 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 print_pages_params_; diff --git a/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.h b/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.h index 70cdff5..3532a4d 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.h +++ b/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.h @@ -52,7 +52,7 @@ class RenderViewObserverEfl: public content::RenderViewObserver { #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; diff --git a/tizen_src/ewk/efl_integration/url_request_context_getter_efl.cc b/tizen_src/ewk/efl_integration/url_request_context_getter_efl.cc index e4cfd5c..39b3864 100644 --- a/tizen_src/ewk/efl_integration/url_request_context_getter_efl.cc +++ b/tizen_src/ewk/efl_integration/url_request_context_getter_efl.cc @@ -9,9 +9,9 @@ #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" @@ -106,7 +106,8 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { 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( @@ -225,7 +226,7 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { 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); @@ -249,7 +250,7 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { scoped_refptr URLRequestContextGetterEfl::GetNetworkTaskRunner() const { - return BrowserThread::GetTaskRunnerForThread(BrowserThread::IO); + return base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}); } net::HostResolver* URLRequestContextGetterEfl::host_resolver() { @@ -266,8 +267,8 @@ void URLRequestContextGetterEfl::SetCookieStoragePath( } 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; @@ -300,11 +301,12 @@ void URLRequestContextGetterEfl::CreateSQLitePersistentCookieStore( 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 { @@ -315,7 +317,7 @@ void URLRequestContextGetterEfl::CreateSQLitePersistentCookieStore( // cookie store, if any, will be automatically flushed and closed when no // longer referenced. std::unique_ptr 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); @@ -341,7 +343,7 @@ void URLRequestContextGetterEfl::CreatePersistentCookieStore( 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(cookie_store_.get()); cookie_monster->SetPersistSessionCookies(persist_session_cookies); diff --git a/tizen_src/ewk/efl_integration/url_request_context_getter_efl.h b/tizen_src/ewk/efl_integration/url_request_context_getter_efl.h index f4496f1..1549778 100644 --- a/tizen_src/ewk/efl_integration/url_request_context_getter_efl.h +++ b/tizen_src/ewk/efl_integration/url_request_context_getter_efl.h @@ -7,7 +7,9 @@ #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" @@ -32,9 +34,9 @@ class URLRequestContextGetterEfl : public net::URLRequestContextGetter { bool ignore_certificate_errors = false, const base::FilePath& base_path = base::FilePath(), const scoped_refptr& io_task_runner = - BrowserThread::GetTaskRunnerForThread(BrowserThread::IO), + base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::IO}), const scoped_refptr& file_task_runner = - BrowserThread::GetTaskRunnerForThread(BrowserThread::UI), + base::CreateSingleThreadTaskRunnerWithTraits({BrowserThread::UI}), ProtocolHandlerMap* protocol_handlers = NULL, URLRequestInterceptorScopedVector request_interceptors = URLRequestInterceptorScopedVector(), diff --git a/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc b/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc index 142ed24..77c0bec 100644 --- a/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc @@ -27,7 +27,7 @@ #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" @@ -61,7 +61,7 @@ using namespace ui; 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)); @@ -613,8 +613,8 @@ void WebContentsDelegateEfl::OnPrintedMetafileReceived( return; } - std::unique_ptr metafile( - new printing::PdfMetafileSkia()); + std::unique_ptr metafile( + new printing::MetafileSkia()); if (!metafile->InitFromData(shared_buf.memory(), params.data_size)) { NOTREACHED() << "Invalid metafile header"; return; @@ -658,8 +658,10 @@ bool WebContentsDelegateEfl::DidAddMessageToConsole(WebContents* source, return true; } -void WebContentsDelegateEfl::RunFileChooser(RenderFrameHost* render_frame_host, - const FileChooserParams& params) { +void WebContentsDelegateEfl::RunFileChooser( + RenderFrameHost* render_frame_host, + std::unique_ptr listener, + const blink::mojom::FileChooserParams& params) { web_view_->ShowFileChooser(render_frame_host, params); } diff --git a/tizen_src/ewk/efl_integration/web_contents_delegate_efl.h b/tizen_src/ewk/efl_integration/web_contents_delegate_efl.h index 91d237a..793337f 100644 --- a/tizen_src/ewk/efl_integration/web_contents_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/web_contents_delegate_efl.h @@ -131,7 +131,8 @@ class WebContentsDelegateEfl : public WebContentsDelegate, int32_t line_no, const base::string16& source_id) override; void RunFileChooser(content::RenderFrameHost* render_frame_host, - const FileChooserParams& params) override; + std::unique_ptr listener, + const blink::mojom::FileChooserParams& params) override; ColorChooser* OpenColorChooser( WebContents* web_contents, SkColor color, diff --git a/tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.cc b/tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.cc index d0d21f6..3690103 100644 --- a/tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.cc +++ b/tizen_src/ewk/efl_integration/wrt/wrt_file_protocol_handler.cc @@ -31,7 +31,7 @@ class WrtURLRequestDataJob : public URLRequestSimpleJob { int GetData(std::string* mime_type, std::string* charset, std::string* data, - const CompletionCallback& callback) const override; + CompletionOnceCallback callback) const override; private: ~WrtURLRequestDataJob() override {} @@ -41,7 +41,7 @@ class WrtURLRequestDataJob : public URLRequestSimpleJob { 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; -- 2.7.4