From 146060f04103d68de61cd30e7098760d1a624232 Mon Sep 17 00:00:00 2001 From: Gajendra N Date: Wed, 18 May 2016 18:19:14 +0530 Subject: [PATCH 01/16] [M51_2704] Chromium upversion to m51_2704 branch. This patch deals with the following changes: 1. Change in parameters of RunJavaScriptDialog() & RunBeforeUnloadDialog() functions of JavaScriptDialogManagerEfl. 2. WebGraphicsContext3DCommandBufferImpl constructor takes additional parameters gfx::PreferIntegratedGpu, share_resources & automatic_flushes. Also surface_id (int) is changed to SurfaceHandle. 3. Use gpu::gles2::ContextCreationAttribHelper in place of blink::WebGraphicsContext3D ::Attributes and initialize their members accordingly. 4. GpuChannelHost is moved from 'content' to 'gpu' namespace. 5. Context type BROWSER_COMPOSITOR_ONSCREEN_CONTEXT renamed to DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT. 6. CommandBufferProxyImpl is moved from 'content' to 'gpu' namespace. 7. MovePluginWindows() of RenderWidgetHostView is removed is upstream. 8. ViewHostMsg_TextInputState_Params is renamed to TextInputState. 9. switches::kTabCaptureDownscaleQuality & switches::kTabCaptureUpscaleQuality are removed, hence SCALER_QUALITY is not dependant on these switches. 10. Change in parameter types for HandleNewWindowRequest() & HandleNewWebContentsCreate() functions due to scoped_refptr changes. 11. webplugin_delegate_impl.h is removed in upstream, hence remove related files from efl. 12. GpuChildThreadEfl constructor takes addtional parameter gpu::GpuPreferences. 13. Use switches::IsRunLayoutTestSwitchPresent() in place of HasSwitch(switches::kRunLayoutTest) as switches::kRunLayoutTest is no longer available. 14. media/ozone/media_ozone_platform.h is removed, hence remove related files from efl. 15. PermissionStatus is moved from content to blink::mojom:: namespace. 16. Include base/macros.h for DISALLOW_COPY_AND_ASSIGN macro. 17. Initialize BrowserContext with DIR_USER_DATA path before creation of RequestContext. 18. Overloaded CreateRequestContext() is replaced with CreateRequestContextForStoragePartition(). 19. CookieStore & CookieMonster are no more ReferenceCounted hence use scoped_ptr and std::move during assignment and parameter passing. 20. NavigationController::ReloadIgnoringCache() is renamed to ReloadBypassingCache(). 21. RenderProcessObserver::WebKitInitialized() is removed in upstream. 22. blink::WebFrameContentDumper::dumpFrameTreeAsText() is renamed to dumpWebViewAsText() which accepts WebView object instead of WebFrame. 23. setBaseBackgroundColor() is moved to WebFrameWidget. 24. 'network_delegate' member is removed from NetworkSessionParams. 25. Change in path for headers : gl_helper.h, command_buffer_proxy_impl.h, resize_lock.h, gpu_messages.h, gpu_host_messages.h, delegated_frame_host.h & permission_status.mojom.h 26. Version change from 50.2661 to 51.2704 in build and packaging related files. AddExtraPluginDir() is removed from PluginListi class. The code under EWebContext:: AddExtraPluginDir() is disabled under EWK_BRINUP flag. This will be fixed by WebView team. JIRA issue raised at http://suprem.sec.samsung.net/jira/browse/TWF-1132 Bug : http://suprem.sec.samsung.net/jira/browse/TWF-1060 Change-Id: I588d9c25c051dc72d76b7e6aa82d4a0f15ff01a2 Signed-off-by: Suchit Agrawal --- tizen_src/DEPS.efl | 2 +- .../javascript_dialog_manager_efl.cc | 8 +-- .../js_dialogs_efl/javascript_dialog_manager_efl.h | 2 - .../browser/compositor/context_factory_efl.cc | 52 ++++++++++------- .../compositor/mailbox_output_surface_efl.cc | 4 +- .../compositor/mailbox_output_surface_efl.h | 6 +- .../device_sensors/data_fetcher_impl_tizen.cc | 1 - .../renderer_host/render_widget_host_view_efl.cc | 27 ++------- .../renderer_host/render_widget_host_view_efl.h | 15 +++-- .../browser/web_contents/web_contents_impl_efl.cc | 8 +-- .../browser/web_contents/web_contents_impl_efl.h | 5 +- .../browser/web_contents/web_contents_view_efl.h | 1 + .../browser/web_contents/web_drag_source_efl.h | 1 + .../child/npapi/webplugin_delegate_impl_efl.cc | 66 ---------------------- .../chromium_impl/content/common/paths_efl.cc | 3 +- .../chromium_impl/content/content_child_efl.gypi | 9 --- tizen_src/chromium_impl/content/content_efl.gypi | 7 --- .../content/gpu/in_process_gpu_thread_efl.cc | 37 +++++++----- .../content/shell/browser/shell_efl.cc | 6 +- .../shell_web_contents_view_delegate_efl.cc | 3 +- .../ui/ozone/media_ozone_platform_efl.cc | 26 --------- tizen_src/chromium_impl/ui/ozone/ozone_efl.gyp | 1 - .../geolocation_permission_context_efl.cc | 1 + .../geolocation_permission_context_efl.h | 20 ++++--- .../browser/javascript_dialog_manager_efl.cc | 11 +--- .../browser/javascript_dialog_manager_efl.h | 2 - .../browser/javascript_modal_dialog_efl.cc | 8 +-- .../browser/javascript_modal_dialog_efl.h | 3 - .../notification/notification_controller_efl.cc | 4 +- .../notification/notification_controller_efl.h | 5 +- .../browser/permission_manager_efl.cc | 2 + .../browser/permission_manager_efl.h | 19 ++++--- .../browser/vibration/vibration_provider_client.h | 1 + .../ewk/efl_integration/browser_context_efl.cc | 2 +- .../ewk/efl_integration/browser_context_efl.h | 11 +++- .../ewk/efl_integration/browser_main_parts_efl.h | 1 + .../ewk/efl_integration/common/version_info.h | 1 + .../efl_integration/content_browser_client_efl.cc | 9 --- .../efl_integration/content_browser_client_efl.h | 6 +- .../efl_integration/context_menu_controller_efl.cc | 4 +- tizen_src/ewk/efl_integration/cookie_manager.cc | 48 ++++++++-------- tizen_src/ewk/efl_integration/cookie_manager.h | 4 +- tizen_src/ewk/efl_integration/eweb_context.cc | 7 ++- tizen_src/ewk/efl_integration/eweb_view.cc | 4 +- tizen_src/ewk/efl_integration/eweb_view.h | 2 +- .../ewk/efl_integration/pkgconfig/chromium-ewk.pc | 2 +- .../private/ewk_geolocation_private.cc | 13 ++--- .../private/ewk_geolocation_private.h | 9 +-- .../private/ewk_notification_private.cc | 19 +++---- .../private/ewk_notification_private.h | 11 ++-- tizen_src/ewk/efl_integration/public/ewk_view.cc | 2 +- .../renderer/render_process_observer_efl.cc | 15 +---- .../renderer/render_process_observer_efl.h | 3 - .../renderer/render_view_observer_efl.cc | 14 ++--- .../url_request_context_getter_efl.cc | 8 +-- .../url_request_context_getter_efl.h | 4 +- tizen_src/ewk/efl_webview_app/chromium-efl.xml | 2 +- .../ewk/efl_webview_app/chromium-efl_v3.0.xml | 2 +- tizen_src/ewk/efl_webview_app/ubrowser.xml | 2 +- tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml | 2 +- tizen_src/ewk/ubrowser/ubrowser.xml | 2 +- tizen_src/packaging/chromium-efl-libs.spec | 4 +- tizen_src/packaging/chromium-efl.spec | 4 +- tizen_src/packaging/crosswalk-bin.spec | 2 +- tizen_src/packaging/manifest.xml | 2 +- 65 files changed, 226 insertions(+), 361 deletions(-) delete mode 100644 tizen_src/chromium_impl/content/child/npapi/webplugin_delegate_impl_efl.cc delete mode 100644 tizen_src/chromium_impl/content/content_child_efl.gypi delete mode 100644 tizen_src/chromium_impl/ui/ozone/media_ozone_platform_efl.cc mode change 100755 => 100644 tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.cc diff --git a/tizen_src/DEPS.efl b/tizen_src/DEPS.efl index 270d87a..2b0623e 100644 --- a/tizen_src/DEPS.efl +++ b/tizen_src/DEPS.efl @@ -26,7 +26,7 @@ khronos_cl_api_rev = '6f4be98d10f03ce2b12c769cd9835c73a441c00f' # SVN revision while Blink is still in SVN. blink_upstream_rev = '191638' #TODO(TK) : need to update revision number -efl_integration_branch = 'origin/dev/m50_2661' +efl_integration_branch = 'origin/dev/m51_2704' ct_git = 'ssh://165.213.202.130:29418/webplatform' crosswalk_git = 'https://github.com/crosswalk-project' diff --git a/tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.cc b/tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.cc index b2ae6b3..afb566e 100644 --- a/tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.cc +++ b/tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.cc @@ -21,7 +21,6 @@ JavaScriptDialogManagerEfl::~JavaScriptDialogManagerEfl() { void JavaScriptDialogManagerEfl::RunJavaScriptDialog( content::WebContents* web_contents, const GURL& origin_url, - const std::string& accept_lang, content::JavaScriptMessageType type, const base::string16& message_text, const base::string16& default_prompt_text, @@ -55,17 +54,16 @@ void JavaScriptDialogManagerEfl::RunJavaScriptDialog( void JavaScriptDialogManagerEfl::RunBeforeUnloadDialog( content::WebContents* web_contents, - const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); CancelActiveAndPendingDialogs(web_contents); - open_dialogs_[web_contents] = new JavaScriptModalDialogEfl(web_contents, - JavaScriptModalDialogEfl::NAVIGATION, + open_dialogs_[web_contents] = new JavaScriptModalDialogEfl( + web_contents, JavaScriptModalDialogEfl::NAVIGATION, base::UTF8ToUTF16( std::string(dgettext("WebKit", "IDS_WEBVIEW_BEFOREUNLOAD_MESSAGE"))), - message_text, callback); + base::string16(), callback); } bool JavaScriptDialogManagerEfl::HandleJavaScriptDialog( diff --git a/tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.h b/tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.h index b3aea2c..4e668e1 100644 --- a/tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.h +++ b/tizen_src/chromium_impl/components/js_dialogs_efl/javascript_dialog_manager_efl.h @@ -28,7 +28,6 @@ class JavaScriptDialogManagerEfl: public JavaScriptDialogManager { void RunJavaScriptDialog( content::WebContents* web_contents, const GURL& origin_url, - const std::string& accept_lang, content::JavaScriptMessageType type, const base::string16& message_text, const base::string16& default_prompt_text, @@ -36,7 +35,6 @@ class JavaScriptDialogManagerEfl: public JavaScriptDialogManager { bool* did_suppress_message) override; void RunBeforeUnloadDialog( content::WebContents* web_contents, - const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) override; bool HandleJavaScriptDialog( diff --git a/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc b/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc index bf2396d..7654089 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc +++ b/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc @@ -7,10 +7,11 @@ #include "cc/raster/single_thread_task_graph_runner.h" #include "cc/surfaces/onscreen_display_client.h" #include "cc/surfaces/surface_display_output_surface.h" +#include "content/browser/compositor/gl_helper.h" #include "content/browser/compositor/mailbox_output_surface_efl.h" #include "content/browser/gpu/browser_gpu_channel_host_factory.h" #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" -#include "content/common/gpu/client/gl_helper.h" +#include "content/browser/gpu/gpu_surface_tracker.h" #include "content/common/host_shared_bitmap_manager.h" #include "ui/compositor/reflector.h" @@ -30,16 +31,21 @@ class FakeReflector : public ui::Reflector { static scoped_ptr CreateGpuProcessViewContext( - const scoped_refptr& gpu_channel_host, - const blink::WebGraphicsContext3D::Attributes attributes, + const scoped_refptr& gpu_channel_host, + const gpu::gles2::ContextCreationAttribHelper attributes, int surface_id) { DCHECK(gpu_channel_host.get()); + GpuSurfaceTracker* tracker = GpuSurfaceTracker::Get(); + gpu::SurfaceHandle surface_handle = + surface_id ? tracker->GetSurfaceHandle(surface_id) + : gpu::kNullSurfaceHandle; GURL url("chrome://gpu/Compositor::createContext3D"); - bool lose_context_when_out_of_memory = true; + bool share_resources = true; + bool automatic_flushes = false; return make_scoped_ptr(new WebGraphicsContext3DCommandBufferImpl( - surface_id, url, gpu_channel_host.get(), attributes, - lose_context_when_out_of_memory, + surface_handle, url, gpu_channel_host.get(), attributes, + gfx::PreferIntegratedGpu, share_resources, automatic_flushes, WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), NULL)); } @@ -57,24 +63,26 @@ ContextFactoryEfl::~ContextFactoryEfl() { void ContextFactoryEfl::CreateOutputSurface( base::WeakPtr compositor) { - blink::WebGraphicsContext3D::Attributes attrs; - attrs.depth = false; - attrs.stencil = false; - attrs.antialias = false; - attrs.shareResources = true; - attrs.noAutomaticFlushes = true; + gpu::gles2::ContextCreationAttribHelper attrs; + attrs.alpha_size = -1; + attrs.depth_size = 0; + attrs.stencil_size = 0; + attrs.samples = 0; + attrs.sample_buffers = 0; + attrs.bind_generates_resource = false; + attrs.lose_context_when_out_of_memory = true; scoped_refptr context_provider; content::BrowserGpuChannelHostFactory* factory = content::BrowserGpuChannelHostFactory::instance(); content::CauseForGpuLaunch cause = content:: CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; - scoped_refptr gpu_channel_host( + scoped_refptr gpu_channel_host( factory->EstablishGpuChannelSync(cause)); if (gpu_channel_host.get() && !gpu_channel_host->IsLost()) { context_provider = content::ContextProviderCommandBuffer::Create( CreateGpuProcessViewContext(gpu_channel_host, attrs, 0), - content::BROWSER_COMPOSITOR_ONSCREEN_CONTEXT); + content::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); } if (!context_provider.get()) { LOG(ERROR) << "Failed to create 3D context for compositor."; @@ -114,19 +122,21 @@ ContextFactoryEfl::SharedMainThreadContextProvider() { if (shared_main_thread_contexts_.get()) return shared_main_thread_contexts_; - blink::WebGraphicsContext3D::Attributes attrs; - attrs.depth = false; - attrs.stencil = false; - attrs.antialias = false; - attrs.shareResources = true; - attrs.noAutomaticFlushes = true; + gpu::gles2::ContextCreationAttribHelper attrs; + attrs.alpha_size = -1; + attrs.depth_size = 0; + attrs.stencil_size = 0; + attrs.samples = 0; + attrs.sample_buffers = 0; + attrs.bind_generates_resource = false; + attrs.lose_context_when_out_of_memory = true; scoped_refptr context_provider; content::BrowserGpuChannelHostFactory* factory = content::BrowserGpuChannelHostFactory::instance(); content::CauseForGpuLaunch cause = content:: CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; - scoped_refptr gpu_channel_host( + scoped_refptr gpu_channel_host( factory->EstablishGpuChannelSync(cause)); if (gpu_channel_host.get() && !gpu_channel_host->IsLost()) { shared_main_thread_contexts_ = diff --git a/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc b/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc index 838977e..c83065d 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc +++ b/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc @@ -245,10 +245,10 @@ bool MailboxOutputSurfaceEfl::BindToClient(cc::OutputSurfaceClient* client) { return true; } -CommandBufferProxyImpl* MailboxOutputSurfaceEfl::GetCommandBufferProxy() { +gpu::CommandBufferProxyImpl* MailboxOutputSurfaceEfl::GetCommandBufferProxy() { ContextProviderCommandBuffer* provider_command_buffer = static_cast(context_provider_.get()); - CommandBufferProxyImpl* command_buffer_proxy = + gpu::CommandBufferProxyImpl* command_buffer_proxy = provider_command_buffer->GetCommandBufferProxy(); DCHECK(command_buffer_proxy); return command_buffer_proxy; diff --git a/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h b/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h index c7f9641..aa861b6 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h +++ b/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h @@ -9,8 +9,8 @@ #include "cc/output/gl_frame_data.h" #include "cc/output/output_surface.h" #include "cc/resources/resource_format.h" -#include "content/common/gpu/client/command_buffer_proxy_impl.h" #include "content/common/gpu/client/context_provider_command_buffer.h" +#include "gpu/ipc/client/command_buffer_proxy_impl.h" #include "ui/gfx/swap_result.h" #include "ui/compositor/compositor.h" @@ -39,7 +39,7 @@ class MailboxOutputSurfaceEfl : public cc::OutputSurface { private: void OnSwapAck(scoped_ptr gl_frame_data); void DrawTexture(scoped_ptr gl_frame_data); - CommandBufferProxyImpl* GetCommandBufferProxy(); + gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); void OnSwapBuffersCompleted(const std::vector& latency_info, gfx::SwapResult result); @@ -73,4 +73,4 @@ class MailboxOutputSurfaceEfl : public cc::OutputSurface { } // namespace content -#endif // CONTENT_BROWSER_COMPOSITOR_MAILBOX_OUTPUT_SURFACE_EFL_H_ \ No newline at end of file +#endif // CONTENT_BROWSER_COMPOSITOR_MAILBOX_OUTPUT_SURFACE_EFL_H_ diff --git a/tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.cc b/tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.cc index 94061bc..bc2d246 100644 --- a/tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.cc +++ b/tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.cc @@ -244,7 +244,6 @@ void DataFetcherImplTizen::onAccelerationChanged(sensor_h sensor, void DataFetcherImplTizen::SetOrientationBufferReadyStatus(bool ready) { device_orientation_buffer_->seqlock.WriteBegin(); device_orientation_buffer_->data.absolute = ready; - device_orientation_buffer_->data.hasAbsolute = ready; device_orientation_buffer_->data.allAvailableSensorsAreActive = ready; device_orientation_buffer_->seqlock.WriteEnd(); is_orientation_buffer_ready_ = ready; 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 9a13cd0..61728f8 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 @@ -22,11 +22,11 @@ #include "base/thread_task_runner_handle.h" #include "base/logging.h" #include "base/strings/utf_string_conversions.h" -#include "content/common/view_messages.h" -#include "content/browser/compositor/resize_lock.h" +#include "content/browser/compositor/gl_helper.h" #include "content/browser/gpu/browser_gpu_channel_host_factory.h" #include "content/browser/gpu/compositor_util.h" #include "content/browser/renderer_host/render_widget_host_impl.h" +#include "content/browser/renderer_host/resize_lock.h" #include "content/browser/renderer_host/ui_events_helper.h" #include "content/browser/renderer_host/im_context_efl.h" #include "content/browser/renderer_host/edge_effect.h" @@ -36,11 +36,10 @@ #include "content/browser/renderer_host/input/web_input_event_util.h" #include "content/browser/renderer_host/render_view_host_impl.h" #include "content/browser/gpu/gpu_process_host.h" -#include "content/common/gpu/client/gl_helper.h" #include "content/common/input/did_overscroll_params.h" #include "content/common/input_messages.h" -#include "content/common/gpu/gpu_messages.h" #include "content/common/cursors/webcursor_efl.h" +#include "content/common/view_messages.h" #include "content/gpu/shared_mailbox_manager.h" #include "content/public/browser/render_widget_host_view_frame_subscriber.h" #include "content/public/browser/screen_orientation_dispatcher_host.h" @@ -50,6 +49,8 @@ #include "content/public/browser/render_process_host.h" #include "content/public/common/content_switches.h" #include "gpu/command_buffer/service/mailbox_manager.h" +#include "gpu/ipc/common/gpu_messages.h" +#include "media/base/video_frame.h" #include "media/base/video_util.h" #include "skia/ext/image_operations.h" #include "third_party/WebKit/public/web/WebInputEvent.h" @@ -782,10 +783,6 @@ void RenderWidgetHostViewEfl::OnDidHandleKeyEvent( im_context_->HandleKeyEvent(processed); } -void RenderWidgetHostViewEfl::MovePluginWindows( - const std::vector& moves) { -} - void RenderWidgetHostViewEfl::UpdateCursor(const WebCursor& webcursor) { if (is_loading_) { // Setting native Loading cursor @@ -818,8 +815,7 @@ void RenderWidgetHostViewEfl::SetIsLoading(bool is_loading) { } void RenderWidgetHostViewEfl::TextInputStateChanged( - const ViewHostMsg_TextInputState_Params& params) { - + const TextInputState& params) { if (!params.show_ime_if_needed) { WebContentsImpl* wci = static_cast(&web_contents_); WebContentsViewEfl* wcve = static_cast(wci->GetView()); @@ -1228,20 +1224,9 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo( yuv_readback_pipeline->scaler()->SrcSubrect() != result_rect || yuv_readback_pipeline->scaler()->DstSize() != region_in_frame.size()) { GLHelper::ScalerQuality quality = GLHelper::SCALER_QUALITY_FAST; - std::string quality_switch = switches::kTabCaptureDownscaleQuality; // If we're scaling up, we can use the "best" quality. if (result_rect.size().width() < region_in_frame.size().width() && result_rect.size().height() < region_in_frame.size().height()) - quality_switch = switches::kTabCaptureUpscaleQuality; - - std::string switch_value = - base::CommandLine::ForCurrentProcess()-> - GetSwitchValueASCII(quality_switch); - if (switch_value == "fast") - quality = GLHelper::SCALER_QUALITY_FAST; - else if (switch_value == "good") - quality = GLHelper::SCALER_QUALITY_GOOD; - else if (switch_value == "best") quality = GLHelper::SCALER_QUALITY_BEST; rwhvefl->yuv_readback_pipeline_.reset( 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 932ff67..a0a5371 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 @@ -25,9 +25,9 @@ #include "cc/resources/single_release_callback.h" #include "cc/resources/texture_mailbox.h" #include "content/browser/accessibility/browser_accessibility_manager.h" -#include "content/browser/compositor/delegated_frame_host.h" #include "content/browser/compositor/image_transport_factory.h" #include "content/browser/compositor/owned_mailbox.h" +#include "content/browser/renderer_host/delegated_frame_host.h" #include "content/browser/renderer_host/render_widget_host_view_base.h" #include "content/browser/selection/selection_controller_efl.h" #include "gpu/command_buffer/common/mailbox.h" @@ -50,7 +50,7 @@ typedef EvasGLint64 GLint64; typedef EvasGLuint64 GLuint64; #endif -struct ViewHostMsg_TextInputState_Params; +struct TextInputState; namespace ui { class Compositor; @@ -108,14 +108,17 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl void UnlockMouse() override; void Focus() override; bool HasFocus() const override; - void MovePluginWindows( - const std::vector&) override; void UpdateCursor(const WebCursor&) override; void SetIsLoading(bool) override; +#if defined(EWK_BRINGUP) + // [M51_2704] TextInputStateChanged() should be removed and its functionality + // should be moved/implemented in appropriate place based on + // upstream commit : https://codereview.chromium.org/1652483002, + // as it may introduce regression. // Updates the state of the input method attached to the view. - void TextInputStateChanged( - const ViewHostMsg_TextInputState_Params& params) override; + void TextInputStateChanged(const TextInputState& params); +#endif void OnTextInputInFormStateChanged(bool is_in_form_tag); 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 a9a121f..dd5fcd3 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 @@ -231,9 +231,8 @@ void WebContentsImplEfl::HandleNewWindowRequest( int route_id, int main_frame_route_id, const ViewHostMsg_CreateWindow_Params& params, - SessionStorageNamespace* session_storage_namespace, + scoped_refptr session_storage_namespace, bool create) { - if (create) { scoped_refptr ssn = session_storage_namespace; WebContentsEflDelegate::WebContentsCreateCallback callback = base::Bind( @@ -254,7 +253,7 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate( int route_id, int main_frame_route_id, const ViewHostMsg_CreateWindow_Params& params, - SessionStorageNamespace* session_storage_namespace, + scoped_refptr session_storage_namespace, void* platform_data) { bool is_guest = BrowserPluginGuest::IsGuest(this); scoped_refptr site_instance = @@ -310,8 +309,7 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate( NOTREACHED(); } new_contents->GetController().SetSessionStorageNamespace( - partition_id, - session_storage_namespace); + partition_id, session_storage_namespace.get()); // Added for EFL port new_contents->platform_data_ = platform_data; diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h index 38f6b5d..fc5fc67 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h @@ -5,6 +5,7 @@ #ifndef WEB_CONTENTS_IMPL_EFL_H_ #define WEB_CONTENTS_IMPL_EFL_H_ +#include "base/memory/ref_counted.h" #include "content/browser/web_contents/web_contents_impl.h" #include "content/common/content_export.h" @@ -52,7 +53,7 @@ class CONTENT_EXPORT WebContentsImplEfl : public WebContentsImpl { int route_id, int main_frame_route_id, const ViewHostMsg_CreateWindow_Params& params, - SessionStorageNamespace* session_storage_namespace, + scoped_refptr session_storage_namespace, bool create); WebContents* HandleNewWebContentsCreate( @@ -60,7 +61,7 @@ class CONTENT_EXPORT WebContentsImplEfl : public WebContentsImpl { int route_id, int main_frame_route_id, const ViewHostMsg_CreateWindow_Params& params, - SessionStorageNamespace* session_storage_namespace, + scoped_refptr session_storage_namespace, void* platform_data); bool UpdateTitleForEntry(NavigationEntryImpl* entry, 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 43211db..ccb65d9 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 @@ -8,6 +8,7 @@ #include +#include "base/memory/scoped_ptr.h" #include "content/browser/renderer_host/render_view_host_delegate_view.h" #include "content/browser/web_contents/web_contents_view.h" #include "content/common/content_export.h" diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h index 3332d7f..a110905 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h @@ -9,6 +9,7 @@ #include #include "base/files/file_path.h" +#include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/WebKit/public/web/WebDragOperation.h" diff --git a/tizen_src/chromium_impl/content/child/npapi/webplugin_delegate_impl_efl.cc b/tizen_src/chromium_impl/content/child/npapi/webplugin_delegate_impl_efl.cc deleted file mode 100644 index a700e7c..0000000 --- a/tizen_src/chromium_impl/content/child/npapi/webplugin_delegate_impl_efl.cc +++ /dev/null @@ -1,66 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "content/child/npapi/webplugin_delegate_impl.h" - -#include "content/child/npapi/plugin_instance.h" -#include "content/common/cursors/webcursor.h" - -using blink::WebInputEvent; - -namespace content { - -WebPluginDelegateImpl::WebPluginDelegateImpl(WebPlugin* plugin, - PluginInstance* instance) { -} - -WebPluginDelegateImpl::~WebPluginDelegateImpl() { -} - -bool WebPluginDelegateImpl::PlatformInitialize() { - return true; -} - -void WebPluginDelegateImpl::PlatformDestroyInstance() { - // Nothing to do here. -} - -void WebPluginDelegateImpl::Paint(SkCanvas* canvas, const gfx::Rect& rect) { -} - -bool WebPluginDelegateImpl::WindowedCreatePlugin() { - return true; -} - -void WebPluginDelegateImpl::WindowedDestroyWindow() { -} - -bool WebPluginDelegateImpl::WindowedReposition( - const gfx::Rect& window_rect, - const gfx::Rect& clip_rect) { - return true; -} - -void WebPluginDelegateImpl::WindowedSetWindow() { -} - -void WebPluginDelegateImpl::WindowlessUpdateGeometry( - const gfx::Rect& window_rect, - const gfx::Rect& clip_rect) { -} - -void WebPluginDelegateImpl::WindowlessPaint(gfx::NativeDrawingContext context, - const gfx::Rect& damage_rect) { -} - -bool WebPluginDelegateImpl::PlatformSetPluginHasFocus(bool focused) { - return true; -} - -bool WebPluginDelegateImpl::PlatformHandleInputEvent( - const WebInputEvent& event, WebCursor::CursorInfo* cursor_info) { - return false; -} - -} // namespace content diff --git a/tizen_src/chromium_impl/content/common/paths_efl.cc b/tizen_src/chromium_impl/content/common/paths_efl.cc index e1940ee..b7b838a 100644 --- a/tizen_src/chromium_impl/content/common/paths_efl.cc +++ b/tizen_src/chromium_impl/content/common/paths_efl.cc @@ -7,11 +7,12 @@ #include #include "base/environment.h" -#include "base/path_service.h" #include "base/files/file_path.h" #include "base/files/file_util.h" +#include "base/memory/free_deleter.h" #include "base/memory/scoped_ptr.h" #include "base/nix/xdg_util.h" +#include "base/path_service.h" #include "build/tizen_version.h" #if defined(OS_TIZEN) diff --git a/tizen_src/chromium_impl/content/content_child_efl.gypi b/tizen_src/chromium_impl/content/content_child_efl.gypi deleted file mode 100644 index 1ef5697..0000000 --- a/tizen_src/chromium_impl/content/content_child_efl.gypi +++ /dev/null @@ -1,9 +0,0 @@ -# Copyright (c) 2015 Samsung Electronics. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'sources': [ - 'child/npapi/webplugin_delegate_impl_efl.cc', - ], -} diff --git a/tizen_src/chromium_impl/content/content_efl.gypi b/tizen_src/chromium_impl/content/content_efl.gypi index bdea8ac..b46bafb 100644 --- a/tizen_src/chromium_impl/content/content_efl.gypi +++ b/tizen_src/chromium_impl/content/content_efl.gypi @@ -86,7 +86,6 @@ # this implicitly means component="shared_library" 'includes': [ 'content_browser_efl.gypi', - 'content_child_efl.gypi', 'content_common_efl.gypi', 'content_gpu_efl.gypi', 'content_renderer_efl.gypi', @@ -117,12 +116,6 @@ ] }], - ['_target_name=="content_child"', { - 'includes': [ - 'content_child_efl.gypi' - ] - }], - ['_target_name=="content_shell_lib"', { 'sources': [ 'shell/browser/shell_efl.cc', diff --git a/tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc b/tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc index f1aab95..a0c6e02 100644 --- a/tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc +++ b/tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "content/common/gpu/gpu_host_messages.h" +#include "content/common/gpu_host_messages.h" #include "content/gpu/gpu_process.h" #include "content/gpu/shared_mailbox_manager.h" #include "ui/gl/gl_shared_context_efl.h" @@ -22,10 +22,14 @@ namespace content { struct GpuChildThreadEfl : public content::GpuChildThread { - explicit GpuChildThreadEfl(const content::InProcessChildThreadParams& params, + explicit GpuChildThreadEfl(const gpu::GpuPreferences& gpu_preferences, + const content::InProcessChildThreadParams& params, GpuMemoryBufferFactory* gpu_memory_buffer_factory, gpu::SyncPointManager* sync_point_manager) - : GpuChildThread(params, gpu_memory_buffer_factory, sync_point_manager) { } + : GpuChildThread(gpu_preferences, + params, + gpu_memory_buffer_factory, + sync_point_manager) {} bool OnControlMessageReceived(const IPC::Message& msg) override { bool handled = true; @@ -40,8 +44,8 @@ struct GpuChildThreadEfl : public content::GpuChildThread { return GpuChildThread::OnControlMessageReceived(msg); } - void OnInitialize() { - GpuChildThread::OnInitialize(); + void OnInitialize(const gpu::GpuPreferences& preferences) { + GpuChildThread::OnInitialize(preferences); // Override GpuChannelManager's default shared group and mailbox instances. gpu_channel_manager_->share_group_ = @@ -52,23 +56,28 @@ struct GpuChildThreadEfl : public content::GpuChildThread { }; struct InProcessGpuThreadEfl : public content::InProcessGpuThread { - - explicit InProcessGpuThreadEfl(const content::InProcessChildThreadParams& params, - gpu::SyncPointManager* sync_point_manager_override) - : InProcessGpuThread(params, sync_point_manager_override) { } + explicit InProcessGpuThreadEfl( + const content::InProcessChildThreadParams& params, + const gpu::GpuPreferences& gpu_preferences, + gpu::SyncPointManager* sync_point_manager_override) + : InProcessGpuThread(params, + gpu_preferences, + sync_point_manager_override) {} void Init() override { gpu_process_ = new content::GpuProcess(base::ThreadPriority::NORMAL); // The process object takes ownership of the thread object, so do not // save and delete the pointer. - gpu_process_->set_main_thread(new GpuChildThreadEfl(params_, - gpu_memory_buffer_factory_.get(), - sync_point_manager_override_)); + gpu_process_->set_main_thread(new GpuChildThreadEfl( + gpu_preferences_, params_, gpu_memory_buffer_factory_.get(), + sync_point_manager_override_)); } }; -base::Thread* CreateInProcessGpuThread(const content::InProcessChildThreadParams& params) { - return new InProcessGpuThreadEfl(params, nullptr); +base::Thread* CreateInProcessGpuThread( + const content::InProcessChildThreadParams& params, + const gpu::GpuPreferences& gpu_preferences) { + return new InProcessGpuThreadEfl(params, gpu_preferences, nullptr); } } // namespace content diff --git a/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc b/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc index 68994b6..ba81742 100644 --- a/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc +++ b/tizen_src/chromium_impl/content/shell/browser/shell_efl.cc @@ -38,8 +38,7 @@ class Shell::Impl { elm_win_resize_object_add(window, box); evas_object_show(box); - if (!base::CommandLine::ForCurrentProcess()-> - HasSwitch(switches::kRunLayoutTest)) + if (!switches::IsRunLayoutTestSwitchPresent()) CreateURLBar(box); Evas_Object* view = static_cast( @@ -229,8 +228,7 @@ bool Shell::PlatformHandleContextMenu( JavaScriptDialogManager* Shell::GetJavaScriptDialogManager(WebContents* source) { if (!dialog_manager_) { - const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); - if (command_line.HasSwitch(switches::kRunLayoutTest)) { + if (switches::IsRunLayoutTestSwitchPresent()) { dialog_manager_.reset(new LayoutTestJavaScriptDialogManager); } else { dialog_manager_.reset(new JavaScriptDialogManagerEfl); diff --git a/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc b/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc index 8125a26..4faa4ca 100644 --- a/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc +++ b/tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc @@ -100,8 +100,7 @@ ShellWebContentsViewDelegate::~ShellWebContentsViewDelegate() { void ShellWebContentsViewDelegate::ShowContextMenu( RenderFrameHost* render_frame_host, const ContextMenuParams& params) { - if (base::CommandLine::ForCurrentProcess()-> - HasSwitch(switches::kRunLayoutTest)) + if (switches::IsRunLayoutTestSwitchPresent()) return; if (g_context_menu) { diff --git a/tizen_src/chromium_impl/ui/ozone/media_ozone_platform_efl.cc b/tizen_src/chromium_impl/ui/ozone/media_ozone_platform_efl.cc deleted file mode 100644 index 1b307e7..0000000 --- a/tizen_src/chromium_impl/ui/ozone/media_ozone_platform_efl.cc +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2015 Samsung Electronics. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "media/ozone/media_ozone_platform.h" - -namespace media { - -namespace { - -class MediaOzonePlatformEfl : public MediaOzonePlatform { - public: - MediaOzonePlatformEfl() {} - ~MediaOzonePlatformEfl() override {} - - private: - DISALLOW_COPY_AND_ASSIGN(MediaOzonePlatformEfl); -}; - -} // namespace - -MediaOzonePlatform* CreateMediaOzonePlatformEfl() { - return new MediaOzonePlatformEfl; -} - -} // namespace media diff --git a/tizen_src/chromium_impl/ui/ozone/ozone_efl.gyp b/tizen_src/chromium_impl/ui/ozone/ozone_efl.gyp index 889b13f..b5e4185 100644 --- a/tizen_src/chromium_impl/ui/ozone/ozone_efl.gyp +++ b/tizen_src/chromium_impl/ui/ozone/ozone_efl.gyp @@ -31,7 +31,6 @@ 'sources': [ 'client_native_pixmap_factory_efl.h', 'client_native_pixmap_factory_efl.cc', - 'media_ozone_platform_efl.cc', 'ozone_platform_efl.h', 'ozone_platform_efl.cc', 'surface_factory_efl.h', 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 f27cd2b..72f6f5a 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 @@ -12,6 +12,7 @@ using web_contents_utils::WebContentsFromFrameID; using web_contents_utils::WebViewFromWebContents; +using namespace blink::mojom; namespace content { diff --git a/tizen_src/ewk/efl_integration/browser/geolocation/geolocation_permission_context_efl.h b/tizen_src/ewk/efl_integration/browser/geolocation/geolocation_permission_context_efl.h index caf1eb8..d0995aa 100644 --- a/tizen_src/ewk/efl_integration/browser/geolocation/geolocation_permission_context_efl.h +++ b/tizen_src/ewk/efl_integration/browser/geolocation/geolocation_permission_context_efl.h @@ -7,7 +7,7 @@ #include "base/callback.h" #include "base/memory/weak_ptr.h" -#include "content/public/common/permission_status.mojom.h" +#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h" class GURL; @@ -21,10 +21,11 @@ class GeolocationPermissionContextEfl final { // The renderer is requesting permission to use Geolocation. // When the answer to a permission request has been determined, |callback| // should be called with the result. - void RequestPermission(int render_process_id, - int render_frame_id, - const GURL& requesting_frame, - base::Callback callback) const; + void RequestPermission( + int render_process_id, + int render_frame_id, + const GURL& requesting_frame, + base::Callback callback) const; // The renderer is cancelling a pending permission request. void CancelPermissionRequest(int render_process_id, @@ -33,10 +34,11 @@ class GeolocationPermissionContextEfl final { const GURL& requesting_frame) const; private: - void RequestPermissionOnUIThread(int render_process_id, - int render_frame_id, - const GURL& requesting_frame, - base::Callback callback) const; + void RequestPermissionOnUIThread( + int render_process_id, + int render_frame_id, + const GURL& requesting_frame, + base::Callback callback) const; mutable base::WeakPtrFactory weak_ptr_factory_; diff --git a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.cc b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.cc index 8ab4ad7..61374ac 100644 --- a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.cc @@ -77,7 +77,6 @@ JavaScriptDialogManagerEfl::~JavaScriptDialogManagerEfl() { void JavaScriptDialogManagerEfl::RunJavaScriptDialog(content::WebContents* web_contents, const GURL& origin_url, - const std::string& accept_lang, content::JavaScriptMessageType javascript_message_type, const base::string16& message_text, const base::string16& default_prompt_text, @@ -120,7 +119,6 @@ void JavaScriptDialogManagerEfl::RunJavaScriptDialog(content::WebContents* web_c dialog_.reset(JavaScriptModalDialogEfl::CreateDialog(web_contents, origin_url, - accept_lang, type, message_text, default_prompt_text, @@ -156,7 +154,6 @@ void JavaScriptDialogManagerEfl::SetPopupSize(int width, int height) { } void JavaScriptDialogManagerEfl::RunBeforeUnloadDialog(content::WebContents* web_contents, - const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); @@ -166,12 +163,8 @@ void JavaScriptDialogManagerEfl::RunBeforeUnloadDialog(content::WebContents* web wv->SmartCallback().call(0); dialog_.reset(JavaScriptModalDialogEfl::CreateDialog( - web_contents, - GURL(), - std::string(), - JavaScriptModalDialogEfl::NAVIGATION, + web_contents, GURL(), JavaScriptModalDialogEfl::NAVIGATION, base::UTF8ToUTF16( std::string(dgettext("WebKit", "IDS_WEBVIEW_BEFOREUNLOAD_MESSAGE"))), - message_text, - callback)); + base::string16(), callback)); } diff --git a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h index fc0b94a..8b514bc 100644 --- a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h +++ b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h @@ -48,7 +48,6 @@ class JavaScriptDialogManagerEfl: public content::JavaScriptDialogManager { virtual void RunJavaScriptDialog( content::WebContents* web_contents, const GURL& origin_url, - const std::string& accept_lang, content::JavaScriptMessageType javascript_message_type, const base::string16& message_text, const base::string16& default_prompt_text, @@ -56,7 +55,6 @@ class JavaScriptDialogManagerEfl: public content::JavaScriptDialogManager { bool* did_suppress_message) override; virtual void RunBeforeUnloadDialog(content::WebContents* web_contents, - const base::string16& message_text, bool is_reload, const DialogClosedCallback& callback) override; diff --git a/tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.cc b/tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.cc old mode 100755 new mode 100644 index 5ed201d..2550cca --- a/tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.cc @@ -19,13 +19,13 @@ using web_contents_utils::WebViewFromWebContents; //static JavaScriptModalDialogEfl* JavaScriptModalDialogEfl::CreateDialog(content::WebContents* web_contents, const GURL& origin_url, - const std::string& accept_lang, Type type, const base::string16& message_text, const base::string16& default_prompt_text, const content::JavaScriptDialogManager::DialogClosedCallback& callback) { - JavaScriptModalDialogEfl* dialog = new JavaScriptModalDialogEfl(web_contents, - origin_url, accept_lang, type, message_text, default_prompt_text, callback); + JavaScriptModalDialogEfl* dialog = + new JavaScriptModalDialogEfl(web_contents, origin_url, type, message_text, + default_prompt_text, callback); if (!dialog->ShowJavaScriptDialog()) { delete dialog; dialog = NULL; @@ -35,14 +35,12 @@ JavaScriptModalDialogEfl* JavaScriptModalDialogEfl::CreateDialog(content::WebCon JavaScriptModalDialogEfl::JavaScriptModalDialogEfl(content::WebContents* web_contents, const GURL& origin_url, - const std::string& accept_lang, Type type, const base::string16& message_text, const base::string16& default_prompt_text, const content::JavaScriptDialogManager::DialogClosedCallback& callback) : callback_(callback) , origin_url_(origin_url) - , accept_lang_(accept_lang) , label_(false) , type_(type) , message_text_(message_text) diff --git a/tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.h b/tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.h index ddb9101..a89a041 100644 --- a/tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.h +++ b/tizen_src/ewk/efl_integration/browser/javascript_modal_dialog_efl.h @@ -40,7 +40,6 @@ class JavaScriptModalDialogEfl { static void javascriptPopupResizeCallback(void *data, Evas *e, Evas_Object *obj, void *event_info); static JavaScriptModalDialogEfl* CreateDialog(content::WebContents* web_contents, const GURL& origin_url, - const std::string& accept_lang, Type type, const base::string16& message_text, const base::string16& default_prompt_text, @@ -57,7 +56,6 @@ class JavaScriptModalDialogEfl { private: JavaScriptModalDialogEfl(content::WebContents* web_contents, const GURL& origin_url, - const std::string& accept_lang, Type type, const base::string16& message_text, const base::string16& default_prompt_text, @@ -65,7 +63,6 @@ class JavaScriptModalDialogEfl { content::JavaScriptDialogManager::DialogClosedCallback callback_; GURL origin_url_; - std::string accept_lang_; bool label_; Type type_; base::string16 message_text_; 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 debeb4e..b5a37ad 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 @@ -14,6 +14,7 @@ #include "public/ewk_notification.h" using web_contents_utils::WebViewFromWebContents; +using namespace blink::mojom; namespace content { @@ -233,8 +234,7 @@ bool NotificationControllerEfl::IsNotificationPresent(const GURL& origin, void NotificationControllerEfl::RequestPermission( WebContents* web_contents, const GURL& requesting_frame, - const base::Callback& result_callback) { - + const base::Callback& result_callback) { EWebView* web_view = WebViewFromWebContents(web_contents); if (!web_view) { LOG(ERROR) << "Dropping PermissionNotification request caused by lack " 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 a26f214..355b807 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 @@ -15,8 +15,8 @@ #include "base/synchronization/lock.h" #include "content/public/browser/desktop_notification_delegate.h" #include "content/public/browser/platform_notification_service.h" -#include "content/public/common/permission_status.mojom.h" #include "public/ewk_notification.h" +#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h" #include "url/gurl.h" namespace content { @@ -76,7 +76,8 @@ class NotificationControllerEfl: public PlatformNotificationService { void RequestPermission(WebContents* web_contents, const GURL& requesting_frame, - const base::Callback& result_callback); + const base::Callback& result_callback); void SetNotificationCallbacks(Ewk_Notification_Show_Callback show_callback, Ewk_Notification_Cancel_Callback close_callback, void* user_data); 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 a2ca946..8db5612 100644 --- a/tizen_src/ewk/efl_integration/browser/permission_manager_efl.cc +++ b/tizen_src/ewk/efl_integration/browser/permission_manager_efl.cc @@ -17,6 +17,8 @@ #include "content/public/browser/web_contents.h" #include "ewk_global_data.h" +using namespace blink::mojom; + namespace content { PermissionManagerEfl::PermissionManagerEfl() { 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 1390d59..faa8a56 100644 --- a/tizen_src/ewk/efl_integration/browser/permission_manager_efl.h +++ b/tizen_src/ewk/efl_integration/browser/permission_manager_efl.h @@ -21,18 +21,20 @@ class CONTENT_EXPORT PermissionManagerEfl : public PermissionManager { PermissionType permission, content::RenderFrameHost* render_frame_host, const GURL& requesting_origin, - const base::Callback& callback) override; + const base::Callback& callback) + override; int RequestPermissions( const std::vector& permission, RenderFrameHost* render_frame_host, const GURL& requesting_origin, - const base::Callback&)>& callback) override; + const base::Callback< + void(const std::vector&)>& callback) + override; void CancelPermissionRequest(int request_id) override; - PermissionStatus GetPermissionStatus( + blink::mojom::PermissionStatus GetPermissionStatus( PermissionType permission, const GURL& requesting_origin, const GURL& embedding_origin) override; @@ -49,10 +51,11 @@ class CONTENT_EXPORT PermissionManagerEfl : public PermissionManager { // pair { requesting_origin, embedding_origin } changes. // Returns the subscription_id to be used to unsubscribe. int SubscribePermissionStatusChange( - PermissionType permission, - const GURL& requesting_origin, - const GURL& embedding_origin, - const base::Callback& callback) override; + PermissionType permission, + const GURL& requesting_origin, + const GURL& embedding_origin, + const base::Callback& callback) + override; void UnsubscribePermissionStatusChange(int subscription_id) override; diff --git a/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h b/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h index f541e0d..559855f 100644 --- a/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h +++ b/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h @@ -5,6 +5,7 @@ #ifndef Vibration_Provider_Client_h #define Vibration_Provider_Client_h +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "device/vibration/vibration_provider_client.h" #include "public/ewk_context.h" diff --git a/tizen_src/ewk/efl_integration/browser_context_efl.cc b/tizen_src/ewk/efl_integration/browser_context_efl.cc index c7ca857..8360bfb 100644 --- a/tizen_src/ewk/efl_integration/browser_context_efl.cc +++ b/tizen_src/ewk/efl_integration/browser_context_efl.cc @@ -128,7 +128,6 @@ BrowserContextEfl::BrowserContextEfl(EWebContext* web_context, bool incognito) PrefRegistrySimple* pref_registry = new PrefRegistrySimple(); pref_registry->RegisterBooleanPref(kAutofillEnabled, true); - pref_registry->RegisterBooleanPref(kAutofillWalletSyncExperimentEnabled, false); pref_registry->RegisterBooleanPref(kAutofillWalletImportEnabled, true); pref_registry->RegisterBooleanPref(kPasswordManagerSavingEnabled, true); @@ -143,6 +142,7 @@ BrowserContextEfl::BrowserContextEfl(EWebContext* web_context, bool incognito) autofill::PersonalDataManagerFactory::GetInstance() ->PersonalDataManagerAdd(this); #endif + BrowserContext::Initialize(this, GetPath()); } net::URLRequestContextGetter* BrowserContextEfl::GetRequestContext() { diff --git a/tizen_src/ewk/efl_integration/browser_context_efl.h b/tizen_src/ewk/efl_integration/browser_context_efl.h index 00e3dcb..c15a395 100644 --- a/tizen_src/ewk/efl_integration/browser_context_efl.h +++ b/tizen_src/ewk/efl_integration/browser_context_efl.h @@ -74,8 +74,6 @@ class BrowserContextEfl virtual net::URLRequestContextGetter* GetRequestContext() override; URLRequestContextGetterEfl* GetRequestContextEfl() { return request_context_getter_.get(); } - virtual net::URLRequestContextGetter* GetRequestContextForRenderProcess(int) override - { return GetRequestContext(); } virtual net::URLRequestContextGetter* GetMediaRequestContext() override { return GetRequestContext(); } virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(int) override @@ -119,6 +117,15 @@ class BrowserContextEfl net::URLRequestContextGetter* CreateRequestContext( content::ProtocolHandlerMap* protocol_handlers, URLRequestInterceptorScopedVector request_interceptors); + + virtual net::URLRequestContextGetter* CreateRequestContextForStoragePartition( + const base::FilePath& partition_path, + bool in_memory, + ProtocolHandlerMap* protocol_handlers, + URLRequestInterceptorScopedVector request_interceptors) override { + return nullptr; + } + void SetCertificate(const char* certificate_file); EWebContext* WebContext() const { return web_context_; } diff --git a/tizen_src/ewk/efl_integration/browser_main_parts_efl.h b/tizen_src/ewk/efl_integration/browser_main_parts_efl.h index 5570d60..ba98ac1 100644 --- a/tizen_src/ewk/efl_integration/browser_main_parts_efl.h +++ b/tizen_src/ewk/efl_integration/browser_main_parts_efl.h @@ -5,6 +5,7 @@ #ifndef CONTENT_BROWSER_MAIN_PARTS_EFL_H_ #define CONTENT_BROWSER_MAIN_PARTS_EFL_H_ +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "content/public/browser/browser_main_parts.h" diff --git a/tizen_src/ewk/efl_integration/common/version_info.h b/tizen_src/ewk/efl_integration/common/version_info.h index b813e24..7ac36a9 100644 --- a/tizen_src/ewk/efl_integration/common/version_info.h +++ b/tizen_src/ewk/efl_integration/common/version_info.h @@ -7,6 +7,7 @@ #include +#include "base/macros.h" #include "base/memory/scoped_ptr.h" #include "build/tizen_version.h" 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 e4f7c0f..8fab5b8 100644 --- a/tizen_src/ewk/efl_integration/content_browser_client_efl.cc +++ b/tizen_src/ewk/efl_integration/content_browser_client_efl.cc @@ -62,15 +62,6 @@ BrowserMainParts* ContentBrowserClientEfl::CreateBrowserMainParts( return browser_main_parts_efl_; } -net::URLRequestContextGetter* ContentBrowserClientEfl::CreateRequestContext( - BrowserContext* browser_context, - ProtocolHandlerMap* protocol_handlers, - URLRequestInterceptorScopedVector request_interceptors) { - return static_cast(browser_context) - ->CreateRequestContext(protocol_handlers, - std::move(request_interceptors)); -} - AccessTokenStore* ContentBrowserClientEfl::CreateAccessTokenStore() { return new AccessTokenStoreEfl(); } diff --git a/tizen_src/ewk/efl_integration/content_browser_client_efl.h b/tizen_src/ewk/efl_integration/content_browser_client_efl.h index 04d0945..632f3bb 100644 --- a/tizen_src/ewk/efl_integration/content_browser_client_efl.h +++ b/tizen_src/ewk/efl_integration/content_browser_client_efl.h @@ -5,6 +5,7 @@ #ifndef CONTENT_BROWSER_CLIENT_EFL #define CONTENT_BROWSER_CLIENT_EFL +#include "content/public/browser/browser_context.h" #include "content/public/browser/content_browser_client.h" #include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h" @@ -33,11 +34,6 @@ class ContentBrowserClientEfl: public ContentBrowserClient { virtual BrowserMainParts* CreateBrowserMainParts( const MainFunctionParams& parameters) override; - virtual net::URLRequestContextGetter* CreateRequestContext( - BrowserContext* browser_context, - ProtocolHandlerMap* protocol_handlers, - URLRequestInterceptorScopedVector request_interceptors) override; - virtual AccessTokenStore* CreateAccessTokenStore() override; #if defined(OS_TIZEN) virtual LocationProvider* OverrideSystemLocationProvider() override; 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 f4930cc..11775d7 100644 --- a/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc +++ b/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc @@ -515,7 +515,6 @@ void ContextMenuControllerEfl::OnDiskDownload( save_fail_dialog_.reset(JavaScriptModalDialogEfl::CreateDialog( &web_contents_, GURL(), - std::string(), JavaScriptModalDialogEfl::ALERT, base::UTF8ToUTF16(std::string(dgettext("WebKit", "IDS_WEBVIEW_POP_FAIL"))), base::string16(), @@ -543,7 +542,6 @@ void ContextMenuControllerEfl::OnDownloadUpdated(content::DownloadItem* download file_saved_dialog_.reset(JavaScriptModalDialogEfl::CreateDialog( &web_contents_, GURL(), - std::string(), JavaScriptModalDialogEfl::ALERT, base::UTF8ToUTF16(std::string(dgettext("WebKit", "IDS_WEBVIEW_POP_SAVED"))), base::string16(), @@ -812,7 +810,7 @@ void ContextMenuControllerEfl::MenuItemSelected(ContextMenuItemEfl* menu_item) break; } case EWK_CONTEXT_MENU_ITEM_TAG_RELOAD: { - webview_->ReloadIgnoringCache(); + webview_->ReloadBypassingCache(); break; } case EWK_CONTEXT_MENU_ITEM_TAG_COPY: { diff --git a/tizen_src/ewk/efl_integration/cookie_manager.cc b/tizen_src/ewk/efl_integration/cookie_manager.cc index c504e88..3997f07 100644 --- a/tizen_src/ewk/efl_integration/cookie_manager.cc +++ b/tizen_src/ewk/efl_integration/cookie_manager.cc @@ -87,12 +87,12 @@ void CookieManager::SetRequestContextGetter( void CookieManager::DeleteSessionCookiesOnIOThread() { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); - scoped_refptr cookie_store = GetCookieStore(); + scoped_ptr cookie_store = GetCookieStore(); if (cookie_store.get()) cookie_store->DeleteSessionCookiesAsync(base::Callback()); } -static void DeleteCookiesOnIOThread(scoped_refptr cookie_store, +static void DeleteCookiesOnIOThread(scoped_ptr cookie_store, const std::string& url, const std::string& cookie_name) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); @@ -117,13 +117,12 @@ void CookieManager::DeleteCookiesAsync(const std::string& url, const std::string& cookie_name) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - scoped_refptr cookie_store = GetCookieStore(); + scoped_ptr cookie_store = GetCookieStore(); if (cookie_store.get()) { - BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, - base::Bind(DeleteCookiesOnIOThread, - cookie_store, - url, - cookie_name)); + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, + base::Bind(DeleteCookiesOnIOThread, + base::Passed(std::move(cookie_store)), url, cookie_name)); } } @@ -169,17 +168,17 @@ void CookieManager::GetAcceptPolicyAsync(Ewk_Cookie_Manager_Policy_Async_Get_Cb void CookieManager::GetHostNamesWithCookiesAsync(AsyncHostnamesGetCb callback, void *data) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); host_callback_queue_.push(new EwkGetHostCallback(callback, data)); - scoped_refptr cookie_store = GetCookieStore(); + scoped_ptr cookie_store = GetCookieStore(); if (cookie_store.get()) { - BrowserThread::PostTask(BrowserThread::IO, - FROM_HERE, - base::Bind(&CookieManager::FetchCookiesOnIOThread, - GetSharedThis(), - cookie_store)); + BrowserThread::PostTask( + BrowserThread::IO, FROM_HERE, + base::Bind(&CookieManager::FetchCookiesOnIOThread, GetSharedThis(), + base::Passed(std::move(cookie_store)))); } } -void CookieManager::FetchCookiesOnIOThread(scoped_refptr cookie_store) { +void CookieManager::FetchCookiesOnIOThread( + scoped_ptr cookie_store) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (cookie_store.get()) { @@ -289,7 +288,7 @@ static void SignalGetCookieValueCompleted(base::WaitableEvent* completion, completion->Signal(); } -static void GetCookieValueOnIOThread(scoped_refptr cookie_store, +static void GetCookieValueOnIOThread(scoped_ptr cookie_store, const GURL& host, std::string* result, base::WaitableEvent* completion) { @@ -311,7 +310,7 @@ static void GetCookieValueOnIOThread(scoped_refptr cookie_stor std::string CookieManager::GetCookiesForURL(const std::string& url) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - scoped_refptr cookie_store = GetCookieStore(); + scoped_ptr cookie_store = GetCookieStore(); if (!cookie_store.get()) return std::string(); @@ -319,10 +318,8 @@ std::string CookieManager::GetCookiesForURL(const std::string& url) { base::WaitableEvent completion(false, false); BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(GetCookieValueOnIOThread, - cookie_store, - GURL(url), - &cookie_value, - &completion)); + base::Passed(std::move(cookie_store)), + GURL(url), &cookie_value, &completion)); // allow wait temporarily. ScopedAllowWaitForLegacyWebViewApi allow_wait; completion.Wait(); @@ -337,13 +334,12 @@ scoped_refptr CookieManager::GetContextGett return scoped_refptr(request_context_getter_.get()); } -scoped_refptr CookieManager::GetCookieStore() const { +scoped_ptr CookieManager::GetCookieStore() const { scoped_refptr request_context_getter = GetContextGetter(); if (request_context_getter.get()) { - return request_context_getter-> - GetURLRequestContext()-> - cookie_store(); + return scoped_ptr( + request_context_getter->GetURLRequestContext()->cookie_store()); } else { - return scoped_refptr(); + return scoped_ptr(); } } diff --git a/tizen_src/ewk/efl_integration/cookie_manager.h b/tizen_src/ewk/efl_integration/cookie_manager.h index 8ec462e..65c9da3 100644 --- a/tizen_src/ewk/efl_integration/cookie_manager.h +++ b/tizen_src/ewk/efl_integration/cookie_manager.h @@ -101,12 +101,12 @@ class CookieManager : public base::RefCountedThreadSafe { const GURL& first_party_url, bool setting_cookie); // Fetch the cookies. This must be called in the IO thread. - void FetchCookiesOnIOThread(scoped_refptr cookie_store); + void FetchCookiesOnIOThread(scoped_ptr cookie_store); void OnFetchComplete(const net::CookieList& cookies); scoped_refptr GetSharedThis(); scoped_refptr GetContextGetter() const; - scoped_refptr GetCookieStore() const; + scoped_ptr GetCookieStore() const; scoped_refptr request_context_getter_; //cookie policy information base::Lock lock_; diff --git a/tizen_src/ewk/efl_integration/eweb_context.cc b/tizen_src/ewk/efl_integration/eweb_context.cc index 3038c06..44f6c38 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.cc +++ b/tizen_src/ewk/efl_integration/eweb_context.cc @@ -319,7 +319,12 @@ bool EWebContext::GetNetworkCacheEnable() const { void EWebContext::AddExtraPluginDir(const char *path) { #if defined(ENABLE_PLUGINS) +#if !defined(EWK_BRINGUP) + // [M51_2704] The AddExtraPluginDir API was removed in content::PluginList + // class. It will be fixed by webview team. + // FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-1132 content::PluginList::Singleton()->AddExtraPluginDir(base::FilePath(path)); +#endif // EWK_BRINGUP #endif } @@ -367,7 +372,7 @@ void EWebContext::SetProxyUri(const char* uri) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&SetProxyConfigCallbackOnIOThread, &done, - make_scoped_refptr(browser_context()->GetRequestContext()), + base::RetainedRef(browser_context()->GetRequestContext()), config)); done.Wait(); } diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 8f18783..508b40a 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -337,8 +337,8 @@ void EWebView::Reload() { web_contents_->GetController().Reload(true); } -void EWebView::ReloadIgnoringCache() { - web_contents_->GetController().ReloadIgnoringCache(true); +void EWebView::ReloadBypassingCache() { + web_contents_->GetController().ReloadBypassingCache(true); } Eina_Bool EWebView::CanGoBack() { diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 3545c13..09836c9 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -201,7 +201,7 @@ class EWebView { void SetURL(const GURL& url); const GURL& GetURL() const; void Reload(); - void ReloadIgnoringCache(); + void ReloadBypassingCache(); Eina_Bool CanGoBack(); Eina_Bool CanGoForward(); Eina_Bool HasFocus() const; diff --git a/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc b/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc index bf7464b..75f81ab 100644 --- a/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc +++ b/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc @@ -5,7 +5,7 @@ includedir=${prefix}/include Name: chromium-ewk Description: EWK API based on chromium-efl engine -Version: 50.2661.0.14-1 +Version: 51.2704.0.17-1 Requires: chromium-efl Libs: -L${libdir} -lchromium-ewk Cflags: -I${includedir}/chromium-ewk diff --git a/tizen_src/ewk/efl_integration/private/ewk_geolocation_private.cc b/tizen_src/ewk/efl_integration/private/ewk_geolocation_private.cc index bca0649..e5eb584 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_geolocation_private.cc +++ b/tizen_src/ewk/efl_integration/private/ewk_geolocation_private.cc @@ -8,13 +8,12 @@ #include using content::BrowserThread; +using namespace blink::mojom; _Ewk_Geolocation_Permission_Request::_Ewk_Geolocation_Permission_Request( - const GURL& origin_url, - base::Callback callback) - : origin_(new _Ewk_Security_Origin(origin_url)), - callback_(callback) { -} + const GURL& origin_url, + base::Callback callback) + : origin_(new _Ewk_Security_Origin(origin_url)), callback_(callback) {} _Ewk_Geolocation_Permission_Request::~_Ewk_Geolocation_Permission_Request() { CHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); @@ -22,7 +21,5 @@ _Ewk_Geolocation_Permission_Request::~_Ewk_Geolocation_Permission_Request() { } void _Ewk_Geolocation_Permission_Request::runCallback(bool allowed) { - callback_.Run(allowed? - content::PermissionStatus::GRANTED: - content::PermissionStatus::DENIED); + callback_.Run(allowed ? PermissionStatus::GRANTED : PermissionStatus::DENIED); } diff --git a/tizen_src/ewk/efl_integration/private/ewk_geolocation_private.h b/tizen_src/ewk/efl_integration/private/ewk_geolocation_private.h index f3cf3b2..4b954ef 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_geolocation_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_geolocation_private.h @@ -6,8 +6,8 @@ #define ewk_geolocation_private_h #include "base/callback.h" -#include "content/public/common/permission_status.mojom.h" #include "ewk_suspendable_object.h" +#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h" #include "url/gurl.h" class _Ewk_Security_Origin; @@ -17,8 +17,9 @@ class _Ewk_Security_Origin; // to be called once the permission is determined by app. class _Ewk_Geolocation_Permission_Request : public Ewk_Suspendable_Object{ public: - _Ewk_Geolocation_Permission_Request(const GURL& origin_url, - base::Callback callback); + _Ewk_Geolocation_Permission_Request( + const GURL& origin_url, + base::Callback callback); ~_Ewk_Geolocation_Permission_Request(); _Ewk_Security_Origin* GetOrigin() const { return origin_; } @@ -28,7 +29,7 @@ class _Ewk_Geolocation_Permission_Request : public Ewk_Suspendable_Object{ void runCallback(bool allowed) override; - base::Callback callback_; + base::Callback callback_; }; #endif // ewk_geolocation_private_h diff --git a/tizen_src/ewk/efl_integration/private/ewk_notification_private.cc b/tizen_src/ewk/efl_integration/private/ewk_notification_private.cc index 90fb725..44ddf77 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_notification_private.cc +++ b/tizen_src/ewk/efl_integration/private/ewk_notification_private.cc @@ -8,6 +8,7 @@ #include "third_party/skia/include/core/SkImageEncoder.h" using content::BrowserThread; +using namespace blink::mojom; Ewk_Notification::Ewk_Notification( const std::string& body, @@ -78,15 +79,13 @@ bool Ewk_Notification::SaveAsPng(const char* path) const { Ewk_Notification_Permission_Request::Ewk_Notification_Permission_Request( Evas_Object* webview, - const base::Callback& callback, + const base::Callback& callback, const GURL& source_origin) - : webview_(webview) - , origin_(new _Ewk_Security_Origin(source_origin)) - , callback_(callback) - , decided_(false) - , suspended_(false) -{ -} + : webview_(webview), + origin_(new _Ewk_Security_Origin(source_origin)), + callback_(callback), + decided_(false), + suspended_(false) {} Ewk_Notification_Permission_Request::~Ewk_Notification_Permission_Request() { } @@ -122,9 +121,7 @@ bool Ewk_Notification_Permission_Request::Reply(bool allow) { decided_ = true; - callback_.Run(allow? - content::PermissionStatus::GRANTED: - content::PermissionStatus::DENIED); + callback_.Run(allow ? PermissionStatus::GRANTED : PermissionStatus::DENIED); if (suspended_) { // If decision was suspended, then it was not deleted by the creator diff --git a/tizen_src/ewk/efl_integration/private/ewk_notification_private.h b/tizen_src/ewk/efl_integration/private/ewk_notification_private.h index 924e3f1..3a9bc7c 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_notification_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_notification_private.h @@ -11,9 +11,9 @@ #include "base/callback.h" #include "base/macros.h" #include "base/memory/scoped_ptr.h" -#include "content/public/common/permission_status.mojom.h" #include "private/ewk_security_origin_private.h" #include "third_party/skia/include/core/SkBitmap.h" +#include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h" class GURL; @@ -52,9 +52,10 @@ struct Ewk_Notification { struct Ewk_Notification_Permission_Request { public: - Ewk_Notification_Permission_Request(Evas_Object* webview, - const base::Callback& callback, - const GURL& source_origin); + Ewk_Notification_Permission_Request( + Evas_Object* webview, + const base::Callback& callback, + const GURL& source_origin); ~Ewk_Notification_Permission_Request(); Evas_Object* GetWebviewEvasObject() const; @@ -67,7 +68,7 @@ struct Ewk_Notification_Permission_Request { private: Evas_Object* webview_; scoped_ptr<_Ewk_Security_Origin> origin_; - base::Callback callback_; + base::Callback callback_; bool decided_; mutable bool suspended_; diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.cc b/tizen_src/ewk/efl_integration/public/ewk_view.cc index 794bffd..49dfe68 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_view.cc @@ -157,7 +157,7 @@ Eina_Bool ewk_view_reload(Evas_Object *view) Eina_Bool ewk_view_reload_bypass_cache(Evas_Object *view) { EWK_VIEW_IMPL_GET_OR_RETURN(view, impl, false); - impl->ReloadIgnoringCache(); + impl->ReloadBypassingCache(); return true; } diff --git a/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.cc b/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.cc index 0765283..1be4304 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.cc @@ -23,8 +23,9 @@ using blink::WebCache; using blink::WebRuntimeFeatures; using content::RenderThread; -RenderProcessObserverEfl::RenderProcessObserverEfl(ContentRendererClientEfl* content_client) - : content_client_(content_client), webkit_initialized_(false) { +RenderProcessObserverEfl::RenderProcessObserverEfl( + ContentRendererClientEfl* content_client) + : content_client_(content_client) { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); if (command_line.HasSwitch(switches::kEnableViewMode)) WebRuntimeFeatures::enableCSSViewModeMediaFeature(true); @@ -41,12 +42,6 @@ bool RenderProcessObserverEfl::OnControlMessageReceived(const IPC::Message& mess return handled; } -void RenderProcessObserverEfl::WebKitInitialized() -{ - webkit_initialized_ = true; - OnSetCache(pending_cache_params_); -} - void RenderProcessObserverEfl::OnClearCache() { WebCache::clear(); @@ -54,10 +49,6 @@ void RenderProcessObserverEfl::OnClearCache() void RenderProcessObserverEfl::OnSetCache(const CacheParamsEfl& params) { - pending_cache_params_ = params; - if(!webkit_initialized_) - return; - WebCache::setCapacities(static_cast(params.cache_min_dead_capacity), static_cast(params.cache_max_dead_capacity), static_cast(params.cache_total_capacity)); diff --git a/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.h b/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.h index ea7bd7a..f4f4137 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.h +++ b/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.h @@ -21,14 +21,11 @@ class RenderProcessObserverEfl : public content::RenderProcessObserver { public: explicit RenderProcessObserverEfl(ContentRendererClientEfl* content_client); bool OnControlMessageReceived(const IPC::Message& message) override; - void WebKitInitialized() override; void OnClearCache(); private: void OnSetCache(const CacheParamsEfl& params); ContentRendererClientEfl* content_client_; - bool webkit_initialized_; - CacheParamsEfl pending_cache_params_; }; #endif diff --git a/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc b/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc index 3a05c2c..9bdcb25 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc @@ -28,6 +28,7 @@ #include "third_party/WebKit/public/web/WebFormElement.h" #include "third_party/WebKit/public/web/WebFrame.h" #include "third_party/WebKit/public/web/WebFrameContentDumper.h" +#include "third_party/WebKit/public/web/WebFrameWidget.h" #include "third_party/WebKit/public/web/WebHitTestResult.h" #include "third_party/WebKit/public/web/WebInputEvent.h" #include "third_party/WebKit/public/web/WebLocalFrame.h" @@ -238,12 +239,9 @@ void RenderViewObserverEfl::OnUseSettingsFont() void RenderViewObserverEfl::OnPlainTextGet(int plain_text_get_callback_id) { - blink::WebFrame* frame = render_view()->GetWebView()->mainFrame(); - if (!frame) - return; - // WebFrameContentDumper should only be used for testing purposes. See http://crbug.com/585164. - blink::WebString content = blink::WebFrameContentDumper::dumpFrameTreeAsText(frame->toWebLocalFrame(), INT_MAX); + blink::WebString content = blink::WebFrameContentDumper::dumpWebViewAsText( + render_view()->GetWebView(), INT_MAX); Send(new EwkHostMsg_PlainTextGetContents(render_view()->GetRoutingID(), content.utf8(), plain_text_get_callback_id)); } @@ -389,14 +387,14 @@ void RenderViewObserverEfl::CheckContentsSize() void RenderViewObserverEfl::OnSetDrawsTransparentBackground(bool draws_transparent_background) { - blink::WebView* view = render_view()->GetWebView(); - if (!view) + blink::WebFrameWidget* widget = render_view()->GetWebFrameWidget(); + if (!widget) return; blink::WebColor backgroundColor = draws_transparent_background ? static_cast(0x00000000) : static_cast(0xFFFFFFFF); - view->setBaseBackgroundColor(backgroundColor); + widget->setBaseBackgroundColor(backgroundColor); } void RenderViewObserverEfl::OnWebAppIconUrlGet(int callback_id) 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 810d848..a056bbe 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 @@ -162,8 +162,6 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { url_request_context_->ssl_config_service(); network_session_params.http_auth_handler_factory = url_request_context_->http_auth_handler_factory(); - network_session_params.network_delegate = - network_delegate_.get(); network_session_params.http_server_properties = url_request_context_->http_server_properties(); network_session_params.net_log = @@ -299,9 +297,9 @@ void URLRequestContextGetterEfl::CreateSQLitePersistentCookieStore( // Set the new cookie store that will be used for all new requests. The old // cookie store, if any, will be automatically flushed and closed when no // longer referenced. - scoped_refptr cookie_monster = - new net::CookieMonster(persistent_store.get(), NULL); - storage_->set_cookie_store(cookie_monster.get()); + scoped_ptr cookie_monster( + new net::CookieMonster(persistent_store.get(), NULL)); + storage_->set_cookie_store(std::move(cookie_monster)); if (persistent_store.get() && persist_session_cookies) cookie_monster->SetPersistSessionCookies(true); 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 bc8384d..16c42af 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 @@ -8,12 +8,14 @@ #include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" +#include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" #include "content/public/browser/content_browser_client.h" #include "net/base/network_delegate.h" #include "net/url_request/url_request_context_getter.h" #include "net/url_request/url_request_context_storage.h" #include "net/proxy/proxy_config_service.h" +#include "net/url_request/url_request_job_factory_impl.h" #include "public/ewk_cookie_manager.h" namespace net { @@ -67,7 +69,7 @@ class URLRequestContextGetterEfl : public net::URLRequestContextGetter { net::NetLog* net_log_; base::FilePath cookie_store_path_; - scoped_refptr cookie_store_; + scoped_ptr cookie_store_; scoped_ptr http_network_session_; scoped_ptr proxy_config_service_; diff --git a/tizen_src/ewk/efl_webview_app/chromium-efl.xml b/tizen_src/ewk/efl_webview_app/chromium-efl.xml index dcaac1b..1ad8c0a 100644 --- a/tizen_src/ewk/efl_webview_app/chromium-efl.xml +++ b/tizen_src/ewk/efl_webview_app/chromium-efl.xml @@ -1,5 +1,5 @@ - + SWC mini browser application based on chromium-efl diff --git a/tizen_src/ewk/efl_webview_app/chromium-efl_v3.0.xml b/tizen_src/ewk/efl_webview_app/chromium-efl_v3.0.xml index 4e8e922..842aeb0 100644 --- a/tizen_src/ewk/efl_webview_app/chromium-efl_v3.0.xml +++ b/tizen_src/ewk/efl_webview_app/chromium-efl_v3.0.xml @@ -1,5 +1,5 @@ - + SWC mini browser application based on chromium-efl diff --git a/tizen_src/ewk/efl_webview_app/ubrowser.xml b/tizen_src/ewk/efl_webview_app/ubrowser.xml index 6087d8d..0003173 100644 --- a/tizen_src/ewk/efl_webview_app/ubrowser.xml +++ b/tizen_src/ewk/efl_webview_app/ubrowser.xml @@ -1,5 +1,5 @@ - micro browser application for chromium-efl package SWC micro browser application based on chromium-efl diff --git a/tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml b/tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml index 03107e6..8961a68 100644 --- a/tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml +++ b/tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml @@ -1,5 +1,5 @@ - + SWC micro browser application based on chromium-efl diff --git a/tizen_src/ewk/ubrowser/ubrowser.xml b/tizen_src/ewk/ubrowser/ubrowser.xml index 9a14c2c..66435d9 100644 --- a/tizen_src/ewk/ubrowser/ubrowser.xml +++ b/tizen_src/ewk/ubrowser/ubrowser.xml @@ -1,5 +1,5 @@ - + SRPOL Small reference browser application for chromium-efl port diff --git a/tizen_src/packaging/chromium-efl-libs.spec b/tizen_src/packaging/chromium-efl-libs.spec index a639d8f..c65cb52 100644 --- a/tizen_src/packaging/chromium-efl-libs.spec +++ b/tizen_src/packaging/chromium-efl-libs.spec @@ -5,8 +5,8 @@ %define _binary_payload w3.gzdio Name: chromium-efl-libs -%define ChromiumVersion 50.2661.0 -%define Week 14 +%define ChromiumVersion 51.2704.0 +%define Week 17 Version: %{ChromiumVersion}.%{Week} Release: 1 Summary: Chromium-based app runtime, private libraries diff --git a/tizen_src/packaging/chromium-efl.spec b/tizen_src/packaging/chromium-efl.spec index 6ab0143..33f5fe1 100644 --- a/tizen_src/packaging/chromium-efl.spec +++ b/tizen_src/packaging/chromium-efl.spec @@ -1,8 +1,8 @@ Name: chromium-efl Summary: Chromium EFL # Set by by scripts/update-chromium-version.sh -%define ChromiumVersion 50.2661.0 -%define Week 14 +%define ChromiumVersion 51.2704.0 +%define Week 17 Version: %{ChromiumVersion}.%{Week} Release: 1 # The 'Group' should be specified as one of the following valid group list. diff --git a/tizen_src/packaging/crosswalk-bin.spec b/tizen_src/packaging/crosswalk-bin.spec index d8e1add..ae5f73b 100644 --- a/tizen_src/packaging/crosswalk-bin.spec +++ b/tizen_src/packaging/crosswalk-bin.spec @@ -5,7 +5,7 @@ %define _binary_payload w3.gzdio Name: crosswalk-bin -Version: 15.50.2661.0 +Version: 15.51.2704.0 Release: 0 Summary: Chromium-based app runtime License: (BSD-3-Clause and LGPL-2.1+) diff --git a/tizen_src/packaging/manifest.xml b/tizen_src/packaging/manifest.xml index 8c98009..b831293 100644 --- a/tizen_src/packaging/manifest.xml +++ b/tizen_src/packaging/manifest.xml @@ -1,7 +1,7 @@ kmcele1k1p - 50.2661.0.14 + 51.2704.0.17 C++App -- 2.7.4 From 52c9c8b3df7a3d222f253c5c1e42c372522957a9 Mon Sep 17 00:00:00 2001 From: Prashanth R K Shandilya Date: Tue, 5 Jul 2016 12:43:35 +0530 Subject: [PATCH 02/16] [M53_2785] Chromium upversion to m53_2785 branch. This patch deals with the following changes: 1. Folder and class name changes - Added the leveldatabase.gyp:leveldatabase dependency in chromium-ewk target - Added the components.gyp:network_session_configurator_switches dependency in chromium-ewk target - Added the codes for enabling the 'use_external_popup_menu' flag - Changed the make_scoped_ptr to base::WrapUnique - Changed the path of "v8.gyp" to "v8/src" from the "v8/tools/gyp" - Changed the path of "gpu_channel_manager.h" to the "gpu/ipc/service" from the "content/common/gpu" - Changed the blink::WebNotificationPermission class to the blink::mojom::PermissionStatus class - Changed the cc::OnscreenDisplayClient class to the cc::Display class - Changed the content::RenderProcessObserver class to the content::RenderThreadObserver class - Changed the gfx::GLContext class to the gl::GLContext class - Changed the ui::SelectionBound class to the gfx::SelectionBound class - Changed the type of ContextProviderCommandBuffer class - Changed the type of base::WaitableEvent class - Changed the namespaces of GLHelper to display_compositor::GLHelper - Removed the s-libjingle_source_talk.git in DEPS.efl - REmoved the chromedriver dependency in chromium-efl - Removed the libpci dependency in chromium-efl - Removed the kEnableLinkDisambiguationPopup switch 2. API changes - Added the CreateMediaRequestContext function in BrowserContext class - Added the CreateMediaRequestContextForStoragePartition function in BrowserContext class - Added the CreateZoomLevelDelegate function in BrowserContext class - Added the DelegatedFrameHostGetGpuMemoryBufferClientId function in RenderWidgetHostViewEfl class - Added the DelegatedFrameHostGetGutterColor function in RenderWidgetHostViewEfl class - Added the GetFramebufferCopyTextureFormat function in cc::OutputSurface class - Added the SetBeginFrameSource function in RenderWidgetHostViewEfl class - Added the IsWindowUnderCursor function in gfx::Screen class - Added the OnDestruct function in content::RenderViewObserver class - Added the OnLoadedRectUpdate function in plugins::LoadablePluginPlaceholder class - Changed the GetRequestContext function to the GetURLRequestContext function in net::URLRequestContext class - Changed the enum of LOAD_TYPE_BROWSER_INITIATED_HTTP_POST to LOAD_TYPE_HTTP_POST in content::NavigationController class - Changed the DeleteAllCreatedBetweenForHostAsync function to the DeleteAllCreatedBetweenWithPredicateAsync function in net::CookieStore class - Changed the arguments of cc::OutputSurface class - Changed the arguments of SwapBuffers function in MailboxOutputSurfaceEfl class - Changed the arguments of OnSwapBuffersCompleted function in cc::OutputSurface class - Changed the arguments of OnSwapCompositorFrame function in RenderWidgetHostViewEfl class - Changed the arguments of DispatchSyntheticTouchEvent function in RenderWidgetHostViewEfl class - Changed the arguments of CopyOutputCallback function in RenderWidgetHostViewEfl class - Changed the arguments of IsFullscreenForCurrentTab function in WebContentsImpl class - Changed the arguments of DragTargetDrop function in RenderViewHostImpl class - Changed the arguments of GpuChildThread function in content::GpuChildThread class - Changed the arguments of Vibrate function in VibrationManager class - Changed the arguments of Cancel function in VibrationManager class - Changed the arguments of DownloadStarting function in ResourceDispatcherHostDelegate class - Changed the arguments of RunFileChooser function in WebContentsDelegate class - Changed the arguments of InProcessGpuThread function in content::GpuChildThread class - Removed the GetNativeViewId function in RenderWidgetHostViewEfl class - Removed the GetScreenColorProfile function in RenderWidgetHostViewEfl class - Removed the GetWindowUnderCursor function in gfx::Screen class - Removed the setUseMobileViewportStyle function in blink::WebSettings class - Removed the CreateZoomLevelDelegate function in BrowserContext class - Removed the GetRequestContext function in BrowserContext class - Removed the GetMediaRequestContext function in BrowserContext class - Removed the GetMediaRequestContextForRenderProcess function in BrowserContext class - Removed the GetMediaRequestContextForStoragePartition function in BrowserContext class - Removed the CreateAccessTokenStore function in ContentBrowserClient class - Removed the OverrideSystemLocationProvider function in ContentBrowserClient class - Removed the enum type of cc::SelectionBoundType class 3. Need to change API (TODO issues) - The multimedia function has been changed. Temporary disabling the 'tizen_multimedia_support' and 'use_gstreamer_fft' flag (http://suprem.sec.samsung.net/jira/browse/TWF-2060) - The VideoCaptureDevice class has been changed. Temporary disabling the files which related to VideoCaptureDevice class (http://suprem.sec.samsung.net/jira/browse/TWF-2061) - The BatteryStatusManager class has been changed. Temporary disabling the files which related to BatteryStatusManager class (http://suprem.sec.samsung.net/jira/browse/TWF-2062) - The AwPrefStore class has been removed. Temporary disabling the codes which related to AwPrefStore class (http://suprem.sec.samsung.net/jira/browse/TWF-2071) - The FilesSelectedInChooser function has been changed. Temporary disabling the codes which related to FilesSelectedInChooser function (http://suprem.sec.samsung.net/jira/browse/TWF-2072) - The codes which related to "std::find()" makes the build problem in mobile and tv profiles. Temporary disabling the codes (http://suprem.sec.samsung.net/jira/browse/TWF-2058) - The ComputeZoomAreaAndScaleFactor function has been changed. Temporary disabling the codes which related to ComputeZoomAreaAndScaleFactor (http://suprem.sec.samsung.net/jira/browse/TWF-2057) - The codes which related to gzip_string (tools/grit/grit/node/include.py) makes the build problem. Temporary disabling the codes (http://suprem.sec.samsung.net/jira/browse/TWF-2059) - APIs related geolocation were extracted from ContentBrowserClient to content::GeolocationDelegate. So we should implement it (http://suprem.sec.samsung.net/jira/browse/TWF-2084) - The SelectClosestWord function has been changed. Temporary disabling the codes which related to SelectClosestWord function (http://suprem.sec.samsung.net/jira/browse/TWF-2122) 4. Verification - This patch supports to the desktop and mobile(Tizen 3.0 32bit TM1) and tv(Tizen 3.0 32bit Odroid) profiles - There is no build problem in all target. - Basic rendering is fine on desktop and mobile. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-1995 Change-Id: Ife6029cd18d471402b789cf4abf09f6eae185da7 Signed-off-by: Youngcheol Kang Signed-off-by: Suchit Agrawal Signed-off-by: Youngcheol Kang Signed-off-by: Chandan Padhi Signed-off-by: Youngcheol Kang --- tizen_src/DEPS.efl | 4 +- tizen_src/build/common.sh | 12 -- tizen_src/build/gyp_chromiumefl.sh | 1 + tizen_src/build/jhbuild/jhbuild.modules | 28 +-- .../patches/hotfix_m53_2785_gpu_control_list.diff | 34 ++++ .../build/patches/hotfix_m53_2785_include_py.diff | 22 +++ .../patches/hotfix_m53_2785_render_view_impl.diff | 35 ++++ .../chromium_impl/chrome/chrome_tests_efl.gypi | 22 --- tizen_src/chromium_impl/chromium_impl.gypi | 18 +- .../browser/compositor/context_factory_efl.cc | 148 ++++++++-------- .../browser/compositor/context_factory_efl.h | 28 +-- .../compositor/mailbox_output_surface_efl.cc | 30 ++-- .../compositor/mailbox_output_surface_efl.h | 20 ++- .../device_sensors/data_fetcher_impl_tizen.h | 1 - .../renderer_host/disambiguation_popup_efl.cc | 4 +- .../renderer_host/render_widget_host_view_efl.cc | 190 +++++++++------------ .../renderer_host/render_widget_host_view_efl.h | 38 ++--- .../browser/renderer_host/web_event_factory_efl.cc | 10 +- .../content/browser/selection/selection_box_efl.h | 3 +- .../browser/selection/selection_controller_efl.cc | 12 +- .../browser/selection/selection_controller_efl.h | 19 +-- .../browser/speech/tts_message_filter_efl.h | 3 +- .../browser/web_contents/web_contents_impl_efl.cc | 2 +- .../browser/web_contents/web_contents_impl_efl.h | 2 +- .../browser/web_contents/web_contents_view_efl.cc | 6 +- .../browser/web_contents/web_contents_view_efl.h | 9 +- .../browser/web_contents/web_drag_dest_efl.cc | 6 +- .../browser/web_contents/web_drag_dest_efl.h | 5 +- .../browser/web_contents/web_drag_source_efl.cc | 4 +- .../browser/web_contents/web_drag_source_efl.h | 5 +- .../chromium_impl/content/common/paths_efl.cc | 15 +- .../content/gpu/in_process_gpu_thread_efl.cc | 19 +-- .../content/renderer/tts_dispatcher_efl.h | 6 +- .../device/battery/battery_status_manager_tizen.cc | 4 +- .../device/vibration/vibration_manager_impl_efl.cc | 8 +- .../device/vibration/vibration_manager_impl_efl.h | 7 +- .../device/vibration/vibration_provider_client.h | 2 + tizen_src/chromium_impl/efl/init.cc | 8 +- .../config/scoped_restore_non_owned_egl_context.cc | 2 +- .../media/audio/tizen/capi_audio_output.h | 3 +- .../media/base/efl/media_player_util_efl.h | 3 +- .../media/base/tizen/media_player_bridge_capi.h | 1 - .../media/base/tizen/media_source_player_capi.h | 5 +- .../video/tizen/video_capture_device_tizen.h | 8 +- tizen_src/chromium_impl/media/media_efl.gypi | 11 +- .../ui/base/resource/resource_bundle_efl.cc | 2 +- .../ui/{gfx => display}/device_display_info_efl.cc | 8 +- .../ui/{gfx => display}/device_display_info_efl.h | 14 +- .../ui/{gfx => display}/screen_efl.cc | 54 +++--- .../chromium_impl/ui/{gfx => display}/screen_efl.h | 0 tizen_src/chromium_impl/ui/gl/efl_pixmap.cc | 4 +- tizen_src/chromium_impl/ui/gl/efl_pixmap.h | 5 +- .../chromium_impl/ui/gl/gl_context_egl_override.cc | 2 +- .../chromium_impl/ui/gl/gl_current_context_efl.cc | 2 +- .../chromium_impl/ui/gl/gl_image_efl_pixmap.h | 1 - .../chromium_impl/ui/gl/gl_shared_context_efl.cc | 20 +-- .../chromium_impl/ui/gl/gl_shared_context_efl.h | 6 +- .../chromium_impl/ui/ozone/ozone_platform_efl.cc | 14 +- .../chromium_impl/ui/snapshot/snapshot_efl.cc | 4 +- tizen_src/chromium_impl/ui/ui_efl.gypi | 8 +- tizen_src/ewk/chromium-ewk.gyp | 1 - .../autofill/personal_data_manager_factory.cc | 1 - .../browser/browsing_data_remover_efl.cc | 5 +- .../geolocation_permission_context_efl.cc | 2 +- .../browser/javascript_dialog_manager_efl.h | 8 +- .../efl_integration/browser/login_delegate_efl.h | 1 - .../notification/notification_controller_efl.cc | 24 +-- .../notification/notification_controller_efl.h | 15 +- .../browser/policy_response_delegate_efl.h | 2 +- .../resource_dispatcher_host_delegate_efl.cc | 1 - .../resource_dispatcher_host_delegate_efl.h | 1 - .../browser/selectpicker/popup_menu_item_private.h | 2 - .../browser/selectpicker/popup_picker.cc | 1 - .../browser/vibration/vibration_provider_client.h | 1 - .../ewk/efl_integration/browser_context_efl.cc | 28 +-- .../ewk/efl_integration/browser_context_efl.h | 26 +-- .../ewk/efl_integration/browser_main_parts_efl.h | 1 - tizen_src/ewk/efl_integration/command_line_efl.cc | 3 - .../ewk/efl_integration/common/version_info.h | 1 - .../efl_integration/content_browser_client_efl.cc | 13 +- .../efl_integration/content_browser_client_efl.h | 10 +- .../efl_integration/content_main_delegate_efl.h | 4 +- .../efl_integration/context_menu_controller_efl.cc | 4 +- .../efl_integration/context_menu_controller_efl.h | 4 +- tizen_src/ewk/efl_integration/cookie_manager.cc | 28 +-- tizen_src/ewk/efl_integration/cookie_manager.h | 4 +- .../ewk/efl_integration/devtools_delegate_efl.cc | 10 +- .../ewk/efl_integration/devtools_delegate_efl.h | 3 +- tizen_src/ewk/efl_integration/efl_integration.gypi | 17 +- tizen_src/ewk/efl_integration/eweb_context.cc | 19 ++- tizen_src/ewk/efl_integration/eweb_context.h | 17 +- tizen_src/ewk/efl_integration/eweb_view.cc | 25 +-- tizen_src/ewk/efl_integration/eweb_view.h | 27 ++- tizen_src/ewk/efl_integration/ewk_global_data.cc | 6 +- .../efl_integration/file_chooser_controller_efl.cc | 6 + .../efl_integration/file_chooser_controller_efl.h | 1 + .../link_xwalk_against_chromium_efl.gypi | 4 +- .../ewk/efl_integration/pkgconfig/chromium-ewk.pc | 2 +- .../private/ewk_notification_private.h | 5 +- .../private/ewk_policy_decision_private.h | 5 +- .../private/ewk_quota_permission_request_private.h | 3 +- .../private/ewk_user_media_private.h | 4 +- .../ewk/efl_integration/public/ewk_dispatcher.cc | 2 +- tizen_src/ewk/efl_integration/public/ewk_object.cc | 1 - tizen_src/ewk/efl_integration/public/ewk_view.cc | 2 +- .../renderer/content_renderer_client_efl.cc | 7 +- .../renderer/content_renderer_client_efl.h | 10 +- .../efl_integration/renderer/editorclient_agent.cc | 4 + .../efl_integration/renderer/editorclient_agent.h | 2 + .../renderer/plugins/plugin_placeholder_efl.cc | 6 + .../renderer/plugins/plugin_placeholder_efl.h | 4 + .../renderer/print_web_view_helper_efl.cc | 5 +- .../renderer/print_web_view_helper_efl.h | 3 +- .../renderer/render_frame_observer_efl.cc | 4 + .../renderer/render_frame_observer_efl.h | 2 + ...server_efl.cc => render_thread_observer_efl.cc} | 12 +- ...observer_efl.h => render_thread_observer_efl.h} | 10 +- .../renderer/render_view_observer_efl.cc | 4 + .../renderer/render_view_observer_efl.h | 1 + .../url_request_context_getter_efl.cc | 36 ++-- .../url_request_context_getter_efl.h | 15 +- .../efl_integration/web_contents_delegate_efl.cc | 20 ++- .../efl_integration/web_contents_delegate_efl.h | 9 +- .../web_contents_efl_delegate_ewk.cc | 2 +- .../ewk/efl_integration/wrt/wrt_widget_host.cc | 2 +- tizen_src/ewk/efl_integration/wrt/wrtwidget.cc | 4 +- tizen_src/ewk/efl_integration/wrt/wrtwidget.h | 4 +- tizen_src/ewk/efl_webview_app/chromium-efl.xml | 2 +- .../ewk/efl_webview_app/chromium-efl_v3.0.xml | 2 +- tizen_src/ewk/efl_webview_app/ubrowser.xml | 2 +- tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml | 2 +- tizen_src/ewk/ubrowser/ubrowser.xml | 2 +- tizen_src/ewk/unittest/ewk-tests.gypi | 2 +- tizen_src/packaging/chromium-efl-libs.spec | 4 +- tizen_src/packaging/chromium-efl.spec | 30 +--- tizen_src/packaging/crosswalk-bin.spec | 2 +- tizen_src/packaging/manifest.xml | 2 +- tizen_src/scripts/start-chrome-driver.sh | 5 - tizen_src/supplement.gypi | 9 +- 139 files changed, 783 insertions(+), 764 deletions(-) create mode 100644 tizen_src/build/patches/hotfix_m53_2785_gpu_control_list.diff create mode 100644 tizen_src/build/patches/hotfix_m53_2785_include_py.diff create mode 100644 tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff delete mode 100644 tizen_src/chromium_impl/chrome/chrome_tests_efl.gypi rename tizen_src/chromium_impl/ui/{gfx => display}/device_display_info_efl.cc (97%) rename tizen_src/chromium_impl/ui/{gfx => display}/device_display_info_efl.h (82%) rename tizen_src/chromium_impl/ui/{gfx => display}/screen_efl.cc (61%) rename tizen_src/chromium_impl/ui/{gfx => display}/screen_efl.h (100%) rename tizen_src/ewk/efl_integration/renderer/{render_process_observer_efl.cc => render_thread_observer_efl.cc} (81%) rename tizen_src/ewk/efl_integration/renderer/{render_process_observer_efl.h => render_thread_observer_efl.h} (65%) delete mode 100644 tizen_src/scripts/start-chrome-driver.sh diff --git a/tizen_src/DEPS.efl b/tizen_src/DEPS.efl index 2b0623e..94e8d4d 100644 --- a/tizen_src/DEPS.efl +++ b/tizen_src/DEPS.efl @@ -26,7 +26,7 @@ khronos_cl_api_rev = '6f4be98d10f03ce2b12c769cd9835c73a441c00f' # SVN revision while Blink is still in SVN. blink_upstream_rev = '191638' #TODO(TK) : need to update revision number -efl_integration_branch = 'origin/dev/m51_2704' +efl_integration_branch = 'origin/dev/m53_2785' ct_git = 'ssh://165.213.202.130:29418/webplatform' crosswalk_git = 'https://github.com/crosswalk-project' @@ -48,8 +48,6 @@ solutions = [ ct_git + '/s-skia.git@' + efl_integration_branch, 'src/third_party/webrtc': ct_git + '/s-webrtc.git@' + efl_integration_branch, - 'src/third_party/libjingle/source/talk': - ct_git + '/s-libjingle_source_talk.git@' + efl_integration_branch, 'src/v8': ct_git + '/s-v8.git@' + efl_integration_branch, diff --git a/tizen_src/build/common.sh b/tizen_src/build/common.sh index 4068db1..63b0867 100755 --- a/tizen_src/build/common.sh +++ b/tizen_src/build/common.sh @@ -64,7 +64,6 @@ function parseHostBuildScriptParams() { export BUILD_EWK_UNITTESTS=0 export BUILD_CONTENT_SHELL=1 export BUILD_XWALK=0 - export BUILD_CHROMEDRIVER=0 export BUILD_SUBDIRECTORY=Release export COMPONENT_BUILD=0 @@ -105,9 +104,6 @@ function parseHostBuildScriptParams() { --xwalk) export BUILD_XWALK=1 ;; - --chromedriver) - export BUILD_CHROMEDRIVER=1 - ;; --component-build) export COMPONENT_BUILD=1 ;; @@ -153,9 +149,6 @@ function hostNinja() { if [[ $BUILD_XWALK == 1 ]]; then TARGETS="$TARGETS xwalk" fi - if [[ $BUILD_CHROMEDRIVER == 1 ]]; then - TARGETS="$TARGETS chromedriver" - fi BUILDDIR=${GYP_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} ninja -C $BUILDDIR ${JOBS} ${TARGETS} fi @@ -273,11 +266,6 @@ function setupAndExecuteTargetBuild() { --gbs-debug) ARGS[$count]=--debug ;; - --chromedriver) - ARGS[$count]=--define - count=$(( $count + 1 )) - ARGS[$count]="build_chromedriver 1" - ;; --rpmlint) RPMLINT=1 count=$(( $count + 1 )) diff --git a/tizen_src/build/gyp_chromiumefl.sh b/tizen_src/build/gyp_chromiumefl.sh index 89c6868..90660ca 100755 --- a/tizen_src/build/gyp_chromiumefl.sh +++ b/tizen_src/build/gyp_chromiumefl.sh @@ -83,6 +83,7 @@ COMMON_GYP_PARAMETERS=" -Denable_extensions=1 -Duse_cups=0 -Duse_allocator=none + -Duse_libpci=0 -Ddisable_fatal_linker_warnings= --depth=${TOPDIR} " diff --git a/tizen_src/build/jhbuild/jhbuild.modules b/tizen_src/build/jhbuild/jhbuild.modules index c79cf04..6fb88ef 100755 --- a/tizen_src/build/jhbuild/jhbuild.modules +++ b/tizen_src/build/jhbuild/jhbuild.modules @@ -70,9 +70,9 @@ - + hash="sha256:e8ff8af2950897e805408480c454c415d1eade4e670ec5fb507f5e5853726c7a"/> @@ -108,8 +108,8 @@ autogen-sh="configure" autogenargs="--disable-examples --disable-tests --disable-failing-tests"> + module="gstreamer/gstreamer-1.6.2.tar.xz" version="1.6.2" + hash="sha256:5896716bd8e089dba452932a2eff2bb6f6c9d58ff64a96635d157f1ffaf8feb2"> @@ -120,8 +120,8 @@ + module="gst-plugins-base/gst-plugins-base-1.6.2.tar.xz" version="1.6.2" + hash="sha256:c75dd400e451526ed71e1c4955e33d470a2581f5e71ecf84920a41c0a5c75322"/> + module="gst-plugins-good/gst-plugins-good-1.6.2.tar.xz" version="1.6.2" + hash="sha256:876e54dfce93274b98e024f353258d35fa4d49d1f9010069e676c530f6eb6a92"> @@ -144,8 +144,8 @@ + module="gst-plugins-ugly/gst-plugins-ugly-1.6.2.tar.xz" version="1.6.2" + hash="sha256:e7f1b6321c8667fabc0dedce3998a3c6e90ce9ce9dea7186d33dc4359f9e9845"/> + module="gst-plugins-bad/gst-plugins-bad-1.6.2.tar.xz" version="1.6.2" + hash="sha256:650855e39ff56a8bb6cb0c192109c5926ce12f536d06e19ebf829de71ef396fe"> @@ -168,8 +168,8 @@ + module="gst-libav/gst-libav-1.6.2.tar.xz" version="1.6.2" + hash="sha2546:2597acc00171006d49f0d300440a87df51b113d557466e532153abc740db3469"> diff --git a/tizen_src/build/patches/hotfix_m53_2785_gpu_control_list.diff b/tizen_src/build/patches/hotfix_m53_2785_gpu_control_list.diff new file mode 100644 index 0000000..0ea0fc0 --- /dev/null +++ b/tizen_src/build/patches/hotfix_m53_2785_gpu_control_list.diff @@ -0,0 +1,34 @@ +diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc +index 5561d32..7524e98 100644 +--- a/gpu/config/gpu_control_list.cc ++++ b/gpu/config/gpu_control_list.cc +@@ -1034,8 +1034,14 @@ bool GpuControlList::GpuControlListEntry::SetFeatures( + if (supports_feature_type_all && feature_strings[i] == "all") { + for (FeatureMap::const_iterator iter = feature_map.begin(); + iter != feature_map.end(); ++iter) { ++#if !defined(EWK_BRINGUP) ++// [M53_2785] Temporary disabling the codes for swiching to new chromium ++// The codes makes a build problem in mobile and tv target. ++// It will be fixed by rendering team. ++// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2058 + if (std::find(exception_strings.begin(), exception_strings.end(), + iter->first) == exception_strings.end()) ++#endif // EWK_BRINGUP + features_.insert(iter->second); + } + continue; +@@ -1044,8 +1050,14 @@ bool GpuControlList::GpuControlListEntry::SetFeatures( + features_.clear(); + return false; + } ++#if !defined(EWK_BRINGUP) ++// [M53_2785] Temporary disabling the codes for swiching to new chromium ++// The codes makes a build problem in mobile and tv target. ++// It will be fixed by rendering team. ++// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2058 + if (std::find(exception_strings.begin(), exception_strings.end(), + feature_strings[i]) == exception_strings.end()) ++#endif // EWK_BRINGUP + features_.insert(feature); + } + return true; diff --git a/tizen_src/build/patches/hotfix_m53_2785_include_py.diff b/tizen_src/build/patches/hotfix_m53_2785_include_py.diff new file mode 100644 index 0000000..3c4eaea --- /dev/null +++ b/tizen_src/build/patches/hotfix_m53_2785_include_py.diff @@ -0,0 +1,22 @@ +diff --git a/tools/grit/grit/node/include.py b/tools/grit/grit/node/include.py +index 4bad785..94e5e7a 100755 +--- a/tools/grit/grit/node/include.py ++++ b/tools/grit/grit/node/include.py +@@ -100,10 +100,13 @@ class IncludeNode(base.Node): + # We only use rsyncable compression on Linux. + # We exclude ChromeOS since ChromeOS bots are Linux based but do not have + # the --rsyncable option built in for gzip. See crbug.com/617950. +- if sys.platform == 'linux2' and 'chromeos' not in self.GetRoot().defines: +- data = grit.format.gzip_string.GzipStringRsyncable(data) +- else: +- data = grit.format.gzip_string.GzipString(data) ++# [M53_2785] We cannot use the rsyncable compression since 'chromium-efl' do not ++# have the --rsyncable option built in for gzip. ++# FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2059 ++# if sys.platform == 'linux2' and 'chromeos' not in self.GetRoot().defines: ++# data = grit.format.gzip_string.GzipStringRsyncable(data) ++# else: ++ data = grit.format.gzip_string.GzipString(data) + data = self.RESERVED_HEADER[0] + data + elif data[:3] == self.RESERVED_HEADER: + # We are reserving these 3 bytes as the header for gzipped files in the diff --git a/tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff b/tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff new file mode 100644 index 0000000..ac81acd --- /dev/null +++ b/tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff @@ -0,0 +1,35 @@ +diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc +index 140e2fc..426bd43 100644 +--- a/content/renderer/render_view_impl.cc ++++ b/content/renderer/render_view_impl.cc +@@ -208,6 +208,7 @@ + #endif + + #if defined(USE_EFL) ++#include "content/renderer/android/disambiguation_popup_helper.h" + #include "content/renderer/android/email_detector.h" + #include "content/renderer/android/phone_number_detector.h" + #include "ui/gfx/device_display_info_efl.h" +@@ -3272,6 +3273,12 @@ bool RenderViewImpl::didTapMultipleTargets( + // The touch_rect, target_rects and zoom_rect are in the outer viewport + // reference frame. + gfx::Rect zoom_rect; ++#if !defined(EWK_BRINGUP) ++// [M53_2785] The path of "DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor" ++// is changed to "content/renderer/android/disambiguation_popup_helper.h" ++// from "content/renderer/disambiguation_popup_helper.h". ++// It will be fixed by webview team. ++// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2057 + float new_total_scale = + #if defined(S_TERRACE_SUPPORT) + DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( +@@ -3285,6 +3292,9 @@ bool RenderViewImpl::didTapMultipleTargets( + gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), + device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect); + #endif ++#else ++ float new_total_scale; ++#endif // EWK_BRINGUP + if (!new_total_scale || zoom_rect.IsEmpty()) + return false; + diff --git a/tizen_src/chromium_impl/chrome/chrome_tests_efl.gypi b/tizen_src/chromium_impl/chrome/chrome_tests_efl.gypi deleted file mode 100644 index 8c653b3..0000000 --- a/tizen_src/chromium_impl/chrome/chrome_tests_efl.gypi +++ /dev/null @@ -1,22 +0,0 @@ -# Copyright (c) 2015 Samsung Electronics. All rights reserved. -# Use of this source code is governed by a BSD-style license that can be -# found in the LICENSE file. - -{ - 'target_defaults': { - 'target_conditions': [ - ['_target_name=="chromedriver_lib"', { - 'sources/': [ - ['exclude', 'test/chromedriver/keycode_text_conversion_win\\.cc$'], - ], - 'conditions': [ - ['use_wayland==1', { - 'sources/': [ - ['exclude', 'test/chromedriver/keycode_text_conversion_x\\.cc$'], - ], - }], # use_wayland==1 - ], # conditions - }], - ], # target_conditions - }, # target_defaults -} diff --git a/tizen_src/chromium_impl/chromium_impl.gypi b/tizen_src/chromium_impl/chromium_impl.gypi index a52aefc..8d31658 100644 --- a/tizen_src/chromium_impl/chromium_impl.gypi +++ b/tizen_src/chromium_impl/chromium_impl.gypi @@ -5,7 +5,6 @@ { 'includes': [ 'base/base_efl.gypi', - 'chrome/chrome_tests_efl.gypi', 'content/content_efl.gypi', 'device/vibration_efl.gypi', 'gpu/gpu_efl.gypi', @@ -16,11 +15,14 @@ 'third_party/WebKit/Source/platform/blink_platform_efl.gypi', ], - 'conditions': [ - ['building_for_tizen_mobile==1', { - 'includes': [ - 'device/battery_tizen.gypi', - ], - }], # building_for_tizen_mobile==1 - ], # conditions +# [M53_2785] Temporary disabling the codes for switching to new chromium +# It will be fixed by Webcore Team. +# FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2062 +# 'conditions': [ +# ['building_for_tizen_mobile==1', { +# 'includes': [ +# 'device/battery_tizen.gypi', +# ], +# }], # building_for_tizen_mobile==1 +# ], # conditions } diff --git a/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc b/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc index 7654089..67d8baee 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc +++ b/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc @@ -4,10 +4,11 @@ #include "content/browser/compositor/context_factory_efl.h" +#include "cc/output/texture_mailbox_deleter.h" #include "cc/raster/single_thread_task_graph_runner.h" -#include "cc/surfaces/onscreen_display_client.h" +#include "cc/surfaces/display.h" #include "cc/surfaces/surface_display_output_surface.h" -#include "content/browser/compositor/gl_helper.h" +#include "components/display_compositor/gl_helper.h" #include "content/browser/compositor/mailbox_output_surface_efl.h" #include "content/browser/gpu/browser_gpu_channel_host_factory.h" #include "content/browser/gpu/browser_gpu_memory_buffer_manager.h" @@ -29,30 +30,10 @@ class FakeReflector : public ui::Reflector { }; } -static scoped_ptr -CreateGpuProcessViewContext( - const scoped_refptr& gpu_channel_host, - const gpu::gles2::ContextCreationAttribHelper attributes, - int surface_id) { - DCHECK(gpu_channel_host.get()); - - GpuSurfaceTracker* tracker = GpuSurfaceTracker::Get(); - gpu::SurfaceHandle surface_handle = - surface_id ? tracker->GetSurfaceHandle(surface_id) - : gpu::kNullSurfaceHandle; - GURL url("chrome://gpu/Compositor::createContext3D"); - bool share_resources = true; - bool automatic_flushes = false; - return make_scoped_ptr(new WebGraphicsContext3DCommandBufferImpl( - surface_handle, url, gpu_channel_host.get(), attributes, - gfx::PreferIntegratedGpu, share_resources, automatic_flushes, - WebGraphicsContext3DCommandBufferImpl::SharedMemoryLimits(), NULL)); -} - ContextFactoryEfl::ContextFactoryEfl() : next_surface_id_namespace_(1u), task_graph_runner_(new cc::SingleThreadTaskGraphRunner) { - surface_manager_ = make_scoped_ptr(new cc::SurfaceManager); + surface_manager_ = base::WrapUnique(new cc::SurfaceManager); task_graph_runner_->Start("CompositorTileWorker1", base::SimpleThread::Options()); } @@ -73,46 +54,69 @@ void ContextFactoryEfl::CreateOutputSurface( attrs.lose_context_when_out_of_memory = true; scoped_refptr context_provider; - content::BrowserGpuChannelHostFactory* factory = - content::BrowserGpuChannelHostFactory::instance(); - content::CauseForGpuLaunch cause = content:: - CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; scoped_refptr gpu_channel_host( - factory->EstablishGpuChannelSync(cause)); + BrowserGpuChannelHostFactory::instance()->EstablishGpuChannelSync( + CAUSE_FOR_GPU_LAUNCH_BROWSER_SHARED_MAIN_THREAD_CONTEXT)); if (gpu_channel_host.get() && !gpu_channel_host->IsLost()) { - context_provider = content::ContextProviderCommandBuffer::Create( - CreateGpuProcessViewContext(gpu_channel_host, attrs, 0), - content::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); + GURL url("chrome://gpu/Compositor::createContext3D"); + constexpr bool automatic_flushes = false; + constexpr bool support_locking = false; + constexpr gl::GpuPreference gpu_preference = gl::PreferIntegratedGpu; + context_provider = new content::ContextProviderCommandBuffer( + std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, + gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, url, + gpu_preference, automatic_flushes, support_locking, + gpu::SharedMemoryLimits(), attrs, NULL, + command_buffer_metrics::DISPLAY_COMPOSITOR_ONSCREEN_CONTEXT); } if (!context_provider.get()) { LOG(ERROR) << "Failed to create 3D context for compositor."; - compositor->SetOutputSurface(scoped_ptr()); + compositor->SetOutputSurface(std::unique_ptr()); + } + + std::unique_ptr begin_frame_source; + if (!compositor->GetRendererSettings().disable_display_vsync) { + begin_frame_source.reset(new cc::DelayBasedBeginFrameSource( + base::MakeUnique( + compositor->task_runner().get()))); + } else { + begin_frame_source.reset(new cc::BackToBackBeginFrameSource( + base::MakeUnique( + compositor->task_runner().get()))); } - scoped_ptr real_output_surface = make_scoped_ptr( - new MailboxOutputSurfaceEfl(context_provider, cc::RGBA_8888)); - real_output_surface->SetCompositorClient(compositor->client()); + std::unique_ptr display_output_surface = + base::WrapUnique( + new MailboxOutputSurfaceEfl(context_provider, cc::RGBA_8888)); + display_output_surface->SetCompositorClient(compositor->client()); + + std::unique_ptr scheduler(new cc::DisplayScheduler( + begin_frame_source.get(), compositor->task_runner().get(), + display_output_surface->capabilities().max_frames_pending)); cc::SurfaceManager* surface_manager = surface_manager_.get(); - display_client_.reset(new cc::OnscreenDisplayClient( - std::move(real_output_surface), surface_manager, GetSharedBitmapManager(), - GetGpuMemoryBufferManager(), compositor->GetRendererSettings(), - compositor->task_runner())); - scoped_ptr surface_output_surface( - new cc::SurfaceDisplayOutputSurface(surface_manager, - compositor->surface_id_allocator(), - context_provider, nullptr)); - display_client_->set_surface_output_surface(surface_output_surface.get()); - surface_output_surface->set_display_client(display_client_.get()); - display_client_->display()->Resize(compositor->size()); - compositor->SetOutputSurface(std::move(surface_output_surface)); -} - -scoped_ptr ContextFactoryEfl::CreateReflector( + display_ = base::MakeUnique( + surface_manager, GetSharedBitmapManager(), GetGpuMemoryBufferManager(), + compositor->GetRendererSettings(), + compositor->surface_id_allocator()->id_namespace(), + std::move(begin_frame_source), std::move(display_output_surface), + std::move(scheduler), base::MakeUnique( + compositor->task_runner().get())); + + std::unique_ptr delegated_output_surface( + new cc::SurfaceDisplayOutputSurface( + surface_manager, compositor->surface_id_allocator(), display_.get(), + context_provider, nullptr)); + + display_->Resize(compositor->size()); + compositor->SetOutputSurface(std::move(delegated_output_surface)); +} + +std::unique_ptr ContextFactoryEfl::CreateReflector( ui::Compositor* mirrored_compositor, ui::Layer* mirroring_layer) { - return make_scoped_ptr(new FakeReflector); + return base::WrapUnique(new FakeReflector); } void ContextFactoryEfl::RemoveReflector(ui::Reflector* reflector) {} @@ -132,17 +136,20 @@ ContextFactoryEfl::SharedMainThreadContextProvider() { attrs.lose_context_when_out_of_memory = true; scoped_refptr context_provider; - content::BrowserGpuChannelHostFactory* factory = - content::BrowserGpuChannelHostFactory::instance(); - content::CauseForGpuLaunch cause = content:: - CAUSE_FOR_GPU_LAUNCH_WEBGRAPHICSCONTEXT3DCOMMANDBUFFERIMPL_INITIALIZE; scoped_refptr gpu_channel_host( - factory->EstablishGpuChannelSync(cause)); + BrowserGpuChannelHostFactory::instance()->EstablishGpuChannelSync( + CAUSE_FOR_GPU_LAUNCH_BROWSER_SHARED_MAIN_THREAD_CONTEXT)); if (gpu_channel_host.get() && !gpu_channel_host->IsLost()) { - shared_main_thread_contexts_ = - content::ContextProviderCommandBuffer::Create( - CreateGpuProcessViewContext(gpu_channel_host, attrs, 0), - content::BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); + GURL url("chrome://gpu/Compositor::createContext3D"); + constexpr bool automatic_flushes = false; + constexpr bool support_locking = false; + constexpr gl::GpuPreference gpu_preference = gl::PreferIntegratedGpu; + shared_main_thread_contexts_ = new content::ContextProviderCommandBuffer( + std::move(gpu_channel_host), gpu::GPU_STREAM_DEFAULT, + gpu::GpuStreamPriority::NORMAL, gpu::kNullSurfaceHandle, url, + gpu_preference, automatic_flushes, support_locking, + gpu::SharedMemoryLimits(), attrs, NULL, + command_buffer_metrics::BROWSER_OFFSCREEN_MAINTHREAD_CONTEXT); } if (!shared_main_thread_contexts_->BindToCurrentThread()) @@ -173,10 +180,10 @@ cc::TaskGraphRunner* ContextFactoryEfl::GetTaskGraphRunner() { return task_graph_runner_.get(); } -scoped_ptr +std::unique_ptr ContextFactoryEfl::CreateSurfaceIdAllocator() { - scoped_ptr allocator = - make_scoped_ptr(new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); + std::unique_ptr allocator = base::WrapUnique( + new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); if (GetSurfaceManager()) allocator->RegisterSurfaceIdNamespace(GetSurfaceManager()); return allocator; @@ -184,8 +191,8 @@ ContextFactoryEfl::CreateSurfaceIdAllocator() { void ContextFactoryEfl::ResizeDisplay(ui::Compositor* compositor, const gfx::Size& size) { - if (display_client_) - display_client_->display()->Resize(size); + if (display_) + display_->Resize(size); } ui::ContextFactory* ContextFactoryEfl::GetContextFactory() { @@ -196,23 +203,22 @@ cc::SurfaceManager* ContextFactoryEfl::GetSurfaceManager() { return surface_manager_.get(); } -GLHelper* ContextFactoryEfl::GetGLHelper() { +display_compositor::GLHelper* ContextFactoryEfl::GetGLHelper() { if (!gl_helper_) { scoped_refptr provider = SharedMainThreadContextProvider(); if (provider.get()) - gl_helper_.reset( - new GLHelper(provider->ContextGL(), provider->ContextSupport())); + gl_helper_.reset(new display_compositor::GLHelper( + provider->ContextGL(), provider->ContextSupport())); } return gl_helper_.get(); } -void ContextFactoryEfl::AddObserver(ImageTransportFactoryObserver* observer) { +void ContextFactoryEfl::AddObserver(ui::ContextFactoryObserver* observer) { observer_list_.AddObserver(observer); } -void ContextFactoryEfl::RemoveObserver( - ImageTransportFactoryObserver* observer) { +void ContextFactoryEfl::RemoveObserver(ui::ContextFactoryObserver* observer) { observer_list_.RemoveObserver(observer); } diff --git a/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.h b/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.h index 5049b57..768e7fc 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.h +++ b/tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.h @@ -5,11 +5,11 @@ #ifndef CONTENT_BROWSER_COMPOSITOR_CONTEXT_FACTORY_EFL_H_ #define CONTENT_BROWSER_COMPOSITOR_CONTEXT_FACTORY_EFL_H_ +#include "cc/surfaces/display.h" #include "content/browser/compositor/image_transport_factory.h" #include "ui/compositor/compositor.h" namespace cc { -class OnscreenDisplayClient; class SingleThreadTaskGraphRunner; class SurfaceManager; } @@ -25,8 +25,8 @@ class ContextFactoryEfl : public ui::ContextFactory, // ui::ContextFactory implementation. void CreateOutputSurface(base::WeakPtr compositor) override; - scoped_ptr CreateReflector(ui::Compositor* source, - ui::Layer* target) override; + std::unique_ptr CreateReflector(ui::Compositor* source, + ui::Layer* target) override; void RemoveReflector(ui::Reflector* reflector) override; void RemoveCompositor(ui::Compositor* compositor) override; scoped_refptr SharedMainThreadContextProvider() override; @@ -36,24 +36,28 @@ class ContextFactoryEfl : public ui::ContextFactory, cc::SharedBitmapManager* GetSharedBitmapManager() override; gpu::GpuMemoryBufferManager* GetGpuMemoryBufferManager() override; cc::TaskGraphRunner* GetTaskGraphRunner() override; - scoped_ptr CreateSurfaceIdAllocator() override; + std::unique_ptr CreateSurfaceIdAllocator() override; void ResizeDisplay(ui::Compositor* compositor, const gfx::Size& size) override; + void SetAuthoritativeVSyncInterval(ui::Compositor* compositor, + base::TimeDelta interval) override {} + + void SetOutputIsSecure(ui::Compositor* compositor, bool secure) override {} // ImageTransportFactory implementation. ui::ContextFactory* GetContextFactory() override; cc::SurfaceManager* GetSurfaceManager() override; - GLHelper* GetGLHelper() override; - void AddObserver(ImageTransportFactoryObserver* observer) override; - void RemoveObserver(ImageTransportFactoryObserver* observer) override; + display_compositor::GLHelper* GetGLHelper() override; + void AddObserver(ui::ContextFactoryObserver* observer) override; + void RemoveObserver(ui::ContextFactoryObserver* observer) override; private: - scoped_ptr gl_helper_; - base::ObserverList observer_list_; - scoped_ptr surface_manager_; + std::unique_ptr gl_helper_; + base::ObserverList observer_list_; + std::unique_ptr surface_manager_; uint32_t next_surface_id_namespace_; - scoped_ptr display_client_; - scoped_ptr task_graph_runner_; + std::unique_ptr display_; + std::unique_ptr task_graph_runner_; scoped_refptr shared_main_thread_contexts_; DISALLOW_COPY_AND_ASSIGN(ContextFactoryEfl); diff --git a/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc b/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc index c83065d..a834643 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc +++ b/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc @@ -4,7 +4,7 @@ #include "content/browser/compositor/mailbox_output_surface_efl.h" -#include "base/thread_task_runner_handle.h" +#include "base/threading/thread_task_runner_handle.h" #include "build/tizen_version.h" #include "cc/output/output_surface_client.h" #include "cc/raster/single_thread_task_graph_runner.h" @@ -21,7 +21,7 @@ namespace content { MailboxOutputSurfaceEfl::MailboxOutputSurfaceEfl( const scoped_refptr& context_provider, cc::ResourceFormat format) - : cc::OutputSurface(context_provider), + : cc::OutputSurface(context_provider, nullptr, nullptr), swap_buffers_completion_callback_( base::Bind(&MailboxOutputSurfaceEfl::OnSwapBuffersCompleted, base::Unretained(this))), @@ -136,7 +136,7 @@ void MailboxOutputSurfaceEfl::BindFramebuffer() { } void MailboxOutputSurfaceEfl::DrawTexture( - scoped_ptr gl_frame_data) { + std::unique_ptr gl_frame_data) { // Draw texture on RWHV if (gl_frame_data) { compositor_client_->GetTextureFromMailbox(&gl_frame_data->mailbox, @@ -145,9 +145,10 @@ void MailboxOutputSurfaceEfl::DrawTexture( } void MailboxOutputSurfaceEfl::OnSwapAck( - scoped_ptr gl_frame_data) { + std::unique_ptr gl_frame_data) { // Ignore message if it's a stale one coming from a different output surface // (e.g. after a lost context). + if (!gl_frame_data->mailbox.IsZero()) { DCHECK(!gl_frame_data->size.IsEmpty()); // The browser could be returning the oldest or any other pending texture @@ -191,16 +192,16 @@ void MailboxOutputSurfaceEfl::OnSwapAck( client_->DidSwapBuffersComplete(); } -void MailboxOutputSurfaceEfl::SwapBuffers(cc::CompositorFrame* frame) { - DCHECK(frame->gl_frame_data); +void MailboxOutputSurfaceEfl::SwapBuffers(cc::CompositorFrame frame) { + DCHECK(frame.gl_frame_data); DCHECK(!surface_size_.IsEmpty()); DCHECK(surface_size_ == current_backing_.size); - DCHECK(frame->gl_frame_data->size == current_backing_.size); + DCHECK(frame.gl_frame_data->size == current_backing_.size); DCHECK(!current_backing_.mailbox.IsZero() || context_provider_->ContextGL()->GetGraphicsResetStatusKHR() != GL_NO_ERROR); - frame->gl_frame_data->mailbox = current_backing_.mailbox; + frame.gl_frame_data->mailbox = current_backing_.mailbox; // Using glFinish call instead of glFlush, fixes black screen issue with // static pages and IE Fish page. @@ -223,11 +224,11 @@ void MailboxOutputSurfaceEfl::SwapBuffers(cc::CompositorFrame* frame) { gpu::SyncToken sync_token; gl->GenSyncTokenCHROMIUM(fence_sync, sync_token.GetData()); - frame->gl_frame_data->sync_token = sync_token; + frame.gl_frame_data->sync_token = sync_token; base::Closure closure = base::Bind(&MailboxOutputSurfaceEfl::OnSwapAck, base::Unretained(this), - base::Passed(&frame->gl_frame_data)); + base::Passed(&frame.gl_frame_data)); context_provider()->ContextSupport()->SignalSyncToken(sync_token, closure); @@ -237,6 +238,12 @@ void MailboxOutputSurfaceEfl::SwapBuffers(cc::CompositorFrame* frame) { current_backing_ = TransferableFrame(); } +uint32_t MailboxOutputSurfaceEfl::GetFramebufferCopyTextureFormat() { + auto* gl = + static_cast(context_provider_.get()); + return gl->GetCopyTextureInternalFormat(); +} + bool MailboxOutputSurfaceEfl::BindToClient(cc::OutputSurfaceClient* client) { if (!OutputSurface::BindToClient(client)) return false; @@ -256,7 +263,8 @@ gpu::CommandBufferProxyImpl* MailboxOutputSurfaceEfl::GetCommandBufferProxy() { void MailboxOutputSurfaceEfl::OnSwapBuffersCompleted( const std::vector& latency_info, - gfx::SwapResult result) { + gfx::SwapResult result, + const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac) { RenderWidgetHostImpl::CompositorFrameDrawn(latency_info); OutputSurface::OnSwapBuffersComplete(); } diff --git a/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h b/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h index aa861b6..ac3e328 100644 --- a/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h +++ b/tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h @@ -30,18 +30,22 @@ class MailboxOutputSurfaceEfl : public cc::OutputSurface { void DiscardBackbuffer() override; void Reshape(const gfx::Size& size, float scale_factor, bool alpha) override; void BindFramebuffer() override; - void SwapBuffers(cc::CompositorFrame* frame) override; + void SwapBuffers(cc::CompositorFrame frame) override; void SetCompositorClient(ui::CompositorClient* client) { compositor_client_ = client; } + uint32_t GetFramebufferCopyTextureFormat() override; + private: - void OnSwapAck(scoped_ptr gl_frame_data); - void DrawTexture(scoped_ptr gl_frame_data); + void OnSwapAck(std::unique_ptr gl_frame_data); + void DrawTexture(std::unique_ptr gl_frame_data); gpu::CommandBufferProxyImpl* GetCommandBufferProxy(); - void OnSwapBuffersCompleted(const std::vector& latency_info, - gfx::SwapResult result); + void OnSwapBuffersCompleted( + const std::vector& latency_info, + gfx::SwapResult result, + const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac); struct TransferableFrame { TransferableFrame(); @@ -55,8 +59,10 @@ class MailboxOutputSurfaceEfl : public cc::OutputSurface { gfx::Size size; }; - base::CancelableCallback&, - gfx::SwapResult)> + base::CancelableCallback&, + gfx::SwapResult, + const gpu::GpuProcessHostedCALayerTreeParamsMac* params_mac)> swap_buffers_completion_callback_; ui::CompositorClient* compositor_client_; diff --git a/tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.h b/tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.h index b65eabc..3552481 100644 --- a/tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.h +++ b/tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.h @@ -7,7 +7,6 @@ #include -#include "base/memory/scoped_ptr.h" #include "base/synchronization/lock.h" #include "content/browser/device_sensors/device_sensors_consts.h" #include "content/common/device_sensors/device_motion_hardware_buffer.h" diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/disambiguation_popup_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/disambiguation_popup_efl.cc index f3d7c17..1021ba9 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/disambiguation_popup_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/disambiguation_popup_efl.cc @@ -12,7 +12,7 @@ #include "content/browser/renderer_host/web_event_factory_efl.h" #include "content/common/paths_efl.h" #include "ui/events/event.h" -#include "ui/gfx/screen.h" +#include "ui/display/screen.h" #if defined(OS_TIZEN_MOBILE) #include @@ -193,7 +193,7 @@ void DisambiguationPopupEfl::PrepareMouseEventForForward(T* event) { int parent_view_x = 0, parent_view_y = 0; evas_object_geometry_get(parent_view_, &parent_view_x, &parent_view_y, 0, 0); - float device_scale_factor = gfx::Screen::GetScreen()-> + float device_scale_factor = display::Screen::GetScreen()-> GetPrimaryDisplay().device_scale_factor(); event->canvas.x = target_rect_x + (parent_view_x * device_scale_factor); event->canvas.y = target_rect_y + (parent_view_y * device_scale_factor); 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 61728f8..d7205b6 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 @@ -19,10 +19,10 @@ #include "base/trace_event/trace_event.h" #include "base/message_loop/message_loop.h" #include "base/strings/string_number_conversions.h" -#include "base/thread_task_runner_handle.h" +#include "base/threading/thread_task_runner_handle.h" #include "base/logging.h" #include "base/strings/utf_string_conversions.h" -#include "content/browser/compositor/gl_helper.h" +#include "components/display_compositor/gl_helper.h" #include "content/browser/gpu/browser_gpu_channel_host_factory.h" #include "content/browser/gpu/compositor_util.h" #include "content/browser/renderer_host/render_widget_host_impl.h" @@ -58,7 +58,6 @@ #include "third_party/WebKit/public/web/WebTouchPoint.h" #include "ui/base/clipboard/clipboard_helper_efl.h" #include "ui/base/layout.h" -#include "ui/base/touch/selection_bound.h" #include "ui/events/blink/blink_event_util.h" #include "ui/events/event_switches.h" #include "ui/events/event_utils.h" @@ -67,11 +66,12 @@ #undef private #include "ui/events/gestures/gesture_recognizer_impl_efl.h" #include "ui/compositor/compositor.h" -#include "ui/gfx/device_display_info_efl.h" -#include "ui/gfx/display.h" +#include "ui/display/display.h" +#include "ui/display/screen.h" +#include "ui/display/device_display_info_efl.h" #include "ui/gfx/geometry/dip_util.h" #include "ui/gfx/geometry/rect.h" -#include "ui/gfx/screen.h" +#include "ui/gfx/selection_bound.h" #include "ui/gl/gl_shared_context_efl.h" #if defined(OS_TIZEN_MOBILE) @@ -94,38 +94,22 @@ namespace content { namespace { -ui::SelectionBound::Type ConvertSelectionBoundType( - cc::SelectionBoundType type) { - switch (type) { - case cc::SELECTION_BOUND_LEFT: - return ui::SelectionBound::LEFT; - case cc::SELECTION_BOUND_RIGHT: - return ui::SelectionBound::RIGHT; - case cc::SELECTION_BOUND_CENTER: - return ui::SelectionBound::CENTER; - case cc::SELECTION_BOUND_EMPTY: - return ui::SelectionBound::EMPTY; - } - NOTREACHED() << "Unknown selection bound type"; - return ui::SelectionBound::EMPTY; -} - -ui::SelectionBound ConvertSelectionBound( - const cc::ViewportSelectionBound& bound) { - ui::SelectionBound ui_bound; - ui_bound.set_type(ConvertSelectionBoundType(bound.type)); - ui_bound.set_visible(bound.visible); - if (ui_bound.type() != ui::SelectionBound::EMPTY) - ui_bound.SetEdge(bound.edge_top, bound.edge_bottom); - return ui_bound; -} - bool IsShiftKey(const char * key) { if (!key) return false; return !strcmp(key, "Shift_L") || !strcmp(key, "Shift_R"); } +// Creates a WebGestureEvent from a ui::GestureEvent. Note that it does not +// populate the event coordinates (i.e. |x|, |y|, |globalX|, and |globalY|). So +// the caller must populate these fields. +blink::WebGestureEvent MakeWebGestureEventFromUIEvent( + const ui::GestureEvent& event) { + return ui::CreateWebGestureEvent( + event.details(), event.time_stamp(), event.location_f(), + event.root_location_f(), event.flags(), event.unique_touch_event_id()); +} + } // namespace class ScreenshotCapturedCallback { @@ -144,7 +128,7 @@ class ScreenshotCapturedCallback { void RenderWidgetHostViewBase::GetDefaultScreenInfo( blink::WebScreenInfo* results) { - const gfx::Display display = gfx::Screen::GetScreen()->GetPrimaryDisplay(); + const display::Display display = display::Screen::GetScreen()->GetPrimaryDisplay(); results->rect = display.bounds(); results->availableRect = display.work_area(); @@ -200,7 +184,7 @@ RenderWidgetHostViewEfl::RenderWidgetHostViewEfl(RenderWidgetHost* widget, SetDoubleTapSupportEnabled(touch_events_enabled_); - device_scale_factor_ = gfx::Screen::GetScreen()-> + device_scale_factor_ = display::Screen::GetScreen()-> GetPrimaryDisplay().device_scale_factor(); host_->SetView(this); @@ -383,7 +367,7 @@ static void GLCheckProgramHelper(Evas_GL_API* api, GLuint program, api->glGetProgramiv(program, GL_LINK_STATUS, &status); if (!status) { const GLsizei buf_length = 2048; - scoped_ptr log(new GLchar[buf_length]); + std::unique_ptr log(new GLchar[buf_length]); GLsizei length = 0; api->glGetProgramInfoLog(program, buf_length, &length, log.get()); LOG(ERROR) << "GL program link failed in: " << file << ":" << line @@ -401,7 +385,7 @@ static void GLCheckShaderHelper( api->glGetShaderiv(shader, GL_COMPILE_STATUS, &status); if (!status) { const GLsizei buf_length = 2048; - scoped_ptr log(new GLchar[buf_length]); + std::unique_ptr log(new GLchar[buf_length]); GLsizei length = 0; api->glGetShaderInfoLog(shader, buf_length, &length, log.get()); LOG(ERROR) << "GL shader compile failed in " << file << ":" << line @@ -471,7 +455,7 @@ bool RenderWidgetHostViewEfl::MakeCurrent() { } void RenderWidgetHostViewEfl::UpdateRotationDegrees(int rotation_degrees) { - gfx::DeviceDisplayInfoEfl display_info; + display::DeviceDisplayInfoEfl display_info; display_info.SetRotationDegrees(rotation_degrees); Send(new ViewMsg_UpdateRotationDegrees(host_->GetRoutingID(), display_info.GetRotationDegrees())); @@ -484,7 +468,7 @@ void RenderWidgetHostViewEfl::EnsureDeviceDisplayInfoInitialized() { initialized = true; - gfx::DeviceDisplayInfoEfl display_info; + display::DeviceDisplayInfoEfl display_info; int display_width = 0; int display_height = 0; @@ -928,8 +912,14 @@ void RenderWidgetHostViewEfl::SelectClosestWord(const gfx::Point& touch_point) { int view_x, view_y; EvasToBlinkCords(touch_point.x(), touch_point.y(), &view_x, &view_y); +#if !defined(EWK_BRINGUP) +// [M53_2785] The SelectClosestWord function was removed by +// commit 9720a4494c8bcd24d1f496feec5cfac7582103d2 in s-chromium +// It will be fixed by webview team. +// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2122 Send(new ViewMsg_SelectClosestWord( host_->GetRoutingID(), view_x, view_y)); +#endif // EWK_BRINGUP } void RenderWidgetHostViewEfl::ShowDisambiguationPopup(const gfx::Rect& rect_pixels, const SkBitmap& zoomed_bitmap) { @@ -978,9 +968,8 @@ bool RenderWidgetHostViewEfl::CanDispatchToConsumer(ui::GestureConsumer* consume return this == consumer; } -void RenderWidgetHostViewEfl::DispatchCancelTouchEvent( - ui::GestureConsumer* raw_input_consumer, - ui::TouchEvent* event) {} +void RenderWidgetHostViewEfl::DispatchSyntheticTouchEvent(ui::TouchEvent* event) { +} void RenderWidgetHostViewEfl::DispatchGestureEvent( GestureConsumer* raw_input_consumer, @@ -1000,11 +989,11 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurface( void RenderWidgetHostViewEfl::CopyOutputCallback( int request_id, - scoped_ptr result) { + std::unique_ptr result) { if (!result->HasBitmap()) return; - scoped_ptr snapshot = std::move(result->TakeBitmap()); + std::unique_ptr snapshot = std::move(result->TakeBitmap()); Evas_Object* image = NULL; if (!snapshot.get()->empty()) { @@ -1028,7 +1017,7 @@ void RenderWidgetHostViewEfl::GetSnapshotAsync(const gfx::Rect& snapshot_area, i if (!compositor_) return; - scoped_ptr request = cc::CopyOutputRequest::CreateBitmapRequest( + std::unique_ptr request = cc::CopyOutputRequest::CreateBitmapRequest( base::Bind(&RenderWidgetHostViewEfl::CopyOutputCallback, weak_factory_.GetWeakPtr(), request_id)); request->set_area(snapshot_area); compositor_->root_layer()->RequestCopyOfOutput(std::move(request)); @@ -1071,7 +1060,7 @@ bool RenderWidgetHostViewEfl::RequestSnapshotAsync(const Eina_Rectangle rect, } void RenderWidgetHostViewEfl::BeginFrameSubscription( - scoped_ptr subscriber) { + std::unique_ptr subscriber) { delegated_frame_host_->BeginFrameSubscription(std::move(subscriber)); } @@ -1119,11 +1108,11 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceFinishedForVideo( base::WeakPtr rwhvefl, const base::Callback& callback, scoped_refptr subscriber_texture, - scoped_ptr release_callback, + std::unique_ptr release_callback, bool result) { callback.Run(result); - GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper(); + display_compositor::GLHelper* gl_helper = ImageTransportFactory::GetInstance()->GetGLHelper(); gpu::SyncToken sync_token; if (gl_helper) gl_helper->GenerateSyncToken(&sync_token); @@ -1141,7 +1130,7 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo( scoped_refptr subscriber_texture, scoped_refptr video_frame, const base::Callback& callback, - scoped_ptr result) { + std::unique_ptr result) { base::ScopedClosureRunner scoped_callback_runner( base::Bind(callback, gfx::Rect(), false)); base::ScopedClosureRunner scoped_return_subscriber_texture( @@ -1173,7 +1162,7 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo( if (!result->HasTexture()) { DCHECK(result->HasBitmap()); - scoped_ptr bitmap = result->TakeBitmap(); + std::unique_ptr bitmap = result->TakeBitmap(); // Scale the bitmap to the required size, if necessary. SkBitmap scaled_bitmap; if (result->size().width() != region_in_frame.width() || @@ -1202,14 +1191,14 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo( } ImageTransportFactory* factory = ImageTransportFactory::GetInstance(); - GLHelper* gl_helper = factory->GetGLHelper(); + display_compositor::GLHelper* gl_helper = factory->GetGLHelper(); if (!gl_helper) return; if (subscriber_texture.get() && !subscriber_texture->texture_id()) return; cc::TextureMailbox texture_mailbox; - scoped_ptr release_callback; + std::unique_ptr release_callback; result->TakeTexture(&texture_mailbox, &release_callback); DCHECK(texture_mailbox.IsTexture()); if (!texture_mailbox.IsTexture()) @@ -1217,17 +1206,17 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo( gfx::Rect result_rect(result->size()); - content::ReadbackYUVInterface* yuv_readback_pipeline = + display_compositor::ReadbackYUVInterface* yuv_readback_pipeline = rwhvefl->yuv_readback_pipeline_.get(); if (yuv_readback_pipeline == NULL || yuv_readback_pipeline->scaler()->SrcSize() != result_rect.size() || yuv_readback_pipeline->scaler()->SrcSubrect() != result_rect || yuv_readback_pipeline->scaler()->DstSize() != region_in_frame.size()) { - GLHelper::ScalerQuality quality = GLHelper::SCALER_QUALITY_FAST; + display_compositor::GLHelper::ScalerQuality quality = display_compositor::GLHelper::SCALER_QUALITY_FAST; // If we're scaling up, we can use the "best" quality. if (result_rect.size().width() < region_in_frame.size().width() && result_rect.size().height() < region_in_frame.size().height()) - quality = GLHelper::SCALER_QUALITY_BEST; + quality = display_compositor::GLHelper::SCALER_QUALITY_BEST; rwhvefl->yuv_readback_pipeline_.reset( gl_helper->CreateReadbackPipelineYUV(quality, @@ -1248,10 +1237,14 @@ void RenderWidgetHostViewEfl::CopyFromCompositingSurfaceHasResultForVideo( subscriber_texture, base::Passed(&release_callback)); yuv_readback_pipeline->ReadbackYUV( - texture_mailbox.mailbox(), - texture_mailbox.sync_token(), - video_frame, - video_frame->visible_rect().origin(), + texture_mailbox.mailbox(), texture_mailbox.sync_token(), + video_frame->visible_rect(), + video_frame->stride(media::VideoFrame::kYPlane), + video_frame->data(media::VideoFrame::kYPlane), + video_frame->stride(media::VideoFrame::kUPlane), + video_frame->data(media::VideoFrame::kUPlane), + video_frame->stride(media::VideoFrame::kVPlane), + video_frame->data(media::VideoFrame::kVPlane), region_in_frame.origin(), finished_callback); } @@ -1277,12 +1270,6 @@ void RenderWidgetHostViewEfl::GetScreenInfo( RenderWidgetHostViewBase::GetDefaultScreenInfo(results); } -bool RenderWidgetHostViewEfl::GetScreenColorProfile(std::vector* color_profile) { - DCHECK(color_profile->empty()); - NOTREACHED(); - return false; -} - gfx::Rect RenderWidgetHostViewEfl::GetBoundsInRootWindow() { Ecore_Evas* ee = ecore_evas_ecore_evas_get(evas_); int x, y, w, h; @@ -1677,7 +1664,7 @@ void RenderWidgetHostViewEfl::HandleGesture( void RenderWidgetHostViewEfl::HandleGesture(ui::GestureEvent* event) { blink::WebGestureEvent gesture = - content::MakeWebGestureEventFromUIEvent(*event); + MakeWebGestureEventFromUIEvent(*event); gesture.x = event->x(); gesture.y = event->y(); @@ -1721,7 +1708,7 @@ void RenderWidgetHostViewEfl::ProcessAckedTouchEvent( ui::EventResult result = (ack_result == INPUT_EVENT_ACK_STATE_CONSUMED) ? ui::ER_HANDLED : ui::ER_UNHANDLED; - scoped_ptr gestures; + std::unique_ptr gestures; gestures.reset(gesture_recognizer_->AckTouchEvent( touch.event.uniqueTouchEventId, result, this)); @@ -1735,7 +1722,7 @@ void RenderWidgetHostViewEfl::ProcessAckedTouchEvent( EdgeEffect& RenderWidgetHostViewEfl::EnsureEdgeEffect() { if (!edge_effect_) - edge_effect_ = make_scoped_ptr(new EdgeEffect(content_image_elm_host_)); + edge_effect_ = base::WrapUnique(new EdgeEffect(content_image_elm_host_)); return *edge_effect_.get(); } @@ -1779,56 +1766,27 @@ void RenderWidgetHostViewEfl::GetTextureFromMailbox(gpu::Mailbox* mailbox, } void RenderWidgetHostViewEfl::OnSwapCompositorFrame( - uint32_t output_surface_id, scoped_ptr frame) { - // TODO(prashant.n): Software frames not supported. So with - // those frames black screen will appear. - last_scroll_offset_ = frame->metadata.root_scroll_offset; + uint32_t output_surface_id, cc::CompositorFrame frame) { + last_scroll_offset_ = frame.metadata.root_scroll_offset; if (GetSelectionController()) { GetSelectionController()->SetSelectionEditable( - frame->metadata.selection.is_editable); + frame.metadata.selection.is_editable); GetSelectionController()->SetSelectionEmpty( - frame->metadata.selection.is_empty_text_form_control); - ui::SelectionBound start = ConvertSelectionBound(frame->metadata.selection.start); - ui::SelectionBound end = ConvertSelectionBound(frame->metadata.selection.end); - GetSelectionController()->OnSelectionChanged(start, end); - } + frame.metadata.selection.is_empty_text_form_control); - if (frame->gl_frame_data) { - cc::CompositorFrameAck ack; - ack.gl_frame_data = std::move(frame->gl_frame_data); - surface_size_ = ack.gl_frame_data->size; - if (evas_gl_initialized_) { - std::swap(ack.gl_frame_data->mailbox, pending_mailbox_); - gpu::gles2::MailboxManager* manager = - SharedMailboxManager::GetMailboxManager(); - - gpu::gles2::Texture* texture = - manager->ConsumeTexture(pending_mailbox_); - if (texture != NULL) { - texture_id_ = GetTextureIdFromTexture(texture); - evas_object_image_pixels_dirty_set(content_image_, true); - } else { - LOG(ERROR) << "Frame produced without texture."; - } - } - - ack.gl_frame_data->sync_token.Clear(); - - // TODO(prashant.n): Check if ack should be sent after frame is drawn. - host_->SendSwapCompositorFrameAck(host_->GetRoutingID(), - output_surface_id, - host_->GetProcess()->GetID(), - ack); + GetSelectionController()->OnSelectionChanged( + frame.metadata.selection.start, frame.metadata.selection.end); + } - } else if (frame->delegated_frame_data) { + if (frame.delegated_frame_data) { // ack is sent by delegated frame host delegated_frame_host_->SwapDelegatedFrame(output_surface_id, std::move(frame)); } else { - NOTREACHED(); + LOG(ERROR) << "Non-delegated renderer path (software or gl) is no longer " + << "supported. With this black screen will occur."; } - } void RenderWidgetHostViewEfl::ClearCompositorFrame () { @@ -1864,6 +1822,10 @@ gfx::Rect RenderWidgetHostViewEfl::GetIMERect() const { /////////////////////////////////////////////////////////////////////////// // DelegatedFrameHost, public: +int RenderWidgetHostViewEfl::DelegatedFrameHostGetGpuMemoryBufferClientId() const { + return host_->GetProcess()->GetID(); +} + ui::Layer* RenderWidgetHostViewEfl::DelegatedFrameHostGetLayer() const { return root_layer_.get(); } @@ -1872,6 +1834,15 @@ bool RenderWidgetHostViewEfl::DelegatedFrameHostIsVisible() const { return !host_->is_hidden(); } +SkColor RenderWidgetHostViewEfl::DelegatedFrameHostGetGutterColor(SkColor color) const { + // When making an element on the page fullscreen the element's background + // may not match the page's, so use black as the gutter color to avoid + // flashes of brighter colors during the transition. + if (host_->delegate() && host_->delegate()->IsFullscreenForCurrentTab()) + return SK_ColorBLACK; + return color; +} + gfx::Size RenderWidgetHostViewEfl::DelegatedFrameHostDesiredSizeInDIP() const{ gfx::Rect bounds = GetViewBoundsInPix(); return bounds.size(); @@ -1886,11 +1857,11 @@ bool RenderWidgetHostViewEfl::DelegatedFrameCanCreateResizeLock() const { return false; } -scoped_ptr +std::unique_ptr RenderWidgetHostViewEfl::DelegatedFrameHostCreateResizeLock( bool defer_compositor_lock) { ResizeLock* lock = NULL; - return scoped_ptr(lock); + return std::unique_ptr(lock); } void RenderWidgetHostViewEfl::DelegatedFrameHostResizeLockWasReleased() { @@ -1920,4 +1891,7 @@ void RenderWidgetHostViewEfl::DelegatedFrameHostUpdateVSyncParameters( const base::TimeDelta& interval) { host_->UpdateVSyncParameters(timebase, interval); } + +void RenderWidgetHostViewEfl::SetBeginFrameSource(cc::BeginFrameSource* source) { +} } // namespace content 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 a0a5371..4ffed64 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 @@ -71,7 +71,6 @@ class EdgeEffect; class IMContextEfl; class RenderWidgetHostImpl; class RenderWidgetHostView; -class ReadbackYUVInterface; class WebContents; class ScreenshotCapturedCallback; @@ -97,7 +96,6 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl void SetBounds(const gfx::Rect&) override; gfx::Vector2dF GetLastScrollOffset() const override; gfx::NativeView GetNativeView() const override; - gfx::NativeViewId GetNativeViewId() const override; gfx::NativeViewAccessible GetNativeViewAccessible() override; bool IsSurfaceAvailableForCopy() const override; void Show() override; @@ -143,12 +141,11 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl bool CanCopyToVideoFrame() const override; void BeginFrameSubscription( - scoped_ptr subscriber) override; + std::unique_ptr subscriber) override; void EndFrameSubscription() override; void DidOverscroll(const DidOverscrollParams& params) override; bool HasAcceleratedSurface(const gfx::Size&) override; void GetScreenInfo(blink::WebScreenInfo*) override; - bool GetScreenColorProfile(std::vector* color_profile) override; gfx::Rect GetBoundsInRootWindow() override; void RenderProcessGone(base::TerminationStatus, int) override; bool OnMessageReceived(const IPC::Message&) override; @@ -168,14 +165,13 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl void UnlockCompositingSurface() override; void OnSwapCompositorFrame( - uint32_t output_surface_id, scoped_ptr frame) override; + uint32_t output_surface_id, cc::CompositorFrame frame) override; void ClearCompositorFrame () override; // ui::GestureEventHelper implementation. bool CanDispatchToConsumer(ui::GestureConsumer* consumer) override; - void DispatchCancelTouchEvent(ui::GestureConsumer* raw_input_consumer, - ui::TouchEvent* event) override; + void DispatchSyntheticTouchEvent(ui::TouchEvent* event) override; void DispatchGestureEvent(GestureConsumer* raw_input_consumer, ui::GestureEvent*) override; @@ -231,12 +227,14 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl void* user_data); void OnSnapshotDataReceived(SkBitmap bitmap, int snapshotId); void CopyOutputCallback(int request_id, - scoped_ptr result); + std::unique_ptr result); // DelegatedFrameHostClient implementation. + int DelegatedFrameHostGetGpuMemoryBufferClientId() const override; ui::Layer* DelegatedFrameHostGetLayer() const override; bool DelegatedFrameHostIsVisible() const override; - scoped_ptr DelegatedFrameHostCreateResizeLock( + SkColor DelegatedFrameHostGetGutterColor(SkColor color) const override; + std::unique_ptr DelegatedFrameHostCreateResizeLock( bool defer_compositor_lock) override; bool DelegatedFrameCanCreateResizeLock() const override; gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override; @@ -251,6 +249,7 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl void DelegatedFrameHostUpdateVSyncParameters( const base::TimeTicks& timebase, const base::TimeDelta& interval) override; + void SetBeginFrameSource(cc::BeginFrameSource* source) override; bool MakeCurrent(); SelectionControllerEfl* GetSelectionController() const { @@ -271,6 +270,7 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl ~RenderWidgetHostViewEfl() override; void EnsureDeviceDisplayInfoInitialized(); + gfx::NativeViewId GetNativeViewId() const; static void OnParentViewResize(void* data, Evas*, Evas_Object*, void*); static void OnFocusIn(void* data, Evas*, Evas_Object*, void*); @@ -307,12 +307,12 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl scoped_refptr subscriber_texture, scoped_refptr video_frame, const base::Callback& callback, - scoped_ptr result); + std::unique_ptr result); static void CopyFromCompositingSurfaceFinishedForVideo( base::WeakPtr rwhvefl, const base::Callback& callback, scoped_refptr subscriber_texture, - scoped_ptr release_callback, + std::unique_ptr release_callback, bool result); static void ReturnSubscriberTexture( base::WeakPtr rwhvefl, @@ -354,11 +354,11 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl scoped_refptr evas_event_handler_; // YUV readback pipeline. - scoped_ptr + std::unique_ptr yuv_readback_pipeline_; // Subscriber that listens to frame presentation events. - scoped_ptr frame_subscriber_; + std::unique_ptr frame_subscriber_; std::vector > idle_frame_subscriber_textures_; std::set active_frame_subscriber_textures_; @@ -368,10 +368,10 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl // The gesture recognizer for this view. // In Aura GestureRecognizer is global. Should we follow that? - scoped_ptr gesture_recognizer_; + std::unique_ptr gesture_recognizer_; - scoped_ptr disambiguation_popup_; - scoped_ptr edge_effect_; + std::unique_ptr disambiguation_popup_; + std::unique_ptr edge_effect_; int current_orientation_; @@ -407,10 +407,10 @@ class CONTENT_EXPORT RenderWidgetHostViewEfl IDMap screen_capture_cb_map_; ui::Compositor* compositor_; - scoped_ptr root_layer_; - scoped_ptr delegated_frame_host_; + std::unique_ptr root_layer_; + std::unique_ptr delegated_frame_host_; - scoped_ptr selection_controller_; + std::unique_ptr selection_controller_; base::WeakPtrFactory weak_factory_; diff --git a/tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.cc b/tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.cc index f3d29f8..d0d33c4 100644 --- a/tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.cc +++ b/tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.cc @@ -10,10 +10,10 @@ #include "base/time/time.h" #include "base/strings/utf_string_conversions.h" +#include "ui/display/screen.h" #include "ui/events/event_utils.h" #include "ui/events/keycodes/keyboard_codes.h" #include "ui/events/keycodes/keyboard_code_conversion_x.h" -#include "ui/gfx/screen.h" using namespace blink; @@ -33,7 +33,7 @@ static void TranslateEvasCoordToWebKitCoord(Evas_Object *web_view, int& x, int& float GetDeviceScaleFactor() { static float device_scale_factor = 0.0f; if (!device_scale_factor) { - device_scale_factor = gfx::Screen::GetScreen()-> + device_scale_factor = display::Screen::GetScreen()-> GetPrimaryDisplay().device_scale_factor(); } return device_scale_factor; @@ -532,8 +532,10 @@ ui::TouchEvent MakeTouchEvent(Evas_Coord_Point pt, unsigned int timestamp) { TranslateEvasCoordToWebKitCoord(view, pt.x, pt.y); const float scale = GetDeviceScaleFactor(); - base::TimeDelta event_timestamp = - base::TimeDelta::FromMilliseconds(timestamp); + base::TimeTicks event_timestamp = + base::TimeTicks::FromInternalValue( + timestamp * base::Time::kMicrosecondsPerMillisecond); + if (timestamp == 0) event_timestamp = ui::EventTimeForNow(); return ui::TouchEvent(EvasTouchEventTypeToUI(state), diff --git a/tizen_src/chromium_impl/content/browser/selection/selection_box_efl.h b/tizen_src/chromium_impl/content/browser/selection/selection_box_efl.h index 022b4db..9c8b18a 100644 --- a/tizen_src/chromium_impl/content/browser/selection/selection_box_efl.h +++ b/tizen_src/chromium_impl/content/browser/selection/selection_box_efl.h @@ -7,7 +7,6 @@ #include -#include "base/memory/scoped_ptr.h" #include "content/public/common/context_menu_params.h" #include "content/public/common/menu_item.h" #include "ui/gfx/range/range.h" @@ -52,7 +51,7 @@ class SelectionBoxEfl { bool is_anchor_first_; // Contains the menu item data for which context needs to be populated - scoped_ptr context_params_; + std::unique_ptr context_params_; Evas_Object* parent_view_; }; diff --git a/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc b/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc index 10043ea..a1d1f72 100644 --- a/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc +++ b/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc @@ -16,8 +16,8 @@ #include "content/public/browser/web_contents.h" #include "content/public/browser/render_view_host.h" #include "content/public/common/context_menu_params.h" +#include "ui/display/screen.h" #include "ui/gfx/geometry/dip_util.h" -#include "ui/gfx/screen.h" namespace content { @@ -30,7 +30,7 @@ bool IsRectEmpty(const gfx::Rect& rect) { return rect == gfx::Rect(); } -gfx::Vector2dF ComputeLineOffsetFromBottom(const ui::SelectionBound& bound) { +gfx::Vector2dF ComputeLineOffsetFromBottom(const gfx::SelectionBound& bound) { gfx::Vector2dF line_offset = gfx::ScaleVector2d(bound.edge_top() - bound.edge_bottom(), 0.5f); // An offset of 8 DIPs is sufficient for most line sizes. For small lines, @@ -141,7 +141,7 @@ void SelectionControllerEfl::SetIsAnchorFirst(bool value) { } void SelectionControllerEfl::OnSelectionChanged( - const ui::SelectionBound& start, const ui::SelectionBound& end) { + const gfx::SelectionBound& start, const gfx::SelectionBound& end) { if (start_selection_ == start && end_selection_ == end) return; @@ -153,7 +153,7 @@ void SelectionControllerEfl::OnSelectionChanged( gfx::Rect truncated_end(end.edge_top_rounded(), gfx::Size(0, end.GetHeight())); static float device_scale_factor = - gfx::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); + display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); truncated_start = ConvertRectToPixel(device_scale_factor, truncated_start); truncated_end = ConvertRectToPixel(device_scale_factor, truncated_end); @@ -434,7 +434,7 @@ void SelectionControllerEfl::HandleDragBeginNotification(SelectionHandleEfl* han } float device_scale_factor = - gfx::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); + display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); gfx::PointF base = gfx::ScalePoint( gfx::PointF(stationary_handle_->GetBasePosition()), 1 / device_scale_factor); gfx::PointF extent = gfx::ScalePoint( @@ -471,7 +471,7 @@ void SelectionControllerEfl::HandleDragUpdateNotification(SelectionHandleEfl* ha case SelectionHandleEfl::HANDLE_TYPE_LEFT: case SelectionHandleEfl::HANDLE_TYPE_RIGHT: { float device_scale_factor = - gfx::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); + display::Screen::GetScreen()->GetPrimaryDisplay().device_scale_factor(); gfx::PointF extent = gfx::ScalePoint( gfx::PointF(handle->GetBasePosition()), 1 / device_scale_factor); diff --git a/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h b/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h index a739441..ec9b429 100644 --- a/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h +++ b/tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h @@ -7,16 +7,15 @@ #include -#include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "content/browser/selection/selection_box_efl.h" #include "content/browser/selection/selection_handle_efl.h" #include "content/browser/selection/selection_magnifier_efl.h" #include "content/common/content_export.h" #include "third_party/WebKit/public/web/WebInputEvent.h" -#include "ui/base/touch/selection_bound.h" #include "ui/events/event_constants.h" #include "ui/gfx/range/range.h" +#include "ui/gfx/selection_bound.h" #include "ui/gfx/geometry/rect.h" #if defined(OS_TIZEN) @@ -97,7 +96,7 @@ class CONTENT_EXPORT SelectionControllerEfl { gfx::Rect GetLeftRect(); gfx::Rect GetRightRect(); - void OnSelectionChanged(const ui::SelectionBound&, const ui::SelectionBound&); + void OnSelectionChanged(const gfx::SelectionBound&, const gfx::SelectionBound&); void OnTextInputStateChanged(); void ChangeContextMenuPosition(gfx::Point& position, int& drawDirection); @@ -181,19 +180,19 @@ class CONTENT_EXPORT SelectionControllerEfl { bool long_mouse_press_; // Saves the data that are required to draw handle and context menu - scoped_ptr selection_data_; + std::unique_ptr selection_data_; // Points to start of the selection for extending selection - scoped_ptr start_handle_; + std::unique_ptr start_handle_; // Points to the end of the selection for extending selection - scoped_ptr end_handle_; + std::unique_ptr end_handle_; // Points to the caret in edit box where cursor is present - scoped_ptr input_handle_; + std::unique_ptr input_handle_; // Points to show the contents magnified - scoped_ptr magnifier_; + std::unique_ptr magnifier_; // Helper pointer to the handle being dragged. SelectionHandleEfl* dragging_handle_; @@ -209,8 +208,8 @@ class CONTENT_EXPORT SelectionControllerEfl { WebContents& web_contents_; enum SelectionMode selection_mode_; - ui::SelectionBound start_selection_; - ui::SelectionBound end_selection_; + gfx::SelectionBound start_selection_; + gfx::SelectionBound end_selection_; }; } // namespace content diff --git a/tizen_src/chromium_impl/content/browser/speech/tts_message_filter_efl.h b/tizen_src/chromium_impl/content/browser/speech/tts_message_filter_efl.h index 7d9a7a7..3f14b3f 100644 --- a/tizen_src/chromium_impl/content/browser/speech/tts_message_filter_efl.h +++ b/tizen_src/chromium_impl/content/browser/speech/tts_message_filter_efl.h @@ -5,7 +5,6 @@ #ifndef BROWSER_SPEECH_TTS_MESSAGE_FILTER_H_ #define BROWSER_SPEECH_TTS_MESSAGE_FILTER_H_ -#include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "content/browser/speech/tts_tizen.h" #include "content/common/content_export.h" @@ -43,7 +42,7 @@ class CONTENT_EXPORT TtsMessageFilterEfl void OnResume(); void OnCancel(); - scoped_ptr tts_tizen_; + std::unique_ptr tts_tizen_; DISALLOW_COPY_AND_ASSIGN(TtsMessageFilterEfl); }; 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 dd5fcd3..effc821 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 @@ -338,7 +338,7 @@ WebContents* WebContentsImplEfl::HandleNewWebContentsCreate( // Save the created window associated with the route so we can show it // later. DCHECK_NE(MSG_ROUTING_NONE, route_id); - pending_contents_[route_id] = new_contents; + pending_contents_[std::make_pair(render_process_id, route_id)] = new_contents; AddDestructionObserver(new_contents); } diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h index fc5fc67..82aa5b9 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h @@ -69,7 +69,7 @@ class CONTENT_EXPORT WebContentsImplEfl : public WebContentsImpl { void* platform_data_; - scoped_ptr efl_delegate_; + std::unique_ptr efl_delegate_; DISALLOW_COPY_AND_ASSIGN(WebContentsImplEfl); }; 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 4b66ab8..8790254 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 @@ -21,9 +21,9 @@ #include "content/public/browser/web_contents_view_delegate.h" #include "content/public/browser/web_contents_view_efl_delegate.h" #include "efl/window_factory.h" +#include "ui/display/screen_efl.h" #include "ui/events/event_switches.h" #include "ui/gfx/image/image_skia.h" -#include "ui/gfx/screen_efl.h" #include "ui/gl/gl_shared_context_efl.h" namespace content { @@ -324,15 +324,13 @@ void WebContentsViewEfl::SetOrientation(int orientation) { WebContentsImpl& contents_impl = static_cast(*web_contents_); - RenderViewHostImpl* rvhi = - static_cast(web_contents_->GetRenderViewHost()); ResizeParams params; params.screen_info = screen_info; params.new_size = new_size; params.physical_backing_size = backing_size; params.is_fullscreen_granted = - contents_impl.IsFullscreenForCurrentTab(rvhi->GetWidget()); + contents_impl.IsFullscreenForCurrentTab(); rwh->Send(new ViewMsg_Resize(rwh->GetRoutingID(), params)); rwhv->UpdateScreenInfo(rwhv->GetNativeView()); 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 ccb65d9..ee22375 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 @@ -8,7 +8,6 @@ #include -#include "base/memory/scoped_ptr.h" #include "content/browser/renderer_host/render_view_host_delegate_view.h" #include "content/browser/web_contents/web_contents_view.h" #include "content/common/content_export.h" @@ -89,19 +88,19 @@ class CONTENT_EXPORT WebContentsViewEfl private: // Our optional, generic views wrapper. - scoped_ptr delegate_; + std::unique_ptr delegate_; // Delegate specific to EFL port of chromium. // May be NULL in case of non EWK apps. - scoped_ptr efl_delegate_; + std::unique_ptr efl_delegate_; Evas_Object* native_view_; WebDragDestDelegate* drag_dest_delegate_; // Helpers handling drag source/destination related interactions with EFL. - scoped_ptr drag_source_; - scoped_ptr drag_dest_; + std::unique_ptr drag_source_; + std::unique_ptr drag_dest_; int orientation_; bool touch_enabled_; diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.cc b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.cc index dba67c2..e604bdc 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.cc +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.cc @@ -9,7 +9,7 @@ #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/browser/web_drag_dest_delegate.h" #include "content/public/browser/render_view_host.h" -#include "ui/gfx/screen.h" +#include "ui/display/screen.h" using blink::WebDragOperation; @@ -46,7 +46,7 @@ WebDragDestEfl::WebDragDestEfl(WebContents* web_contents) parent_view_(static_cast(web_contents->GetNativeView())), page_scale_factor_(1.0f), drag_initialized_(false) { - device_scale_factor_ = gfx::Screen::GetScreen()-> + device_scale_factor_ = display::Screen::GetScreen()-> GetPrimaryDisplay().device_scale_factor(); SetDragCallbacks(); } @@ -126,7 +126,9 @@ Eina_Bool WebDragDestEfl::DragDrop(Elm_Selection_Data* data) { gfx::Point(last_pointer_pos_.x() / page_scale_factor_, last_pointer_pos_.y() / page_scale_factor_); + GetRenderViewHost()->FilterDropData(drop_data_.get()); GetRenderViewHost()->DragTargetDrop( + *drop_data_, client_pt, last_pointer_pos_, modifier_flags_); diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h index 29652d5..e3cd7db 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h @@ -8,9 +8,8 @@ #include -#include "base/memory/scoped_ptr.h" #include "content/public/common/drop_data.h" -#include "third_party/WebKit/public/web/WebDragOperation.h" +#include "third_party/WebKit/public/platform/WebDragOperation.h" #include "ui/gfx/geometry/point.h" namespace content { @@ -71,7 +70,7 @@ class WebDragDestEfl { bool drag_initialized_; // The data for the current drag, or NULL if |context_| is NULL. - scoped_ptr drop_data_; + std::unique_ptr drop_data_; DISALLOW_COPY_AND_ASSIGN(WebDragDestEfl); }; diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.cc b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.cc index c7564a3..5187b4a 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.cc +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.cc @@ -8,7 +8,7 @@ #include "content/browser/web_contents/web_contents_impl.h" #include "content/public/common/drop_data.h" #include "third_party/skia/include/core/SkPixelRef.h" -#include "ui/gfx/screen.h" +#include "ui/display/screen.h" namespace content { @@ -59,7 +59,7 @@ WebDragSourceEfl::WebDragSourceEfl(WebContents* web_contents) drag_failed_(false), drag_started_(false), page_scale_factor_(1.0f) { - device_scale_factor_ = gfx::Screen::GetScreen()-> + device_scale_factor_ = display::Screen::GetScreen()-> GetPrimaryDisplay().device_scale_factor(); } diff --git a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h index a110905..5f9d738 100644 --- a/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h +++ b/tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h @@ -9,10 +9,9 @@ #include #include "base/files/file_path.h" -#include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "third_party/skia/include/core/SkBitmap.h" -#include "third_party/WebKit/public/web/WebDragOperation.h" +#include "third_party/WebKit/public/platform/WebDragOperation.h" #include "ui/gfx/geometry/point.h" #include "ui/gfx/geometry/vector2d.h" #include "url/gurl.h" @@ -57,7 +56,7 @@ class WebDragSourceEfl { // The drop data for the current drag (for drags that originate in the render // view). Non-NULL iff there is a current drag. - scoped_ptr drop_data_; + std::unique_ptr drop_data_; // The image used for depicting the drag, and the offset between the cursor // and the top left pixel. diff --git a/tizen_src/chromium_impl/content/common/paths_efl.cc b/tizen_src/chromium_impl/content/common/paths_efl.cc index b7b838a..bbea3d7 100644 --- a/tizen_src/chromium_impl/content/common/paths_efl.cc +++ b/tizen_src/chromium_impl/content/common/paths_efl.cc @@ -10,7 +10,6 @@ #include "base/files/file_path.h" #include "base/files/file_util.h" #include "base/memory/free_deleter.h" -#include "base/memory/scoped_ptr.h" #include "base/nix/xdg_util.h" #include "base/path_service.h" #include "build/tizen_version.h" @@ -57,7 +56,7 @@ bool GetDirAppDataTizen(base::FilePath& result) { } bool GetDirChromiumPrivateTizen(base::FilePath& result) { - scoped_ptr data_path(app_get_data_path()); + std::unique_ptr data_path(app_get_data_path()); if (data_path) { result = base::FilePath(data_path.get()); } else if (!GetDirAppDataTizen(result)) { @@ -106,20 +105,20 @@ void GetDirUserData(base::FilePath& result) { #if defined(OS_TIZEN) result = GetDirUserDataTizen(); if (result.empty()) { - scoped_ptr env(base::Environment::Create()); + std::unique_ptr env(base::Environment::Create()); base::FilePath config_dir(base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir)); char* app_id = NULL; if (APP_ERROR_NONE == app_get_id(&app_id)) { - scoped_ptr app_name(app_id); + std::unique_ptr app_name(app_id); result = config_dir.Append(app_name.get()); } else { result = config_dir.Append(kApplicationName); } } #else - scoped_ptr env(base::Environment::Create()); + std::unique_ptr env(base::Environment::Create()); base::FilePath config_dir(base::nix::GetXDGDirectory(env.get(), base::nix::kXdgConfigHomeEnvVar, base::nix::kDotConfigDir)); @@ -131,20 +130,20 @@ void GetDirCache(base::FilePath& result) { #if defined(OS_TIZEN) result = GetDirCacheTizen(); if (result.empty()) { - scoped_ptr env(base::Environment::Create()); + std::unique_ptr env(base::Environment::Create()); base::FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", ".cache")); char* app_id = NULL; if (APP_ERROR_NONE == app_get_id(&app_id)) { - scoped_ptr app_name(app_id); + std::unique_ptr app_name(app_id); result = cache_dir.Append(app_name.get()); } else { result = cache_dir.Append(kApplicationName); } } #else - scoped_ptr env(base::Environment::Create()); + std::unique_ptr env(base::Environment::Create()); base::FilePath cache_dir(base::nix::GetXDGDirectory(env.get(), "XDG_CACHE_HOME", ".cache")); diff --git a/tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc b/tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc index a0c6e02..529fd0c 100644 --- a/tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc +++ b/tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc @@ -11,7 +11,7 @@ #include "ipc/ipc_message_macros.h" #define private public -#include "content/common/gpu/gpu_channel_manager.h" +#include "gpu/ipc/service/gpu_channel_manager.h" #include "content/gpu/in_process_gpu_thread.h" #include "content/gpu/gpu_child_thread.h" @@ -24,12 +24,10 @@ namespace content { struct GpuChildThreadEfl : public content::GpuChildThread { explicit GpuChildThreadEfl(const gpu::GpuPreferences& gpu_preferences, const content::InProcessChildThreadParams& params, - GpuMemoryBufferFactory* gpu_memory_buffer_factory, - gpu::SyncPointManager* sync_point_manager) + gpu::GpuMemoryBufferFactory* gpu_memory_buffer_factory) : GpuChildThread(gpu_preferences, params, - gpu_memory_buffer_factory, - sync_point_manager) {} + gpu_memory_buffer_factory) {} bool OnControlMessageReceived(const IPC::Message& msg) override { bool handled = true; @@ -58,26 +56,23 @@ struct GpuChildThreadEfl : public content::GpuChildThread { struct InProcessGpuThreadEfl : public content::InProcessGpuThread { explicit InProcessGpuThreadEfl( const content::InProcessChildThreadParams& params, - const gpu::GpuPreferences& gpu_preferences, - gpu::SyncPointManager* sync_point_manager_override) + const gpu::GpuPreferences& gpu_preferences) : InProcessGpuThread(params, - gpu_preferences, - sync_point_manager_override) {} + gpu_preferences) {} void Init() override { gpu_process_ = new content::GpuProcess(base::ThreadPriority::NORMAL); // The process object takes ownership of the thread object, so do not // save and delete the pointer. gpu_process_->set_main_thread(new GpuChildThreadEfl( - gpu_preferences_, params_, gpu_memory_buffer_factory_.get(), - sync_point_manager_override_)); + gpu_preferences_, params_, gpu_memory_buffer_factory_.get())); } }; base::Thread* CreateInProcessGpuThread( const content::InProcessChildThreadParams& params, const gpu::GpuPreferences& gpu_preferences) { - return new InProcessGpuThreadEfl(params, gpu_preferences, nullptr); + return new InProcessGpuThreadEfl(params, gpu_preferences); } } // namespace content diff --git a/tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.h b/tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.h index bae8445..7ccf83d 100644 --- a/tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.h +++ b/tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.h @@ -10,7 +10,7 @@ #include "base/compiler_specific.h" #include "base/containers/hash_tables.h" #include "content/common/content_export.h" -#include "content/public/renderer/render_process_observer.h" +#include "content/public/renderer/render_thread_observer.h" #include "third_party/WebKit/public/platform/WebSpeechSynthesizer.h" #include "third_party/WebKit/public/platform/WebSpeechSynthesizerClient.h" @@ -31,14 +31,14 @@ struct TtsVoice; // the utterance id (which is globally unique) matches. class CONTENT_EXPORT TtsDispatcherEfl : public blink::WebSpeechSynthesizer, - public content::RenderProcessObserver { + public content::RenderThreadObserver { public: explicit TtsDispatcherEfl(blink::WebSpeechSynthesizerClient* client); private: virtual ~TtsDispatcherEfl(); - // RenderProcessObserver override. + // RenderThreadObserver override. bool OnControlMessageReceived(const IPC::Message& message) override; // blink::WebSpeechSynthesizer implementation. diff --git a/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc b/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc index 457f4e3..23deb1d 100644 --- a/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc +++ b/tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc @@ -171,9 +171,9 @@ int UnsetRemainingTimeUntilDischargedCb() { } // namespace -scoped_ptr BatteryStatusManager::Create( +std::unique_ptr BatteryStatusManager::Create( const BatteryStatusService::BatteryUpdateCallback& callback) { - return scoped_ptr( + return std::unique_ptr( new BatteryStatusManagerTizen(callback)); } diff --git a/tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.cc b/tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.cc index d6fa7ff..3057af7 100644 --- a/tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.cc +++ b/tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.cc @@ -8,16 +8,18 @@ namespace device { -scoped_ptr VibrationManagerImplEfl::provider_client_ = scoped_ptr(); +std::unique_ptr VibrationManagerImplEfl::provider_client_ = std::unique_ptr(); -void VibrationManagerImplEfl::Vibrate(int64_t milliseconds) { +void VibrationManagerImplEfl::Vibrate(int64_t milliseconds, const VibrateCallback& callback) { if (provider_client_.get()) provider_client_->Vibrate(milliseconds); + callback.Run(); } -void VibrationManagerImplEfl::Cancel() { +void VibrationManagerImplEfl::Cancel(const CancelCallback& callback) { if (provider_client_.get()) provider_client_->CancelVibration(); + callback.Run(); } // static diff --git a/tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.h b/tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.h index 9b6e4c1..3afd983 100644 --- a/tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.h +++ b/tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.h @@ -7,7 +7,6 @@ #include "device/vibration/vibration_manager_impl.h" -#include "base/memory/scoped_ptr.h" #include "device/vibration/vibration_export.h" #include "device/vibration/vibration_provider_client.h" #include "mojo/public/cpp/bindings/strong_binding.h" @@ -21,8 +20,8 @@ class DEVICE_VIBRATION_EXPORT VibrationManagerImplEfl : public VibrationManager : binding_(this, std::move(request)) {} ~VibrationManagerImplEfl() override {} - void Vibrate(int64_t milliseconds) override; - void Cancel() override; + void Vibrate(int64_t milliseconds, const VibrateCallback& callback) override; + void Cancel(const CancelCallback& callback) override; static void RegisterProviderClient(VibrationProviderClient* provider_client); @@ -32,7 +31,7 @@ class DEVICE_VIBRATION_EXPORT VibrationManagerImplEfl : public VibrationManager // The binding between this object and the other end of the pipe. mojo::StrongBinding binding_; - static scoped_ptr provider_client_; + static std::unique_ptr provider_client_; }; } // namespace device diff --git a/tizen_src/chromium_impl/device/vibration/vibration_provider_client.h b/tizen_src/chromium_impl/device/vibration/vibration_provider_client.h index 6598a1b..0fd8ece 100644 --- a/tizen_src/chromium_impl/device/vibration/vibration_provider_client.h +++ b/tizen_src/chromium_impl/device/vibration/vibration_provider_client.h @@ -5,6 +5,8 @@ #ifndef VIBRATION_PROVIDER_CLIENT_H #define VIBRATION_PROVIDER_CLIENT_H +#include + namespace device { class VibrationProviderClient { diff --git a/tizen_src/chromium_impl/efl/init.cc b/tizen_src/chromium_impl/efl/init.cc index 9003dd3..5ef38f0 100644 --- a/tizen_src/chromium_impl/efl/init.cc +++ b/tizen_src/chromium_impl/efl/init.cc @@ -15,7 +15,7 @@ #include "content/common/paths_efl.h" #include "content/public/common/content_switches.h" #include "ui/compositor/compositor_switches.h" -#include "ui/gfx/screen_efl.h" +#include "ui/display/screen_efl.h" #include "ui/gfx/switches.h" #include "ui/gl/gl_switches.h" #include "ui/ozone/public/ozone_platform.h" @@ -23,8 +23,8 @@ namespace efl { namespace { -scoped_ptr MessagePumpFactory() { - return scoped_ptr(new base::MessagePumpEcore); +std::unique_ptr MessagePumpFactory() { + return std::unique_ptr(new base::MessagePumpEcore); } } // namespace @@ -67,7 +67,7 @@ int Initialize(int argc, const char* argv[]) { void AppendPortParams(base::CommandLine& cmdline) { cmdline.AppendSwitchASCII(switches::kUseGL, - gfx::kGLImplementationEGLName); + gl::kGLImplementationEGLName); cmdline.AppendSwitch(switches::kInProcessGPU); #if !defined(EWK_BRINGUP) diff --git a/tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.cc b/tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.cc index 6132328..ddfae1c 100644 --- a/tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.cc +++ b/tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.cc @@ -11,7 +11,7 @@ ScopedRestoreNonOwnedEGLContext::ScopedRestoreNonOwnedEGLContext() read_surface_(EGL_NO_SURFACE) { // This should only used to restore a context that is not created or owned by // Chromium native code, but created by Android system itself. - DCHECK(!gfx::GLContext::GetCurrent()); + DCHECK(!gl::GLContext::GetCurrent()); context_ = eglGetCurrentContext(); display_ = eglGetCurrentDisplay(); diff --git a/tizen_src/chromium_impl/media/audio/tizen/capi_audio_output.h b/tizen_src/chromium_impl/media/audio/tizen/capi_audio_output.h index 05e8d2a..42e8644 100644 --- a/tizen_src/chromium_impl/media/audio/tizen/capi_audio_output.h +++ b/tizen_src/chromium_impl/media/audio/tizen/capi_audio_output.h @@ -12,7 +12,6 @@ #include #include -#include "base/memory/scoped_ptr.h" #include "base/threading/thread.h" #include "media/audio/audio_io.h" #include "media/audio/audio_parameters.h" @@ -51,7 +50,7 @@ class CapiAudioOutputStream : public AudioOutputStream { char* buffer_; media::InternalState state_; AudioSourceCallback* source_callback_; - scoped_ptr audio_bus_; + std::unique_ptr audio_bus_; DISALLOW_COPY_AND_ASSIGN(CapiAudioOutputStream); }; diff --git a/tizen_src/chromium_impl/media/base/efl/media_player_util_efl.h b/tizen_src/chromium_impl/media/base/efl/media_player_util_efl.h index 2f6367c..ce1dbbb 100644 --- a/tizen_src/chromium_impl/media/base/efl/media_player_util_efl.h +++ b/tizen_src/chromium_impl/media/base/efl/media_player_util_efl.h @@ -5,7 +5,6 @@ #ifndef MEDIA_BASE_EFL_MEDIA_PLAYER_UTIL_EFL_H_ #define MEDIA_BASE_EFL_MEDIA_PLAYER_UTIL_EFL_H_ -#include "base/memory/scoped_ptr.h" #include "media/base/media_export.h" #include "url/gurl.h" @@ -17,7 +16,7 @@ struct MediaPacketDeleter { void operator()(media_packet_s* ptr) const; }; -typedef scoped_ptr ScopedMediaPacket; +typedef std::unique_ptr ScopedMediaPacket; typedef enum { MEDIA_SEEK_NONE, // No seek diff --git a/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h index 091bd6e..a632176 100644 --- a/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h +++ b/tizen_src/chromium_impl/media/base/tizen/media_player_bridge_capi.h @@ -7,7 +7,6 @@ #include -#include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/timer/timer.h" #include "base/tracked_objects.h" diff --git a/tizen_src/chromium_impl/media/base/tizen/media_source_player_capi.h b/tizen_src/chromium_impl/media/base/tizen/media_source_player_capi.h index bb81ffc..17a4868 100644 --- a/tizen_src/chromium_impl/media/base/tizen/media_source_player_capi.h +++ b/tizen_src/chromium_impl/media/base/tizen/media_source_player_capi.h @@ -8,7 +8,6 @@ #include #include "base/cancelable_callback.h" -#include "base/memory/scoped_ptr.h" #include "base/threading/thread.h" #include "base/time/default_tick_clock.h" #include "base/timer/timer.h" @@ -28,7 +27,7 @@ class MEDIA_EXPORT MediaSourcePlayerCapi // Constructs a player with the given ID and demuxer. |manager| must outlive // the lifetime of this object. MediaSourcePlayerCapi( - int player_id, scoped_ptr demuxer, + int player_id, std::unique_ptr demuxer, MediaPlayerManager* manager); ~MediaSourcePlayerCapi() override; @@ -99,7 +98,7 @@ class MEDIA_EXPORT MediaSourcePlayerCapi base::SharedMemoryHandle foreign_memory_handle, const media::DemuxedBufferMetaData& meta_data); - scoped_ptr demuxer_; + std::unique_ptr demuxer_; const scoped_refptr task_runner_; // Weak pointer passed to media decoder jobs for callbacks. diff --git a/tizen_src/chromium_impl/media/capture/video/tizen/video_capture_device_tizen.h b/tizen_src/chromium_impl/media/capture/video/tizen/video_capture_device_tizen.h index 9461d22..3ea8c97 100644 --- a/tizen_src/chromium_impl/media/capture/video/tizen/video_capture_device_tizen.h +++ b/tizen_src/chromium_impl/media/capture/video/tizen/video_capture_device_tizen.h @@ -26,7 +26,7 @@ class VideoCaptureDeviceTizen : public VideoCaptureDevice { virtual ~VideoCaptureDeviceTizen() override; virtual void AllocateAndStart(const VideoCaptureParams& params, - scoped_ptr client) override; + std::unique_ptr client) override; virtual void StopAndDeAllocate() override; @@ -48,16 +48,16 @@ class VideoCaptureDeviceTizen : public VideoCaptureDevice { int height, int frame_rate, VideoPixelFormat format, - scoped_ptr client); + std::unique_ptr client); void OnStopAndDeAllocate(); void SetErrorState(const std::string& reason); InternalState state_; - scoped_ptr client_; + std::unique_ptr client_; Name device_name_; base::Thread worker_; // Thread used for reading data from the device. - scoped_ptr buffer_; + std::unique_ptr buffer_; camera_h camera_; DISALLOW_IMPLICIT_CONSTRUCTORS(VideoCaptureDeviceTizen); }; diff --git a/tizen_src/chromium_impl/media/media_efl.gypi b/tizen_src/chromium_impl/media/media_efl.gypi index 070612f..0f5af9c 100644 --- a/tizen_src/chromium_impl/media/media_efl.gypi +++ b/tizen_src/chromium_impl/media/media_efl.gypi @@ -93,10 +93,13 @@ 'base/tizen/media_source_player_capi.h', 'base/tizen/webaudio_decoder_browser_capi.cc', 'base/tizen/webaudio_decoder_browser_capi.h', - 'capture/video/tizen/video_capture_device_factory_tizen.cc', - 'capture/video/tizen/video_capture_device_factory_tizen.h', - 'capture/video/tizen/video_capture_device_tizen.cc', - 'capture/video/tizen/video_capture_device_tizen.h', +# [M53_2785] Temporary disabling the codes for swiching to new chromium +# It will be fixed by multimedia team +# FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2061 +# 'capture/video/tizen/video_capture_device_factory_tizen.cc', +# 'capture/video/tizen/video_capture_device_factory_tizen.h', +# 'capture/video/tizen/video_capture_device_tizen.cc', +# 'capture/video/tizen/video_capture_device_tizen.h', ], 'sources/': [ [ 'exclude', 'audio/linux/audio_manager_linux.cc$'], diff --git a/tizen_src/chromium_impl/ui/base/resource/resource_bundle_efl.cc b/tizen_src/chromium_impl/ui/base/resource/resource_bundle_efl.cc index fc27ab3..d962fba 100644 --- a/tizen_src/chromium_impl/ui/base/resource/resource_bundle_efl.cc +++ b/tizen_src/chromium_impl/ui/base/resource/resource_bundle_efl.cc @@ -11,7 +11,7 @@ #include "ui/base/resource/resource_handle.h" #include "ui/base/ui_base_paths.h" #include "ui/base/ui_base_switches.h" -#include "ui/gfx/display.h" +#include "ui/display/display.h" #include "ui/gfx/image/image.h" namespace { diff --git a/tizen_src/chromium_impl/ui/gfx/device_display_info_efl.cc b/tizen_src/chromium_impl/ui/display/device_display_info_efl.cc similarity index 97% rename from tizen_src/chromium_impl/ui/gfx/device_display_info_efl.cc rename to tizen_src/chromium_impl/ui/display/device_display_info_efl.cc index 5844fff..a9f4de4 100644 --- a/tizen_src/chromium_impl/ui/gfx/device_display_info_efl.cc +++ b/tizen_src/chromium_impl/ui/display/device_display_info_efl.cc @@ -2,11 +2,11 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/gfx/device_display_info_efl.h" +#include "ui/display/device_display_info_efl.h" #include "base/logging.h" -namespace gfx { +namespace display { namespace { @@ -51,7 +51,7 @@ int GetDensityRange(int dpi) { } // namespace // DeviceDisplayInfoEflImpl -class GFX_EXPORT DeviceDisplayInfoEflImpl { +class DISPLAY_EXPORT DeviceDisplayInfoEflImpl { public: static DeviceDisplayInfoEflImpl* GetInstance(); @@ -184,5 +184,5 @@ int DeviceDisplayInfoEfl::GetRotationDegrees() const { return DeviceDisplayInfoEflImpl::GetInstance()->GetRotationDegrees(); } -} // namespace gfx +} // namespace display diff --git a/tizen_src/chromium_impl/ui/gfx/device_display_info_efl.h b/tizen_src/chromium_impl/ui/display/device_display_info_efl.h similarity index 82% rename from tizen_src/chromium_impl/ui/gfx/device_display_info_efl.h rename to tizen_src/chromium_impl/ui/display/device_display_info_efl.h index 1fbe273..43d4ac0 100644 --- a/tizen_src/chromium_impl/ui/gfx/device_display_info_efl.h +++ b/tizen_src/chromium_impl/ui/display/device_display_info_efl.h @@ -2,17 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef UI_GFX_DEVICE_DISPLAY_INFO_EFL_H_ -#define UI_GFX_DEVICE_DISPLAY_INFO_EFL_H_ +#ifndef UI_DISPLAY_DEVICE_DISPLAY_INFO_EFL_H_ +#define UI_DISPLAY_DEVICE_DISPLAY_INFO_EFL_H_ #include "base/memory/singleton.h" #include "base/synchronization/lock.h" -#include "ui/gfx/gfx_export.h" +#include "ui/display/display_export.h" -namespace gfx { +namespace display { // Facilitates access to device information in browser or renderer. -class GFX_EXPORT DeviceDisplayInfoEfl { +class DISPLAY_EXPORT DeviceDisplayInfoEfl { public: explicit DeviceDisplayInfoEfl(); @@ -44,6 +44,6 @@ class GFX_EXPORT DeviceDisplayInfoEfl { DISALLOW_COPY_AND_ASSIGN(DeviceDisplayInfoEfl); }; -} // namespace gfx +} // namespace display -#endif // UI_GFX_DEVICE_DISPLAY_INFO_EFL_H_ +#endif // UI_DISPLAY_DEVICE_DISPLAY_INFO_EFL_H_ diff --git a/tizen_src/chromium_impl/ui/gfx/screen_efl.cc b/tizen_src/chromium_impl/ui/display/screen_efl.cc similarity index 61% rename from tizen_src/chromium_impl/ui/gfx/screen_efl.cc rename to tizen_src/chromium_impl/ui/display/screen_efl.cc index e287f3f..e3e0c81d 100644 --- a/tizen_src/chromium_impl/ui/gfx/screen_efl.cc +++ b/tizen_src/chromium_impl/ui/display/screen_efl.cc @@ -2,23 +2,23 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "ui/gfx/screen_efl.h" +#include "ui/display/screen_efl.h" #include "ecore_x_wayland_wrapper.h" #include "content/browser/renderer_host/dip_util.h" #include "ui/base/x/x11_util.h" -#include "ui/gfx/device_display_info_efl.h" +#include "ui/display/device_display_info_efl.h" #include "ui/gfx/geometry/rect.h" -#include "ui/gfx/display.h" -#include "ui/gfx/display_observer.h" +#include "ui/display/display.h" +#include "ui/display/display_observer.h" +#include "ui/display/screen.h" #include "ui/gfx/geometry/dip_util.h" -#include "ui/gfx/screen.h" #include "ui/gfx/x/x11_types.h" namespace ui { -class ScreenEfl : public gfx::Screen { +class ScreenEfl : public display::Screen { public: ScreenEfl() { } @@ -31,9 +31,9 @@ class ScreenEfl : public gfx::Screen { return gfx::Point(); } - gfx::NativeWindow GetWindowUnderCursor() override { + bool IsWindowUnderCursor(gfx::NativeWindow window) override { NOTIMPLEMENTED(); - return gfx::NativeWindow(); + return false; } gfx::NativeWindow GetWindowAtScreenPoint(const gfx::Point& point) override { @@ -44,39 +44,39 @@ class ScreenEfl : public gfx::Screen { return 1; } - std::vector GetAllDisplays() const override { - return std::vector(1, GetPrimaryDisplay()); + std::vector GetAllDisplays() const override { + return std::vector(1, GetPrimaryDisplay()); } - gfx::Display GetDisplayNearestWindow(gfx::NativeView view) const override { + display::Display GetDisplayNearestWindow(gfx::NativeView view) const override { return GetPrimaryDisplay(); } - gfx::Display GetDisplayNearestPoint( + display::Display GetDisplayNearestPoint( const gfx::Point& point) const override { return GetPrimaryDisplay(); } - gfx::Display GetDisplayMatching( + display::Display GetDisplayMatching( const gfx::Rect& match_rect) const override { return GetPrimaryDisplay(); } - gfx::Display GetPrimaryDisplay() const override { - gfx::DeviceDisplayInfoEfl display_info; + display::Display GetPrimaryDisplay() const override { + display::DeviceDisplayInfoEfl display_info; const float device_scale_factor = - gfx::Display::HasForceDeviceScaleFactor() ? - gfx::Display::GetForcedDeviceScaleFactor() : display_info.GetDIPScale(); + display::Display::HasForceDeviceScaleFactor() ? + display::Display::GetForcedDeviceScaleFactor() : display_info.GetDIPScale(); - gfx::Display display(0); + display::Display display(0); display.SetRotationAsDegree(display_info.GetRotationDegrees()); // TODO(prashant.n): Use DeviceDisplayInfoEfl for width and height. // (http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=14917) int width, height; #if defined(USE_WAYLAND) - if (display.rotation() == gfx::Display::ROTATE_90 || - display.rotation() == gfx::Display::ROTATE_270) { + if (display.rotation() == display::Display::ROTATE_90 || + display.rotation() == display::Display::ROTATE_270) { ecore_wl_screen_size_get(&height, &width); } else { @@ -85,8 +85,8 @@ class ScreenEfl : public gfx::Screen { #else Ecore_X_Screen* screen = ecore_x_default_screen_get(); - if (display.rotation() == gfx::Display::ROTATE_90 || - display.rotation() == gfx::Display::ROTATE_270) { + if (display.rotation() == display::Display::ROTATE_90 || + display.rotation() == display::Display::ROTATE_270) { ecore_x_screen_size_get(screen, &height, &width); } else { @@ -104,10 +104,10 @@ class ScreenEfl : public gfx::Screen { return display; } - void AddObserver(gfx::DisplayObserver* observer) override { + void AddObserver(display::DisplayObserver* observer) override { } - void RemoveObserver(gfx::DisplayObserver* observer) override { + void RemoveObserver(display::DisplayObserver* observer) override { } private: @@ -119,14 +119,14 @@ void InstallScreenInstance() static bool installed = false; if (!installed) { installed = true; - gfx::Screen::SetScreenInstance(new ui::ScreenEfl()); + display::Screen::SetScreenInstance(new ui::ScreenEfl()); } } } // namespace ui -namespace gfx { +namespace display { Screen* CreateNativeScreen() { return new ui::ScreenEfl(); } -} // namespace gfx +} // namespace display diff --git a/tizen_src/chromium_impl/ui/gfx/screen_efl.h b/tizen_src/chromium_impl/ui/display/screen_efl.h similarity index 100% rename from tizen_src/chromium_impl/ui/gfx/screen_efl.h rename to tizen_src/chromium_impl/ui/display/screen_efl.h diff --git a/tizen_src/chromium_impl/ui/gl/efl_pixmap.cc b/tizen_src/chromium_impl/ui/gl/efl_pixmap.cc index 20aed25..9c1693c 100644 --- a/tizen_src/chromium_impl/ui/gl/efl_pixmap.cc +++ b/tizen_src/chromium_impl/ui/gl/efl_pixmap.cc @@ -34,7 +34,7 @@ extern "C" { #include -namespace gfx { +namespace gl { // Helper classes implementation. class NativeDisplayConnection { @@ -579,4 +579,4 @@ EflPixmapImpl::~EflPixmapImpl() { } -} // namespace gfx +} // namespace gl diff --git a/tizen_src/chromium_impl/ui/gl/efl_pixmap.h b/tizen_src/chromium_impl/ui/gl/efl_pixmap.h index e102cc06..1b30409 100644 --- a/tizen_src/chromium_impl/ui/gl/efl_pixmap.h +++ b/tizen_src/chromium_impl/ui/gl/efl_pixmap.h @@ -8,7 +8,6 @@ #include "base/containers/hash_tables.h" #include "base/containers/scoped_ptr_hash_map.h" #include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_vector.h" #include "ui/gfx/geometry/size.h" #include "ui/gl/gl_bindings.h" @@ -17,7 +16,7 @@ #include #endif -namespace gfx { +namespace gl { class NativeBuffer; @@ -107,6 +106,6 @@ class GL_EXPORT EflPixmapImpl : public EflPixmapBase { DISALLOW_COPY_AND_ASSIGN(EflPixmapImpl); }; -} // namespace gfx +} // namespace gl #endif // UI_GL_EFL_PIXMAP_H_ diff --git a/tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc b/tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc index 6157642..28fd66b 100644 --- a/tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc +++ b/tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc @@ -12,7 +12,7 @@ #undef GLContextEGL -namespace gfx { +namespace gl { class GL_EXPORT GLContextEGL : public GLContextEGLOverride { public: 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 1d5ea6b..61c557c 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 @@ -7,7 +7,7 @@ #include "ui/gl/gl_implementation_osmesa.h" #include "gpu/command_buffer/service/texture_manager.h" -using namespace gfx; +using namespace gl; extern void* GLGetCurentContext() { diff --git a/tizen_src/chromium_impl/ui/gl/gl_image_efl_pixmap.h b/tizen_src/chromium_impl/ui/gl/gl_image_efl_pixmap.h index 69fe9cc..d4272e4 100644 --- a/tizen_src/chromium_impl/ui/gl/gl_image_efl_pixmap.h +++ b/tizen_src/chromium_impl/ui/gl/gl_image_efl_pixmap.h @@ -5,7 +5,6 @@ #ifndef UI_GL_GL_IMAGE_EFL_PIXMAP_H_ #define UI_GL_GL_IMAGE_EFL_PIXMAP_H_ -#include "base/memory/scoped_ptr.h" #include "ui/gl/gl_image.h" #include "ui/gfx/gpu_memory_buffer.h" #include "ui/gl/gl_bindings.h" diff --git a/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc b/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc index 35fd115..5278c01 100644 --- a/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc +++ b/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc @@ -18,7 +18,7 @@ // and efl gl includes. extern void* GLGetCurentContext(); -struct GLSharedContextEflPrivate : public gfx::GLContext { +struct GLSharedContextEflPrivate : public gl::GLContext { GLSharedContextEflPrivate(Evas_Object* object) : GLContext(GLSharedContextEfl::GetShareGroup()) { Evas* evas = evas_object_evas_get(object); @@ -45,21 +45,21 @@ struct GLSharedContextEflPrivate : public gfx::GLContext { } bool Initialize( - gfx::GLSurface*, gfx::GpuPreference) override { + gl::GLSurface*, gl::GpuPreference) override { NOTREACHED(); return false; } - bool MakeCurrent(gfx::GLSurface*) override { + bool MakeCurrent(gl::GLSurface*) override { NOTREACHED(); return false; } - void ReleaseCurrent(gfx::GLSurface*) override { + void ReleaseCurrent(gl::GLSurface*) override { NOTREACHED(); } - bool IsCurrent(gfx::GLSurface*) override { + bool IsCurrent(gl::GLSurface*) override { NOTREACHED(); return false; } @@ -68,7 +68,7 @@ struct GLSharedContextEflPrivate : public gfx::GLContext { return handle_; } - virtual scoped_refptr CreateGPUTimingClient() override { + virtual scoped_refptr CreateGPUTimingClient() override { return 0; } @@ -106,7 +106,7 @@ void GLSharedContextEfl::Initialize(Evas_Object* object) { } // static -gfx::GLContext* GLSharedContextEfl::GetInstance() { +gl::GLContext* GLSharedContextEfl::GetInstance() { return g_private_part; } @@ -116,8 +116,8 @@ Evas_GL_Context* GLSharedContextEfl::GetEvasGLContext() { } // static -gfx::GLShareGroup* GLSharedContextEfl::GetShareGroup() { - static scoped_refptr share_group_ = - new gfx::GLShareGroup(); +gl::GLShareGroup* GLSharedContextEfl::GetShareGroup() { + static scoped_refptr share_group_ = + new gl::GLShareGroup(); return share_group_.get(); } diff --git a/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.h b/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.h index fa6cf68..c0b4c7f 100644 --- a/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.h +++ b/tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.h @@ -11,16 +11,16 @@ typedef struct _Evas_GL_Context Evas_GL_Context; -namespace gfx { +namespace gl { class GLContext; class GLShareGroup; } struct GL_EXPORT GLSharedContextEfl { static void Initialize(Evas_Object* object); - static gfx::GLContext* GetInstance(); + static gl::GLContext* GetInstance(); static Evas_GL_Context* GetEvasGLContext(); - static gfx::GLShareGroup* GetShareGroup(); + static gl::GLShareGroup* GetShareGroup(); }; #endif 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 c7283b1..080a4ca 100644 --- a/tizen_src/chromium_impl/ui/ozone/ozone_platform_efl.cc +++ b/tizen_src/chromium_impl/ui/ozone/ozone_platform_efl.cc @@ -50,19 +50,19 @@ class OzonePlatformEfl : public OzonePlatform { return gpu_platform_host_.get(); } - scoped_ptr CreateSystemInputInjector() override { + std::unique_ptr CreateSystemInputInjector() override { NOTIMPLEMENTED(); return NULL; } - scoped_ptr CreatePlatformWindow( + std::unique_ptr CreatePlatformWindow( PlatformWindowDelegate* delegate, const gfx::Rect& bounds) override { NOTIMPLEMENTED(); return NULL; } - scoped_ptr CreateNativeDisplayDelegate() override { + std::unique_ptr CreateNativeDisplayDelegate() override { NOTIMPLEMENTED(); return NULL; } @@ -82,10 +82,10 @@ class OzonePlatformEfl : public OzonePlatform { gpu_platform_.reset(CreateStubGpuPlatformSupport()); } - scoped_ptr surface_factory_; - scoped_ptr gpu_platform_; - scoped_ptr gpu_platform_host_; - scoped_ptr overlay_manager_; + std::unique_ptr surface_factory_; + std::unique_ptr gpu_platform_; + std::unique_ptr gpu_platform_host_; + std::unique_ptr overlay_manager_; DISALLOW_COPY_AND_ASSIGN(OzonePlatformEfl); }; diff --git a/tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc b/tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc index 3c6d99a..7f14697 100644 --- a/tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc +++ b/tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc @@ -9,10 +9,10 @@ #include "base/logging.h" #include "base/numerics/safe_conversions.h" #include "base/task_runner_util.h" -#include "ui/gfx/display.h" +#include "ui/display/display.h" #include "ui/gfx/image/image.h" #include "ui/gfx/geometry/rect.h" -#include "ui/gfx/screen.h" +#include "ui/display/screen.h" namespace ui { diff --git a/tizen_src/chromium_impl/ui/ui_efl.gypi b/tizen_src/chromium_impl/ui/ui_efl.gypi index da4105d..02566be 100644 --- a/tizen_src/chromium_impl/ui/ui_efl.gypi +++ b/tizen_src/chromium_impl/ui/ui_efl.gypi @@ -67,10 +67,10 @@ 'sources': [ '<(DEPTH)/ui/gfx/nine_image_painter.cc', '<(DEPTH)/ui/gfx/nine_image_painter.h', - 'gfx/device_display_info_efl.cc', - 'gfx/device_display_info_efl.h', - 'gfx/screen_efl.h', - 'gfx/screen_efl.cc', + 'display/device_display_info_efl.cc', + 'display/device_display_info_efl.h', + 'display/screen_efl.h', + 'display/screen_efl.cc', ], }], diff --git a/tizen_src/ewk/chromium-ewk.gyp b/tizen_src/ewk/chromium-ewk.gyp index 9063fe0..f3d97d7 100644 --- a/tizen_src/ewk/chromium-ewk.gyp +++ b/tizen_src/ewk/chromium-ewk.gyp @@ -12,7 +12,6 @@ 'unittest/ewk-tests.gypi:*', 'ubrowser/ubrowser.gypi:*', 'efl_webview_app/efl_webview_app.gypi:*', - '../../chrome/chrome_tests.gypi:chromedriver', ], }, ], diff --git a/tizen_src/ewk/efl_integration/browser/autofill/personal_data_manager_factory.cc b/tizen_src/ewk/efl_integration/browser/autofill/personal_data_manager_factory.cc index 5646678..e31cefb 100644 --- a/tizen_src/ewk/efl_integration/browser/autofill/personal_data_manager_factory.cc +++ b/tizen_src/ewk/efl_integration/browser/autofill/personal_data_manager_factory.cc @@ -6,7 +6,6 @@ #include "browser/autofill/personal_data_manager_factory.h" -#include "base/memory/scoped_ptr.h" #include "browser/webdata/web_data_service_factory.h" #include "components/autofill/core/browser/personal_data_manager.h" #include "components/autofill/core/browser/webdata/autofill_webdata_service.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 563e8b5..1305447 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 @@ -67,8 +67,9 @@ BrowsingDataRemoverEfl::BrowsingDataRemoverEfl(content::BrowserContext* browser_ , waiting_for_clear_quota_managed_data_(false) { if (browser_context_) { app_cache_service_ = browser_context->GetStoragePartition(browser_context_, NULL)->GetAppCacheService(); - main_context_getter_ = browser_context->GetRequestContext(); - media_context_getter_ = browser_context->GetMediaRequestContext(); + main_context_getter_ = + content::BrowserContext::GetDefaultStoragePartition(browser_context_)->GetURLRequestContext(); + media_context_getter_ = browser_context->CreateMediaRequestContext(); } } 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 72f6f5a..583499d 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 @@ -44,7 +44,7 @@ void GeolocationPermissionContextEfl::RequestPermissionOnUIThread( &geolocation_valid); if (geolocation_valid) { - scoped_ptr<_Ewk_Geolocation_Permission_Request> request( + std::unique_ptr<_Ewk_Geolocation_Permission_Request> request( new _Ewk_Geolocation_Permission_Request(requesting_frame, callback)); // 'callback_result' is currently unused in webkit-efl implementation. diff --git a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h index 8b514bc..70e1605 100644 --- a/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h +++ b/tizen_src/ewk/efl_integration/browser/javascript_dialog_manager_efl.h @@ -83,10 +83,10 @@ class JavaScriptDialogManagerEfl: public content::JavaScriptDialogManager { void SetPopupSize(int width, int height); private: - scoped_ptr dialog_; - scoped_ptr alert_callback_data_; - scoped_ptr confirm_callback_data_; - scoped_ptr prompt_callback_data_; + std::unique_ptr dialog_; + std::unique_ptr alert_callback_data_; + std::unique_ptr confirm_callback_data_; + std::unique_ptr prompt_callback_data_; DialogClosedCallback dialog_closed_callback_; DISALLOW_COPY_AND_ASSIGN(JavaScriptDialogManagerEfl); diff --git a/tizen_src/ewk/efl_integration/browser/login_delegate_efl.h b/tizen_src/ewk/efl_integration/browser/login_delegate_efl.h index 3b59788..b507ae1 100644 --- a/tizen_src/ewk/efl_integration/browser/login_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/browser/login_delegate_efl.h @@ -6,7 +6,6 @@ #define LOGIN_DELEGATE_EFL_H_ #include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" #include "base/strings/string16.h" #include "content/public/browser/resource_dispatcher_host_login_delegate.h" 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 b5a37ad..57b19b0 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 @@ -32,7 +32,7 @@ NotificationControllerEfl::~NotificationControllerEfl() { void NotificationControllerEfl::NotificationAdd(uint64_t notification_id, const GURL& origin, const base::string16& replace_id, - scoped_ptr delegate) { + std::unique_ptr delegate) { NotificationData* new_notification( new NotificationData(origin, replace_id, std::move(delegate))); notifications_map_.AddWithID(new_notification, notification_id); @@ -76,7 +76,7 @@ bool NotificationControllerEfl::NotificationDisplayed(uint64_t notification_id) return true; } -blink::WebNotificationPermission NotificationControllerEfl::CheckPermissionOnUIThread( +blink::mojom::PermissionStatus NotificationControllerEfl::CheckPermissionOnUIThread( BrowserContext* browser_context, const GURL& origin, int render_process_id) { @@ -84,7 +84,7 @@ blink::WebNotificationPermission NotificationControllerEfl::CheckPermissionOnUIT return CheckPermissionForOrigin(origin); } -blink::WebNotificationPermission NotificationControllerEfl::CheckPermissionOnIOThread( +blink::mojom::PermissionStatus NotificationControllerEfl::CheckPermissionOnIOThread( ResourceContext* resource_context, const GURL& origin, int render_process_id) { @@ -97,7 +97,7 @@ void NotificationControllerEfl::DisplayNotification( const GURL& origin, const PlatformNotificationData& notification_data, const NotificationResources& notification_resources, - scoped_ptr delegate, + std::unique_ptr delegate, base::Closure* cancel_callback) { BrowserContextEfl* browser_context_efl = @@ -190,16 +190,16 @@ void NotificationControllerEfl::AddPermission(const GURL origin, permissions_map_[origin] = allowed; } -blink::WebNotificationPermission +blink::mojom::PermissionStatus NotificationControllerEfl::CheckPermissionForOrigin( const GURL &origin) const { base::AutoLock locker(permissions_mutex_); std::map::const_iterator it = permissions_map_.find(origin); if (it == permissions_map_.end()) - return blink::WebNotificationPermissionDefault; + return blink::mojom::PermissionStatus::ASK; return it->second ? - blink::WebNotificationPermissionAllowed : - blink::WebNotificationPermissionDenied; + blink::mojom::PermissionStatus::GRANTED : + blink::mojom::PermissionStatus::DENIED; } void NotificationControllerEfl::ClearPermissions() { @@ -242,7 +242,7 @@ void NotificationControllerEfl::RequestPermission( result_callback.Run(PermissionStatus::DENIED); return; } - scoped_ptr notification_permission( + std::unique_ptr notification_permission( new Ewk_Notification_Permission_Request(web_view->evas_object(), result_callback, requesting_frame)); @@ -253,10 +253,10 @@ void NotificationControllerEfl::RequestPermission( return; } - blink::WebNotificationPermission web_notification_permission = + blink::mojom::PermissionStatus web_notification_permission = CheckPermissionForOrigin(requesting_frame); if (web_notification_permission == - blink::WebNotificationPermissionDefault) { + blink::mojom::PermissionStatus::LAST) { web_view->InvokeNotificationPermissionCallback( notification_permission.get()); // if policy is suspended, the API takes over the policy object lifetime @@ -266,7 +266,7 @@ void NotificationControllerEfl::RequestPermission( return; } } else { - if (web_notification_permission == blink::WebNotificationPermissionAllowed) { + if (web_notification_permission == blink::mojom::PermissionStatus::GRANTED) { result_callback.Run(PermissionStatus::GRANTED); } else { result_callback.Run(PermissionStatus::DENIED); 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 355b807..c38bbb6a 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 @@ -10,7 +10,6 @@ #include #include "base/id_map.h" -#include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "base/synchronization/lock.h" #include "content/public/browser/desktop_notification_delegate.h" @@ -25,11 +24,11 @@ class WebContents; struct NotificationData { const std::string origin_url; const base::string16 replace_id; - scoped_ptr notification_delegate; + std::unique_ptr notification_delegate; NotificationData(const GURL& origin, const base::string16& replaceid, - scoped_ptr delegate) + std::unique_ptr delegate) : origin_url(origin.spec()), replace_id(replaceid), notification_delegate(std::move(delegate)) {} @@ -43,7 +42,7 @@ class NotificationControllerEfl: public PlatformNotificationService { // Adds a new notification received from engine to a list void NotificationAdd(uint64_t notification_id, const GURL& origin, const base::string16& replace_id, - scoped_ptr delegate); + std::unique_ptr delegate); bool NotificationClosed(uint64_t notification_id, bool by_user); @@ -83,7 +82,7 @@ class NotificationControllerEfl: public PlatformNotificationService { Ewk_Notification_Cancel_Callback close_callback, void* user_data); /* PlatformNotificationService */ - blink::WebNotificationPermission CheckPermissionOnUIThread( + blink::mojom::PermissionStatus CheckPermissionOnUIThread( BrowserContext* browser_context, const GURL& origin, int render_process_id) override; @@ -92,7 +91,7 @@ class NotificationControllerEfl: public PlatformNotificationService { // JavaScript getter, and should not be used for other purposes. See // https://crbug.com/446497 for the plan to deprecate this method. // This method must only be called on the IO thread. - blink::WebNotificationPermission CheckPermissionOnIOThread( + blink::mojom::PermissionStatus CheckPermissionOnIOThread( ResourceContext* resource_context, const GURL& origin, int render_process_id) override; @@ -105,7 +104,7 @@ class NotificationControllerEfl: public PlatformNotificationService { const GURL& origin, const PlatformNotificationData& notification_data, const NotificationResources& notification_resources, - scoped_ptr delegate, + std::unique_ptr delegate, base::Closure* cancel_callback) override; // Displays the persistent notification described in |notification_data| to @@ -131,7 +130,7 @@ class NotificationControllerEfl: public PlatformNotificationService { std::set* displayed_notifications) override; private: - blink::WebNotificationPermission CheckPermissionForOrigin( + blink::mojom::PermissionStatus CheckPermissionForOrigin( const GURL &origin) const; IDMap notifications_map_; // This stores the notifications displayed to the user diff --git a/tizen_src/ewk/efl_integration/browser/policy_response_delegate_efl.h b/tizen_src/ewk/efl_integration/browser/policy_response_delegate_efl.h index bb46fe2..f0e9ff0 100644 --- a/tizen_src/ewk/efl_integration/browser/policy_response_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/browser/policy_response_delegate_efl.h @@ -46,7 +46,7 @@ class PolicyResponseDelegateEfl: public base::RefCountedThreadSafe policy_decision_; + std::unique_ptr<_Ewk_Policy_Decision> policy_decision_; // A throttle which blocks response and invokes policy mechanism. // It is used to cancel or resume response processing. ResourceThrottleEfl* throttle_; 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 470eb4c..be003e1 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 @@ -90,7 +90,6 @@ void ResourceDispatcherHostDelegateEfl::DownloadStarting( content::ResourceContext* resource_context, int child_id, int route_id, - int request_id, bool is_content_initiated, bool must_download, ScopedVector* throttles) { diff --git a/tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.h b/tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.h index ed410f9..10e8dee 100644 --- a/tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/browser/resource_dispatcher_host_delegate_efl.h @@ -42,7 +42,6 @@ class ResourceDispatcherHostDelegateEfl content::ResourceContext* resource_context, int child_id, int route_id, - int request_id, bool is_content_initiated, bool must_download, ScopedVector* throttles) override; diff --git a/tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item_private.h b/tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item_private.h index 2325ed1..2c453c8 100644 --- a/tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item_private.h +++ b/tizen_src/ewk/efl_integration/browser/selectpicker/popup_menu_item_private.h @@ -5,9 +5,7 @@ #ifndef popup_menu_item_private_h #define popup_menu_item_private_h -#include "config.h" #include "popup_menu_item.h" -#include "base/memory/scoped_ptr.h" #include "content/public/common/menu_item.h" #include "third_party/WebKit/public/web/WebTextDirection.h" diff --git a/tizen_src/ewk/efl_integration/browser/selectpicker/popup_picker.cc b/tizen_src/ewk/efl_integration/browser/selectpicker/popup_picker.cc index 74e45c0..72f7931 100644 --- a/tizen_src/ewk/efl_integration/browser/selectpicker/popup_picker.cc +++ b/tizen_src/ewk/efl_integration/browser/selectpicker/popup_picker.cc @@ -2,7 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "config.h" #include "popup_picker.h" #include "popup_menu_item.h" diff --git a/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h b/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h index 559855f..222b61f 100644 --- a/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h +++ b/tizen_src/ewk/efl_integration/browser/vibration/vibration_provider_client.h @@ -6,7 +6,6 @@ #define Vibration_Provider_Client_h #include "base/macros.h" -#include "base/memory/scoped_ptr.h" #include "device/vibration/vibration_provider_client.h" #include "public/ewk_context.h" diff --git a/tizen_src/ewk/efl_integration/browser_context_efl.cc b/tizen_src/ewk/efl_integration/browser_context_efl.cc index 8360bfb..cd0d0df 100644 --- a/tizen_src/ewk/efl_integration/browser_context_efl.cc +++ b/tizen_src/ewk/efl_integration/browser_context_efl.cc @@ -4,7 +4,6 @@ #include "browser_context_efl.h" -#include "android_webview/browser/aw_pref_store.h" #include "base/bind.h" #include "base/files/file_util.h" #include "base/path_service.h" @@ -17,6 +16,7 @@ #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/prefs/pref_service.h" #include "components/prefs/pref_service_factory.h" @@ -108,6 +108,14 @@ net::URLRequestContext* BrowserContextEfl::ResourceContextEfl::GetRequestContext return getter_->GetURLRequestContext(); } +net::URLRequestContextGetter* BrowserContextEfl::CreateMediaRequestContext() { + return request_context_getter_.get(); +} + +net::URLRequestContextGetter* BrowserContextEfl::CreateMediaRequestContextForStoragePartition(const base::FilePath&, bool) { + return nullptr; +} + void BrowserContextEfl::ResourceContextEfl::set_url_request_context_getter( URLRequestContextGetterEfl* getter) { getter_ = getter; @@ -132,7 +140,7 @@ BrowserContextEfl::BrowserContextEfl(EWebContext* web_context, bool incognito) pref_registry->RegisterBooleanPref(kPasswordManagerSavingEnabled, true); PrefServiceFactory pref_service_factory; - pref_service_factory.set_user_prefs(make_scoped_refptr(new AwPrefStore)); + pref_service_factory.set_user_prefs(make_scoped_refptr(new InMemoryPrefStore())); pref_service_factory.set_read_error_callback(base::Bind(&HandleReadError)); user_pref_service_ = std::move(pref_service_factory.Create(pref_registry)); @@ -145,18 +153,9 @@ BrowserContextEfl::BrowserContextEfl(EWebContext* web_context, bool incognito) BrowserContext::Initialize(this, GetPath()); } -net::URLRequestContextGetter* BrowserContextEfl::GetRequestContext() { - if (!request_context_getter_.get()) { - // this will trigger a call to CreateRequestContext - GetStoragePartition(this, NULL); - DCHECK(request_context_getter_.get()); - } - return request_context_getter_.get(); -} - -scoped_ptr BrowserContextEfl::CreateZoomLevelDelegate( +std::unique_ptr BrowserContextEfl::CreateZoomLevelDelegate( const base::FilePath&) { - return scoped_ptr(); + return std::unique_ptr(); } ResourceContext* BrowserContextEfl::GetResourceContext() { @@ -218,7 +217,8 @@ net::URLRequestContextGetter* BrowserContextEfl::CreateRequestContext( if (!network_delegate_for_getter_.get()) { // NetWorkDelegate must be created on IO thread - base::WaitableEvent done(false, false); + base::WaitableEvent done(base::WaitableEvent::ResetPolicy::AUTOMATIC, + base::WaitableEvent::InitialState::NOT_SIGNALED); BrowserThread::PostTask(BrowserThread::IO, FROM_HERE, base::Bind(CreateNetworkDelegateOnIOThread, this, &done)); ScopedAllowWaitForLegacyWebViewApi allow_wait; diff --git a/tizen_src/ewk/efl_integration/browser_context_efl.h b/tizen_src/ewk/efl_integration/browser_context_efl.h index c15a395..78f4ee6 100644 --- a/tizen_src/ewk/efl_integration/browser_context_efl.h +++ b/tizen_src/ewk/efl_integration/browser_context_efl.h @@ -9,7 +9,6 @@ #include "url_request_context_getter_efl.h" #include "base/files/scoped_temp_dir.h" -#include "base/memory/scoped_ptr.h" #include "base/synchronization/lock.h" #include "browser/download_manager_delegate_efl.h" #include "browser/geolocation/geolocation_permission_context_efl.h" @@ -51,7 +50,6 @@ class BrowserContextEfl virtual net::HostResolver* GetHostResolver() override; virtual net::URLRequestContext* GetRequestContext() override; - void set_url_request_context_getter(URLRequestContextGetterEfl* getter); scoped_refptr GetCookieManager() const; @@ -68,19 +66,13 @@ class BrowserContextEfl BrowserContextEfl(EWebContext*, bool incognito = false); ~BrowserContextEfl(); - virtual scoped_ptr CreateZoomLevelDelegate( + net::URLRequestContextGetter* CreateMediaRequestContext() override; + net::URLRequestContextGetter* CreateMediaRequestContextForStoragePartition(const base::FilePath&, bool) override; + virtual std::unique_ptr CreateZoomLevelDelegate( const base::FilePath& partition_path); virtual bool IsOffTheRecord() const override { return incognito_; } - virtual net::URLRequestContextGetter* GetRequestContext() override; URLRequestContextGetterEfl* GetRequestContextEfl() { return request_context_getter_.get(); } - virtual net::URLRequestContextGetter* GetMediaRequestContext() override - { return GetRequestContext(); } - virtual net::URLRequestContextGetter* GetMediaRequestContextForRenderProcess(int) override - { return GetRequestContext(); } - virtual net::URLRequestContextGetter* GetMediaRequestContextForStoragePartition( - const base::FilePath&, bool) override - { return GetRequestContext(); } // These methods map to Add methods in visitedlink::VisitedLinkMaster. void AddVisitedURLs(const std::vector& urls); @@ -135,9 +127,9 @@ class BrowserContextEfl private: static void ReadCertificateAndAdd(base::FilePath* file_path); virtual SSLHostStateDelegate* GetSSLHostStateDelegate() override; - mutable scoped_ptr + mutable std::unique_ptr geolocation_permission_context_; - scoped_ptr visitedlink_master_; + std::unique_ptr visitedlink_master_; ResourceContextEfl* resource_context_; scoped_refptr request_context_getter_; @@ -145,11 +137,11 @@ class BrowserContextEfl DownloadManagerDelegateEfl download_manager_delegate_; base::ScopedTempDir temp_dir_; bool temp_dir_creation_attempted_; - scoped_ptr user_pref_service_; + std::unique_ptr user_pref_service_; const bool incognito_; - scoped_ptr network_delegate_for_getter_; - scoped_ptr ssl_host_state_delegate_; - scoped_ptr permission_manager_; + std::unique_ptr network_delegate_for_getter_; + std::unique_ptr ssl_host_state_delegate_; + std::unique_ptr permission_manager_; DISALLOW_COPY_AND_ASSIGN(BrowserContextEfl); }; diff --git a/tizen_src/ewk/efl_integration/browser_main_parts_efl.h b/tizen_src/ewk/efl_integration/browser_main_parts_efl.h index ba98ac1..b18601c 100644 --- a/tizen_src/ewk/efl_integration/browser_main_parts_efl.h +++ b/tizen_src/ewk/efl_integration/browser_main_parts_efl.h @@ -6,7 +6,6 @@ #define CONTENT_BROWSER_MAIN_PARTS_EFL_H_ #include "base/macros.h" -#include "base/memory/scoped_ptr.h" #include "content/public/browser/browser_main_parts.h" namespace devtools_http_handler { diff --git a/tizen_src/ewk/efl_integration/command_line_efl.cc b/tizen_src/ewk/efl_integration/command_line_efl.cc index b955e7c..1976ac8 100644 --- a/tizen_src/ewk/efl_integration/command_line_efl.cc +++ b/tizen_src/ewk/efl_integration/command_line_efl.cc @@ -137,7 +137,4 @@ void CommandLineEfl::AppendMemoryOptimizationSwitches( // For reuse of timers with message pump command_line->AppendSwitch(switches::kLimitMemoryAllocationInScheduleDelayedWork); - // For testing link disambiguation popup - command_line->AppendSwitch(switches::kEnableLinkDisambiguationPopup); - } diff --git a/tizen_src/ewk/efl_integration/common/version_info.h b/tizen_src/ewk/efl_integration/common/version_info.h index 7ac36a9..0b5441e 100644 --- a/tizen_src/ewk/efl_integration/common/version_info.h +++ b/tizen_src/ewk/efl_integration/common/version_info.h @@ -8,7 +8,6 @@ #include #include "base/macros.h" -#include "base/memory/scoped_ptr.h" #include "build/tizen_version.h" namespace EflWebView { 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 8fab5b8..8cb7c6e 100644 --- a/tizen_src/ewk/efl_integration/content_browser_client_efl.cc +++ b/tizen_src/ewk/efl_integration/content_browser_client_efl.cc @@ -6,7 +6,6 @@ #include "command_line_efl.h" #include "base/callback.h" -#include "base/memory/scoped_ptr.h" #include "base/strings/string_number_conversions.h" #include "browser_main_parts_efl.h" #include "browser_context_efl.h" @@ -62,16 +61,6 @@ BrowserMainParts* ContentBrowserClientEfl::CreateBrowserMainParts( return browser_main_parts_efl_; } -AccessTokenStore* ContentBrowserClientEfl::CreateAccessTokenStore() { - return new AccessTokenStoreEfl(); -} - -#if defined(OS_TIZEN) -LocationProvider* ContentBrowserClientEfl::OverrideSystemLocationProvider() { - return LocationProviderEfl::Create(); -} -#endif - void ContentBrowserClientEfl::AppendExtraCommandLineSwitches(base::CommandLine* command_line, int child_process_id) { if (command_line->HasSwitch(switches::kProcessType)) { @@ -151,7 +140,7 @@ void ContentBrowserClientEfl::DispatchPopupBlockedOnUIThread( int render_process_id, const GURL &target_url) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - scoped_ptr widgets( + std::unique_ptr widgets( RenderWidgetHost::GetRenderWidgetHosts()); RenderWidgetHost* widget = NULL; diff --git a/tizen_src/ewk/efl_integration/content_browser_client_efl.h b/tizen_src/ewk/efl_integration/content_browser_client_efl.h index 632f3bb..268c081 100644 --- a/tizen_src/ewk/efl_integration/content_browser_client_efl.h +++ b/tizen_src/ewk/efl_integration/content_browser_client_efl.h @@ -7,7 +7,6 @@ #include "content/public/browser/browser_context.h" #include "content/public/browser/content_browser_client.h" -#include "third_party/WebKit/public/platform/modules/notifications/WebNotificationPermission.h" namespace base { class CommandLine; @@ -34,11 +33,6 @@ class ContentBrowserClientEfl: public ContentBrowserClient { virtual BrowserMainParts* CreateBrowserMainParts( const MainFunctionParams& parameters) override; - virtual AccessTokenStore* CreateAccessTokenStore() override; -#if defined(OS_TIZEN) - virtual LocationProvider* OverrideSystemLocationProvider() override; -#endif - // Allows the embedder to pass extra command line flags. // switches::kProcessType will already be set at this point. virtual void AppendExtraCommandLineSwitches(base::CommandLine* command_line, @@ -119,10 +113,10 @@ class ContentBrowserClientEfl: public ContentBrowserClient { static void DispatchPopupBlockedOnUIThread(int render_process_id, const GURL &target_url); - scoped_ptr resource_disp_host_del_efl_; + std::unique_ptr resource_disp_host_del_efl_; BrowserMainPartsEfl* browser_main_parts_efl_; #if defined(ENABLE_NOTIFICATIONS) - scoped_ptr notification_controller_; + std::unique_ptr notification_controller_; #endif DISALLOW_COPY_AND_ASSIGN(ContentBrowserClientEfl); diff --git a/tizen_src/ewk/efl_integration/content_main_delegate_efl.h b/tizen_src/ewk/efl_integration/content_main_delegate_efl.h index 4ed5843..c7c1848 100644 --- a/tizen_src/ewk/efl_integration/content_main_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/content_main_delegate_efl.h @@ -33,8 +33,8 @@ class ContentMainDelegateEfl private: void PreSandboxStartupBrowser(); - scoped_ptr browser_client_; - scoped_ptr renderer_client_; + std::unique_ptr browser_client_; + std::unique_ptr renderer_client_; ContentClientEfl content_client_; DISALLOW_COPY_AND_ASSIGN(ContentMainDelegateEfl); }; 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 11775d7..06b5160 100644 --- a/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc +++ b/tizen_src/ewk/efl_integration/context_menu_controller_efl.cc @@ -561,8 +561,8 @@ base::FilePath ContextMenuControllerEfl::DownloadFile(const GURL url, DownloadManager* dlm = BrowserContext::GetDownloadManager( web_contents_.GetBrowserContext()); - scoped_ptr dl_params( - DownloadUrlParameters::FromWebContents(&web_contents_, url)); + std::unique_ptr dl_params( + DownloadUrlParameters::CreateForWebContentsMainFrame(&web_contents_, url)); dl_params->set_post_id(-1); dl_params->set_referrer( content::Referrer(referrer, blink::WebReferrerPolicyAlways)); diff --git a/tizen_src/ewk/efl_integration/context_menu_controller_efl.h b/tizen_src/ewk/efl_integration/context_menu_controller_efl.h index 874cb0f..faba1a5 100644 --- a/tizen_src/ewk/efl_integration/context_menu_controller_efl.h +++ b/tizen_src/ewk/efl_integration/context_menu_controller_efl.h @@ -134,8 +134,8 @@ class ContextMenuControllerEfl bool is_text_selection_; std::set clipboard_download_items_; std::set disk_download_items_; - scoped_ptr file_saved_dialog_; - scoped_ptr save_fail_dialog_; + std::unique_ptr file_saved_dialog_; + std::unique_ptr save_fail_dialog_; }; } // namespace diff --git a/tizen_src/ewk/efl_integration/cookie_manager.cc b/tizen_src/ewk/efl_integration/cookie_manager.cc index 3997f07..a8d3811 100644 --- a/tizen_src/ewk/efl_integration/cookie_manager.cc +++ b/tizen_src/ewk/efl_integration/cookie_manager.cc @@ -8,10 +8,10 @@ #include "base/bind.h" #include "base/logging.h" -#include "base/memory/scoped_ptr.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 "browser/scoped_allow_wait_for_legacy_web_view_api.h" #include "eweb_context.h" #include "net/base/net_errors.h" @@ -87,12 +87,12 @@ void CookieManager::SetRequestContextGetter( void CookieManager::DeleteSessionCookiesOnIOThread() { DCHECK(content::BrowserThread::CurrentlyOn(content::BrowserThread::IO)); - scoped_ptr cookie_store = GetCookieStore(); + std::unique_ptr cookie_store = GetCookieStore(); if (cookie_store.get()) cookie_store->DeleteSessionCookiesAsync(base::Callback()); } -static void DeleteCookiesOnIOThread(scoped_ptr cookie_store, +static void DeleteCookiesOnIOThread(std::unique_ptr cookie_store, const std::string& url, const std::string& cookie_name) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); @@ -105,7 +105,8 @@ static void DeleteCookiesOnIOThread(scoped_ptr cookie_store, return; if (cookie_name.empty()) { // Delete all matching host cookies. - cookie_store->DeleteAllCreatedBetweenForHostAsync(base::Time(), base::Time::Max(), gurl, + cookie_store->DeleteAllCreatedBetweenWithPredicateAsync(base::Time(), base::Time::Max(), + content::StoragePartitionImpl::CreatePredicateForHostCookies(gurl), net::CookieMonster::DeleteCallback()); } else { // Delete all matching host and domain cookies. @@ -117,7 +118,7 @@ void CookieManager::DeleteCookiesAsync(const std::string& url, const std::string& cookie_name) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - scoped_ptr cookie_store = GetCookieStore(); + std::unique_ptr cookie_store = GetCookieStore(); if (cookie_store.get()) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, @@ -168,7 +169,7 @@ void CookieManager::GetAcceptPolicyAsync(Ewk_Cookie_Manager_Policy_Async_Get_Cb void CookieManager::GetHostNamesWithCookiesAsync(AsyncHostnamesGetCb callback, void *data) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); host_callback_queue_.push(new EwkGetHostCallback(callback, data)); - scoped_ptr cookie_store = GetCookieStore(); + std::unique_ptr cookie_store = GetCookieStore(); if (cookie_store.get()) { BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, @@ -178,7 +179,7 @@ void CookieManager::GetHostNamesWithCookiesAsync(AsyncHostnamesGetCb callback, v } void CookieManager::FetchCookiesOnIOThread( - scoped_ptr cookie_store) { + std::unique_ptr cookie_store) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); if (cookie_store.get()) { @@ -288,7 +289,7 @@ static void SignalGetCookieValueCompleted(base::WaitableEvent* completion, completion->Signal(); } -static void GetCookieValueOnIOThread(scoped_ptr cookie_store, +static void GetCookieValueOnIOThread(std::unique_ptr cookie_store, const GURL& host, std::string* result, base::WaitableEvent* completion) { @@ -310,12 +311,13 @@ static void GetCookieValueOnIOThread(scoped_ptr cookie_store, std::string CookieManager::GetCookiesForURL(const std::string& url) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); - scoped_ptr cookie_store = GetCookieStore(); + std::unique_ptr cookie_store = GetCookieStore(); if (!cookie_store.get()) return std::string(); std::string cookie_value; - base::WaitableEvent completion(false, false); + 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)), @@ -334,12 +336,12 @@ scoped_refptr CookieManager::GetContextGett return scoped_refptr(request_context_getter_.get()); } -scoped_ptr CookieManager::GetCookieStore() const { +std::unique_ptr CookieManager::GetCookieStore() const { scoped_refptr request_context_getter = GetContextGetter(); if (request_context_getter.get()) { - return scoped_ptr( + return std::unique_ptr( request_context_getter->GetURLRequestContext()->cookie_store()); } else { - return scoped_ptr(); + return std::unique_ptr(); } } diff --git a/tizen_src/ewk/efl_integration/cookie_manager.h b/tizen_src/ewk/efl_integration/cookie_manager.h index 65c9da3..2fa378c 100644 --- a/tizen_src/ewk/efl_integration/cookie_manager.h +++ b/tizen_src/ewk/efl_integration/cookie_manager.h @@ -101,12 +101,12 @@ class CookieManager : public base::RefCountedThreadSafe { const GURL& first_party_url, bool setting_cookie); // Fetch the cookies. This must be called in the IO thread. - void FetchCookiesOnIOThread(scoped_ptr cookie_store); + void FetchCookiesOnIOThread(std::unique_ptr cookie_store); void OnFetchComplete(const net::CookieList& cookies); scoped_refptr GetSharedThis(); scoped_refptr GetContextGetter() const; - scoped_ptr GetCookieStore() const; + std::unique_ptr GetCookieStore() const; scoped_refptr request_context_getter_; //cookie policy information base::Lock lock_; diff --git a/tizen_src/ewk/efl_integration/devtools_delegate_efl.cc b/tizen_src/ewk/efl_integration/devtools_delegate_efl.cc index dd0efde..e80b3a8 100644 --- a/tizen_src/ewk/efl_integration/devtools_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/devtools_delegate_efl.cc @@ -54,11 +54,11 @@ class TCPServerSocketFactory port_(port) {} private: - scoped_ptr CreateForHttpServer() override { - scoped_ptr socket( + std::unique_ptr CreateForHttpServer() override { + std::unique_ptr socket( new net::TCPServerSocket(nullptr, net::NetLog::Source())); if (socket->ListenWithAddressAndPort(address_, port_, kBackLog) != net::OK) - return scoped_ptr(); + return std::unique_ptr(); return socket; } @@ -81,7 +81,7 @@ DevToolsDelegateEfl::DevToolsDelegateEfl(int port) // be creating async callbacks that would inform when inspector server started // and on which port. static std::string addr = "0.0.0.0"; - scoped_ptr sock(new net::TCPServerSocket(NULL, net::NetLog::Source())); + std::unique_ptr sock(new net::TCPServerSocket(NULL, net::NetLog::Source())); const base::CommandLine* const command_line = base::CommandLine::ForCurrentProcess(); // See if the user specified a port on the command line (useful for @@ -108,7 +108,7 @@ DevToolsDelegateEfl::DevToolsDelegateEfl(int port) sock->GetLocalAddress(&givenIp); port_ = givenIp.port(); - scoped_ptr factory( + std::unique_ptr factory( new TCPServerSocketFactory(addr, port_)); devtools_http_handler_.reset(new devtools_http_handler::DevToolsHttpHandler( diff --git a/tizen_src/ewk/efl_integration/devtools_delegate_efl.h b/tizen_src/ewk/efl_integration/devtools_delegate_efl.h index cd6edb7..82343b5 100644 --- a/tizen_src/ewk/efl_integration/devtools_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/devtools_delegate_efl.h @@ -7,7 +7,6 @@ #include "base/compiler_specific.h" -#include "base/memory/scoped_ptr.h" #include "components/devtools_http_handler/devtools_http_handler_delegate.h" namespace content { @@ -51,7 +50,7 @@ class DevToolsDelegateEfl : public DevToolsHttpHandlerDelegate { private: int port_; content::BrowserContext* browser_context_; - scoped_ptr devtools_http_handler_; + std::unique_ptr devtools_http_handler_; }; } // namespace content diff --git a/tizen_src/ewk/efl_integration/efl_integration.gypi b/tizen_src/ewk/efl_integration/efl_integration.gypi index c6c7fb3..f55c2a2 100644 --- a/tizen_src/ewk/efl_integration/efl_integration.gypi +++ b/tizen_src/ewk/efl_integration/efl_integration.gypi @@ -54,6 +54,7 @@ '<(DEPTH)/components/components.gyp:autofill_content_renderer', '<(DEPTH)/components/components.gyp:autofill_content_browser', '<(DEPTH)/components/components.gyp:devtools_http_handler', + '<(DEPTH)/components/components.gyp:network_session_configurator_switches', '<(DEPTH)/components/components.gyp:password_manager_content_browser', '<(DEPTH)/components/components.gyp:password_manager_core_common', '<(DEPTH)/components/components.gyp:password_manager_core_browser', @@ -64,13 +65,14 @@ '<(DEPTH)/printing/printing.gyp:printing', '<(DEPTH)/skia/skia.gyp:skia', '<(DEPTH)/storage/storage_browser.gyp:storage', + '<(DEPTH)/third_party/leveldatabase/leveldatabase.gyp:leveldatabase', '<(DEPTH)/third_party/sqlite/sqlite.gyp:sqlite', '<(DEPTH)/third_party/WebKit/Source/wtf/wtf.gyp:wtf', '<(DEPTH)/ui/compositor/compositor.gyp:compositor', '<(DEPTH)/ui/events/events.gyp:events', '<(DEPTH)/ui/events/events.gyp:events_base', '<(DEPTH)/ui/gl/gl.gyp:gl', - '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', + '<(DEPTH)/v8/src/v8.gyp:v8', ], 'defines': [ @@ -280,9 +282,12 @@ 'browser/web_view_browser_message_filter.cc', 'browser/web_view_browser_message_filter.h', - # Make use of Android webview's simplified pref class. - '<(DEPTH)/android_webview/browser/aw_pref_store.h', - '<(DEPTH)/android_webview/browser/aw_pref_store.cc', +# [M53_2785] The AwPrefStore class was removed in m53. +# It will be fixed by webview team. +# FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2071 +# # Make use of Android webview's simplified pref class. +# '<(DEPTH)/android_webview/browser/aw_pref_store.h', +# '<(DEPTH)/android_webview/browser/aw_pref_store.cc', 'browser/autofill/autofill_client_efl.h', 'browser/autofill/autofill_client_efl.cc', 'browser/autofill/personal_data_manager_factory.cc', @@ -507,8 +512,8 @@ 'renderer/print_web_view_helper_efl.h', 'renderer/render_frame_observer_efl.cc', 'renderer/render_frame_observer_efl.h', - 'renderer/render_process_observer_efl.cc', - 'renderer/render_process_observer_efl.h', + 'renderer/render_thread_observer_efl.cc', + 'renderer/render_thread_observer_efl.h', 'renderer/render_view_observer_efl.cc', 'renderer/render_view_observer_efl.h', diff --git a/tizen_src/ewk/efl_integration/eweb_context.cc b/tizen_src/ewk/efl_integration/eweb_context.cc index 44f6c38..0a37d60 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.cc +++ b/tizen_src/ewk/efl_integration/eweb_context.cc @@ -90,7 +90,7 @@ void SetProxyConfigCallbackOnIOThread(base::WaitableEvent* done, net::ProxyService* proxy_service = url_request_context_getter->GetURLRequestContext()->proxy_service(); proxy_service->ResetConfigService( - make_scoped_ptr(new net::ProxyConfigServiceFixed(proxy_config))); + base::WrapUnique(new net::ProxyConfigServiceFixed(proxy_config))); done->Signal(); } @@ -171,7 +171,7 @@ void GetFileSystemOriginsOnFILEThread(Ewk_Web_Database_Origins_Get_Callback call void* user_data, content::StoragePartition* partition) { DCHECK(BrowserThread::CurrentlyOn(BrowserThread::FILE)); - scoped_ptr client( new storage::FileSystemQuotaClient(partition->GetFileSystemContext(), false)); + std::unique_ptr client( new storage::FileSystemQuotaClient(partition->GetFileSystemContext(), false)); client->GetOriginsForType(storage::kStorageTypeTemporary, base::Bind(&OnGetFileSystemOrigins, callback, user_data)); @@ -254,7 +254,7 @@ EWebContext::EWebContext(bool incognito, const std::string& injectedBundlePath) // there are ewk_cookie_manager APIs that can be called before a // WebView instance is created. In such circumstances, APIs including // ewk_cookie_manager_persistent_storage_set fail to execute. - browser_context_->GetRequestContext(); + BrowserContext::GetDefaultStoragePartition(browser_context())->GetURLRequestContext(); // Notification Service gets init in BrowserMainRunner init, // so cache manager can register for notifications only after that. @@ -290,11 +290,11 @@ Ewk_Cache_Model EWebContext::GetCacheModel() const { } void EWebContext::SetNetworkCacheEnable(bool enable) { - net::URLRequestContext* url_context = browser_context_->GetRequestContext()->GetURLRequestContext(); + net::URLRequestContextGetter* url_context = BrowserContext::GetDefaultStoragePartition(browser_context())->GetURLRequestContext(); if (!url_context) return; - net::HttpTransactionFactory* transaction_factory = url_context->http_transaction_factory(); + net::HttpTransactionFactory* transaction_factory = url_context->GetURLRequestContext()->http_transaction_factory(); if (!transaction_factory) return; @@ -309,8 +309,8 @@ void EWebContext::SetNetworkCacheEnable(bool enable) { } bool EWebContext::GetNetworkCacheEnable() const { - net::HttpCache* http_cache = browser_context_->GetRequestContext()->GetURLRequestContext()-> - http_transaction_factory()->GetCache(); + net::HttpCache* http_cache = BrowserContext::GetDefaultStoragePartition(browser_context())->GetURLRequestContext()-> + GetURLRequestContext()->http_transaction_factory()->GetCache(); if (!http_cache) return false; @@ -368,11 +368,12 @@ void EWebContext::SetProxyUri(const char* uri) { proxy_uri_ = string(uri); net::ProxyConfig config; config.proxy_rules().ParseFromString(proxy_uri_); - base::WaitableEvent done(false, false); + base::WaitableEvent done(base::WaitableEvent::ResetPolicy::AUTOMATIC, + base::WaitableEvent::InitialState::NOT_SIGNALED); BrowserThread::PostTask( BrowserThread::IO, FROM_HERE, base::Bind(&SetProxyConfigCallbackOnIOThread, &done, - base::RetainedRef(browser_context()->GetRequestContext()), + base::RetainedRef(BrowserContext::GetDefaultStoragePartition(browser_context())->GetURLRequestContext()), config)); done.Wait(); } diff --git a/tizen_src/ewk/efl_integration/eweb_context.h b/tizen_src/ewk/efl_integration/eweb_context.h index 67ea798..5519c20 100644 --- a/tizen_src/ewk/efl_integration/eweb_context.h +++ b/tizen_src/ewk/efl_integration/eweb_context.h @@ -6,7 +6,6 @@ #define EWEB_CONTEXT_H #include "base/files/file_path.h" -#include "base/memory/scoped_ptr.h" #include "browser/web_cache_efl/web_cache_manager_efl.h" #include "common/tizen_extensible.h" #include "private/ewk_cookie_manager_private.h" @@ -179,11 +178,11 @@ class EWebContext { ~EWebContext(); friend class Ewk_Context; - scoped_ptr web_cache_manager_; - scoped_ptr browser_context_; - scoped_ptr ewk_cookie_manager_; - scoped_ptr tizen_extensible_; - scoped_ptr ewk_favicon_database_; + std::unique_ptr web_cache_manager_; + std::unique_ptr browser_context_; + std::unique_ptr ewk_cookie_manager_; + std::unique_ptr tizen_extensible_; + std::unique_ptr ewk_favicon_database_; std::string proxy_uri_; std::string injected_bundle_path_; // widget info @@ -192,11 +191,11 @@ class EWebContext { std::string widget_encoded_bundle_; double widget_scale_; - scoped_ptr start_download_callback_; - scoped_ptr mime_override_callback_; + std::unique_ptr start_download_callback_; + std::unique_ptr mime_override_callback_; int m_pixmap; devtools_http_handler::DevToolsDelegateEfl* inspector_server_; - scoped_ptr notification_cb_; + std::unique_ptr notification_cb_; }; #endif diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index 508b40a..ebfd5cf 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -55,7 +55,7 @@ #include "web_contents_efl_delegate_ewk.h" #include "web_contents_view_efl_delegate_ewk.h" #include "ui/base/l10n/l10n_util.h" -#include "ui/gfx/screen.h" +#include "ui/display/screen.h" #include "permission_popup_manager.cc" #include "browser/web_view_evas_handler.h" @@ -169,7 +169,8 @@ EWebView::EWebView(Ewk_Context* context, Evas_Object* object) formIsNavigating_(false), current_find_request_id_(find_request_id_counter_++), progress_(0.0), - hit_test_completion_(false, false), + hit_test_completion_(base::WaitableEvent::ResetPolicy::AUTOMATIC, + base::WaitableEvent::InitialState::NOT_SIGNALED), page_scale_factor_(1.0), is_initialized_(false) { } @@ -542,7 +543,7 @@ void EWebView::InvokePolicyNavigationCallback(RenderViewHost* rvh, SmartCallback().call(); - scoped_ptr<_Ewk_Policy_Decision> policy_decision(new _Ewk_Policy_Decision(params, rvh)); + std::unique_ptr<_Ewk_Policy_Decision> policy_decision(new _Ewk_Policy_Decision(params, rvh)); SmartCallback().call(policy_decision.get()); @@ -839,7 +840,7 @@ void EWebView::InvokeLoadError(const GURL& url, int error_code, if (!is_main_frame) return; - scoped_ptr<_Ewk_Error> err(new _Ewk_Error(error_code, + std::unique_ptr<_Ewk_Error> err(new _Ewk_Error(error_code, url.possibly_invalid_spec().c_str(), error_description.c_str())); SmartCallback().call(err.get()); @@ -1173,7 +1174,7 @@ SelectionControllerEfl* EWebView::GetSelectionController() const { } void EWebView::SelectLinkText(const gfx::Point& touch_point) { - float device_scale_factor = gfx::Screen::GetScreen()-> + float device_scale_factor = display::Screen::GetScreen()-> GetPrimaryDisplay().device_scale_factor(); RenderViewHost* render_view_host = web_contents_->GetRenderViewHost(); render_view_host->Send(new ViewMsg_SelectLinkText( @@ -1279,7 +1280,7 @@ void EWebView::DispatchAsyncHitTestData(const Hit_Test_Params& params, int64_t r if (it == hit_test_callback_.end()) return; - scoped_ptr<_Ewk_Hit_Test> hit_test(new _Ewk_Hit_Test(params)); + std::unique_ptr<_Ewk_Hit_Test> hit_test(new _Ewk_Hit_Test(params)); it->second->Run(hit_test.get(), this); delete it->second; @@ -1306,19 +1307,19 @@ _Ewk_Hit_Test* EWebView::RequestHitTestDataAtBlinkCoords(int x, int y, Ewk_Hit_T } void EWebView::EvasToBlinkCords(int x, int y, int* view_x, int* view_y) { - DCHECK(gfx::Screen::GetScreen()); + DCHECK(display::Screen::GetScreen()); Evas_Coord tmpX, tmpY; evas_object_geometry_get(evas_object_, &tmpX, &tmpY, NULL, NULL); if (view_x) { *view_x = x - tmpX; - *view_x /= gfx::Screen::GetScreen()-> + *view_x /= display::Screen::GetScreen()-> GetPrimaryDisplay().device_scale_factor(); } if (view_y) { *view_y = y - tmpY; - *view_y /= gfx::Screen::GetScreen()-> + *view_y /= display::Screen::GetScreen()-> GetPrimaryDisplay().device_scale_factor(); } } @@ -1779,7 +1780,7 @@ bool EWebView::RestoreFromSessionData(const char *data, unsigned length) { if (!entryCount) return true; - std::vector> scopedEntries = + std::vector> scopedEntries = sessions::ContentSerializedNavigationBuilder::ToNavigationEntries( serializedEntries, context()->browser_context()); @@ -2066,8 +2067,8 @@ void EWebView::UrlRequestSet(const char* url, if (body) { std::string s(body); - params.browser_initiated_post_data = - base::RefCountedString::TakeString(&s); + params.post_data = content::ResourceRequestBody::CreateFromBytes( + s.data(), s.size()); } net::HttpRequestHeaders header; diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 09836c9..5e8ea90 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -20,7 +20,6 @@ #include "base/callback.h" #include "base/id_map.h" -#include "base/memory/scoped_ptr.h" #include "base/synchronization/waitable_event.h" #include "browser/inputpicker/InputPicker.h" #include "browser/selectpicker/popup_picker.h" @@ -452,12 +451,12 @@ class EWebView { scoped_refptr evas_event_handler_; scoped_refptr context_; scoped_refptr old_context_; - scoped_ptr web_contents_; - scoped_ptr web_contents_delegate_; + std::unique_ptr web_contents_; + std::unique_ptr web_contents_delegate_; std::string pending_url_request_; - scoped_ptr settings_; - scoped_ptr<_Ewk_Frame> frame_; - scoped_ptr<_Ewk_Policy_Decision> window_policy_; + std::unique_ptr settings_; + std::unique_ptr<_Ewk_Frame> frame_; + std::unique_ptr<_Ewk_Policy_Decision> window_policy_; Evas_Object* evas_object_; Evas_Object* native_view_; bool touch_events_enabled_; @@ -465,7 +464,7 @@ class EWebView { double text_zoom_factor_; mutable std::string user_agent_; mutable std::string user_agent_app_name_; - scoped_ptr<_Ewk_Auth_Challenge> auth_challenge_; + std::unique_ptr<_Ewk_Auth_Challenge> auth_challenge_; Eina_List* popupMenuItems_; Popup_Picker* popupPicker_; @@ -477,9 +476,9 @@ class EWebView { bool nextState; } formNavigation; formNavigation formNavigation_; - scoped_ptr context_menu_; - scoped_ptr file_chooser_; - scoped_ptr popup_controller_; + std::unique_ptr context_menu_; + std::unique_ptr file_chooser_; + std::unique_ptr popup_controller_; base::string16 previous_text_; int current_find_request_id_; static int find_request_id_counter_; @@ -511,12 +510,12 @@ class EWebView { WebViewCallback quota_request_callback_; - scoped_ptr inputPicker_; + std::unique_ptr inputPicker_; IDMap web_app_icon_url_get_callback_map_; IDMap web_app_icon_urls_get_callback_map_; IDMap web_app_capable_get_callback_map_; - scoped_ptr permission_popup_manager_; - scoped_ptr scroll_detector_; + std::unique_ptr permission_popup_manager_; + std::unique_ptr scroll_detector_; #if defined(OS_TIZEN_MOBILE) content::FileChooserParams::Mode filechooser_mode_; @@ -525,7 +524,7 @@ class EWebView { bool is_initialized_; - scoped_ptr<_Ewk_Back_Forward_List> back_forward_list_; + std::unique_ptr<_Ewk_Back_Forward_List> back_forward_list_; static content::WebContentsEflDelegate::WebContentsCreateCallback create_new_window_web_contents_cb_; diff --git a/tizen_src/ewk/efl_integration/ewk_global_data.cc b/tizen_src/ewk/efl_integration/ewk_global_data.cc index 88960a1..e532412 100644 --- a/tizen_src/ewk/efl_integration/ewk_global_data.cc +++ b/tizen_src/ewk/efl_integration/ewk_global_data.cc @@ -30,7 +30,7 @@ #include "command_line_efl.h" #include "content_main_delegate_efl.h" #include "message_pump_for_ui_efl.h" -#include "ui/gfx/screen_efl.h" +#include "ui/display/screen_efl.h" #ifdef OS_TIZEN #include @@ -50,8 +50,8 @@ EwkGlobalData* EwkGlobalData::instance_ = NULL; namespace { -scoped_ptr MessagePumpFactory() { - return scoped_ptr(new base::MessagePumpForUIEfl); +std::unique_ptr MessagePumpFactory() { + return std::unique_ptr(new base::MessagePumpForUIEfl); } } // namespace diff --git a/tizen_src/ewk/efl_integration/file_chooser_controller_efl.cc b/tizen_src/ewk/efl_integration/file_chooser_controller_efl.cc index 15731e7..62bdf80 100644 --- a/tizen_src/ewk/efl_integration/file_chooser_controller_efl.cc +++ b/tizen_src/ewk/efl_integration/file_chooser_controller_efl.cc @@ -33,7 +33,13 @@ static void _fs_done(void* data, Evas_Object* obj, void* event_info) { } } +#if !defined(EWK_BRINGUP) +// [M53_2785] The FilesSelectedInChooser function moved to RenderFrameHost from +// RenderViewHost. +// It will be fixed by webcore team. +// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2072 render_view_host->FilesSelectedInChooser(files, inst->GetParams()->mode); +#endif // EWK_BRINGUP evas_object_del(elm_object_top_widget_get(obj)); } 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 c8cd83a..39caa02 100644 --- a/tizen_src/ewk/efl_integration/file_chooser_controller_efl.h +++ b/tizen_src/ewk/efl_integration/file_chooser_controller_efl.h @@ -6,6 +6,7 @@ #define file_chooser_controller_efl_h #include +#include "content/public/common/file_chooser_params.h" namespace content { diff --git a/tizen_src/ewk/efl_integration/link_xwalk_against_chromium_efl.gypi b/tizen_src/ewk/efl_integration/link_xwalk_against_chromium_efl.gypi index a40a320..54d087d 100644 --- a/tizen_src/ewk/efl_integration/link_xwalk_against_chromium_efl.gypi +++ b/tizen_src/ewk/efl_integration/link_xwalk_against_chromium_efl.gypi @@ -43,7 +43,7 @@ '<(DEPTH)/ui/shell_dialogs/shell_dialogs.gyp:shell_dialogs', '<(DEPTH)/ui/snapshot/snapshot.gyp:snapshot', '<(DEPTH)/url/url.gyp:url_lib', - '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', + '<(DEPTH)/v8/src/v8.gyp:v8', ], 'external_xwalk_application_common_lib_dependencies_removals': [ @@ -84,7 +84,7 @@ '../../content/content.gyp:content', '../../ipc/ipc.gyp:ipc', '../../url/url.gyp:url_lib', - '../../v8/tools/gyp/v8.gyp:v8', + '../../v8/src/v8.gyp:v8', '../../third_party/WebKit/public/blink.gyp:blink', ], diff --git a/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc b/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc index 75f81ab..7afd644 100644 --- a/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc +++ b/tizen_src/ewk/efl_integration/pkgconfig/chromium-ewk.pc @@ -5,7 +5,7 @@ includedir=${prefix}/include Name: chromium-ewk Description: EWK API based on chromium-efl engine -Version: 51.2704.0.17-1 +Version: 53.2785.0.36-1 Requires: chromium-efl Libs: -L${libdir} -lchromium-ewk Cflags: -I${includedir}/chromium-ewk diff --git a/tizen_src/ewk/efl_integration/private/ewk_notification_private.h b/tizen_src/ewk/efl_integration/private/ewk_notification_private.h index 3a9bc7c..c098d4f 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_notification_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_notification_private.h @@ -10,7 +10,6 @@ #include "base/callback.h" #include "base/macros.h" -#include "base/memory/scoped_ptr.h" #include "private/ewk_security_origin_private.h" #include "third_party/skia/include/core/SkBitmap.h" #include "third_party/WebKit/public/platform/modules/permissions/permission_status.mojom.h" @@ -44,7 +43,7 @@ struct Ewk_Notification { std::string title_; bool silent_; uint64_t notificationID_; - scoped_ptr<_Ewk_Security_Origin> origin_; + std::unique_ptr<_Ewk_Security_Origin> origin_; DISALLOW_COPY_AND_ASSIGN(Ewk_Notification); @@ -67,7 +66,7 @@ struct Ewk_Notification_Permission_Request { private: Evas_Object* webview_; - scoped_ptr<_Ewk_Security_Origin> origin_; + std::unique_ptr<_Ewk_Security_Origin> origin_; base::Callback callback_; bool decided_; mutable bool suspended_; diff --git a/tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.h b/tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.h index d4bc259..e128cd9 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_policy_decision_private.h @@ -11,7 +11,6 @@ #include "base/callback.h" #include "base/memory/ref_counted.h" -#include "base/memory/scoped_ptr.h" #include "browser/navigation_policy_handler_efl.h" #include "browser/policy_response_delegate_efl.h" #include "content/public/browser/web_contents_efl_delegate.h" @@ -107,8 +106,8 @@ private: EWebView* web_view_; scoped_refptr policy_response_delegate_; - scoped_ptr navigation_policy_handler_; - scoped_ptr<_Ewk_Frame> frame_; + std::unique_ptr navigation_policy_handler_; + std::unique_ptr<_Ewk_Frame> frame_; content::WebContentsEflDelegate::NewWindowDecideCallback window_create_callback_; std::string cookie_; std::string url_; diff --git a/tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.h b/tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.h index 99dbeeab..b787479 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_quota_permission_request_private.h @@ -8,7 +8,6 @@ #include #include -#include "base/memory/scoped_ptr.h" #include "url/gurl.h" #include "private/ewk_security_origin_private.h" @@ -26,7 +25,7 @@ struct _Ewk_Quota_Permission_Request { bool IsPersistent() const; private: - const scoped_ptr<_Ewk_Security_Origin> origin_; + const std::unique_ptr<_Ewk_Security_Origin> origin_; int64_t newQuota_; bool isPersistent_; diff --git a/tizen_src/ewk/efl_integration/private/ewk_user_media_private.h b/tizen_src/ewk/efl_integration/private/ewk_user_media_private.h index 21ec480..4630f6b 100644 --- a/tizen_src/ewk/efl_integration/private/ewk_user_media_private.h +++ b/tizen_src/ewk/efl_integration/private/ewk_user_media_private.h @@ -35,9 +35,9 @@ class _Ewk_User_Media_Permission_Request { content::MediaStreamRequest request_; content::MediaResponseCallback callback_; - scoped_ptr<_Ewk_Security_Origin> origin_; + std::unique_ptr<_Ewk_Security_Origin> origin_; bool decided_; bool suspended_; }; -#endif // ewk_user_media_private_h \ No newline at end of file +#endif // ewk_user_media_private_h diff --git a/tizen_src/ewk/efl_integration/public/ewk_dispatcher.cc b/tizen_src/ewk/efl_integration/public/ewk_dispatcher.cc index eb20578..59097e0 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_dispatcher.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_dispatcher.cc @@ -9,7 +9,7 @@ #include #include -#include "base/thread_task_runner_handle.h" +#include "base/threading/thread_task_runner_handle.h" using namespace base; diff --git a/tizen_src/ewk/efl_integration/public/ewk_object.cc b/tizen_src/ewk/efl_integration/public/ewk_object.cc index 2b18c91..b833c43 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_object.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_object.cc @@ -4,7 +4,6 @@ // found in the LICENSE file. #include "ewk_object.h" -#include "config.h" #include "private/ewk_object_private.h" #include "private/ewk_private.h" diff --git a/tizen_src/ewk/efl_integration/public/ewk_view.cc b/tizen_src/ewk/efl_integration/public/ewk_view.cc index 49dfe68..b5f0462 100644 --- a/tizen_src/ewk/efl_integration/public/ewk_view.cc +++ b/tizen_src/ewk/efl_integration/public/ewk_view.cc @@ -315,7 +315,7 @@ Eina_Bool ewk_view_url_request_set(Evas_Object* ewkView, const char* url, Ewk_Ht loadtype = content::NavigationController::LOAD_TYPE_DEFAULT; break; case EWK_HTTP_METHOD_POST: - loadtype = content::NavigationController::LOAD_TYPE_BROWSER_INITIATED_HTTP_POST; + loadtype = content::NavigationController::LOAD_TYPE_HTTP_POST; break; default: LOG(ERROR) << "Not supported HTTP Method."; diff --git a/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc b/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc index 88d40a1..9212918 100644 --- a/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.cc @@ -27,6 +27,7 @@ #include "third_party/WebKit/public/platform/URLConversion.h" #include "third_party/WebKit/public/platform/WebURLError.h" #include "third_party/WebKit/public/platform/WebURLRequest.h" +#include "third_party/WebKit/public/platform/WebViewportStyle.h" #include "third_party/WebKit/public/web/WebDataSource.h" #include "third_party/WebKit/public/web/WebDocument.h" #include "third_party/WebKit/public/web/WebFrame.h" @@ -114,8 +115,8 @@ void ContentRendererClientEfl::RenderThreadStarted() theme, encoded_bundle); } - render_process_observer_.reset(new RenderProcessObserverEfl(this)); - thread->AddObserver(render_process_observer_.get()); + render_thread_observer_.reset(new RenderThreadObserverEfl(this)); + thread->AddObserver(render_thread_observer_.get()); visited_link_slave_.reset(new visitedlink::VisitedLinkSlave()); thread->AddObserver(visited_link_slave_.get()); @@ -321,7 +322,7 @@ void ContentRendererClientEfl::ApplyCustomMobileSettings(blink::WebView* webview base::CommandLine* cmdline = base::CommandLine::ForCurrentProcess(); if (cmdline->HasSwitch(switches::kEwkEnableMobileFeaturesForDesktop)) { blink::WebSettings* settings = webview->settings(); - settings->setUseMobileViewportStyle(true); + settings->setViewportStyle(blink::WebViewportStyle::Mobile); settings->setViewportMetaEnabled(true); settings->setAutoZoomFocusedNodeToLegibleScale(true); webview->setDefaultPageScaleLimits(minimum_page_scale_for_mobile, diff --git a/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.h b/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.h index c39c6ed..0d32268 100644 --- a/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.h +++ b/tizen_src/ewk/efl_integration/renderer/content_renderer_client_efl.h @@ -8,8 +8,8 @@ #include "content/public/renderer/content_renderer_client.h" #include "content/public/renderer/render_frame_observer.h" #include "renderer/content_renderer_client_efl.h" +#include "renderer/render_thread_observer_efl.h" #include "v8/include/v8.h" -#include "renderer/render_process_observer_efl.h" namespace blink { class WebView; @@ -102,10 +102,10 @@ class ContentRendererClientEfl : public content::ContentRendererClient private: static void ApplyCustomMobileSettings(blink::WebView*); - scoped_ptr wrt_widget_; - scoped_ptr wrt_url_parser_; - scoped_ptr render_process_observer_; - scoped_ptr visited_link_slave_; + std::unique_ptr wrt_widget_; + std::unique_ptr wrt_url_parser_; + std::unique_ptr render_thread_observer_; + std::unique_ptr visited_link_slave_; bool javascript_can_open_windows_; }; diff --git a/tizen_src/ewk/efl_integration/renderer/editorclient_agent.cc b/tizen_src/ewk/efl_integration/renderer/editorclient_agent.cc index 6872272..a5d1729 100644 --- a/tizen_src/ewk/efl_integration/renderer/editorclient_agent.cc +++ b/tizen_src/ewk/efl_integration/renderer/editorclient_agent.cc @@ -17,6 +17,10 @@ EditorClientAgent::EditorClientAgent(content::RenderView* render_view) #endif } +void EditorClientAgent::OnDestruct() { + delete this; +} + bool EditorClientAgent::OnMessageReceived(const IPC::Message& message) { return false; } diff --git a/tizen_src/ewk/efl_integration/renderer/editorclient_agent.h b/tizen_src/ewk/efl_integration/renderer/editorclient_agent.h index f98b70c..5820b91 100644 --- a/tizen_src/ewk/efl_integration/renderer/editorclient_agent.h +++ b/tizen_src/ewk/efl_integration/renderer/editorclient_agent.h @@ -23,6 +23,8 @@ class EditorClientAgent : public content::RenderViewObserver { public: EditorClientAgent(content::RenderView* render_view); + void OnDestruct() override; + // RenderView::Observer: virtual bool OnMessageReceived(const IPC::Message& message) override; diff --git a/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.cc b/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.cc index dd19325..f12b21c 100644 --- a/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.cc @@ -36,6 +36,12 @@ PluginPlaceholderEfl* PluginPlaceholderEfl::CreateMissingPlugin( return missing_plugin; } +void PluginPlaceholderEfl::OnLoadedRectUpdate( + const gfx::Rect& unobscured_rect, + content::RenderFrame::PeripheralContentStatus status) { + NOTIMPLEMENTED(); +} + blink::WebPlugin* PluginPlaceholderEfl::CreatePlugin() { NOTIMPLEMENTED(); return nullptr; diff --git a/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.h b/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.h index a7b0561..2d253dd 100644 --- a/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.h +++ b/tizen_src/ewk/efl_integration/renderer/plugins/plugin_placeholder_efl.h @@ -18,6 +18,10 @@ class PluginPlaceholderEfl : public plugins::LoadablePluginPlaceholder, blink::WebLocalFrame* frame, const blink::WebPluginParams& params); + void OnLoadedRectUpdate( + const gfx::Rect& unobscured_rect, + content::RenderFrame::PeripheralContentStatus status) override; + private: PluginPlaceholderEfl(content::RenderFrame* render_frame, blink::WebLocalFrame* frame, 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 1ca3f2e..4e1ba2b 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 @@ -11,7 +11,6 @@ #include "printing/metafile_skia_wrapper.h" #include "printing/pdf_metafile_skia.h" #include "printing/units.h" -#include "skia/ext/refptr.h" #include "base/compiler_specific.h" #include "skia/ext/platform_canvas.h" #include "third_party/skia/include/core/SkCanvas.h" @@ -124,7 +123,7 @@ bool PrintWebViewHelperEfl::RenderPagesForPrint(blink::WebFrame* frame) { bool PrintWebViewHelperEfl::PrintPagesToPdf(blink::WebFrame* frame, int page_count, const gfx::Size& canvas_size) { - printing::PdfMetafileSkia metafile; + printing::PdfMetafileSkia metafile(printing::PDF_SKIA_DOCUMENT_TYPE); if (!metafile.Init()) return false; @@ -165,7 +164,7 @@ bool PrintWebViewHelperEfl::PrintPagesToPdf(blink::WebFrame* frame, printed_page_params.filename = filename_; { - scoped_ptr shared_mem( + std::unique_ptr shared_mem( content::RenderThread::Get()->HostAllocateSharedMemoryBuffer( buf_size).release()); if (!shared_mem.get()) { 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 dc51095..b052f6c 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 @@ -6,7 +6,6 @@ #define PRINT_WEB_VIEW_HELPER_H_ #include "base/files/file_path.h" -#include "base/memory/scoped_ptr.h" #include "common/print_pages_params.h" #include "third_party/WebKit/public/platform/WebCanvas.h" @@ -38,7 +37,7 @@ class PrintWebViewHelperEfl { const gfx::Size& canvas_size, blink::WebFrame* frame, printing::PdfMetafileSkia* metafile); bool RenderPagesForPrint(blink::WebFrame* frame); - scoped_ptr print_pages_params_; + std::unique_ptr print_pages_params_; content::RenderView* view_; base::FilePath filename_; }; diff --git a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc index 706982b..ab64ef2 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.cc @@ -71,6 +71,10 @@ RenderFrameObserverEfl::RenderFrameObserverEfl(RenderFrame* render_frame) RenderFrameObserverEfl::~RenderFrameObserverEfl() { } +void RenderFrameObserverEfl::OnDestruct() { + delete this; +} + bool RenderFrameObserverEfl::OnMessageReceived(const IPC::Message& message) { bool handled = true; IPC_BEGIN_MESSAGE_MAP(RenderFrameObserverEfl, message) diff --git a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h index f7ec8fa..40ad680 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h +++ b/tizen_src/ewk/efl_integration/renderer/render_frame_observer_efl.h @@ -23,6 +23,8 @@ class RenderFrameObserverEfl : public RenderFrameObserver { explicit RenderFrameObserverEfl(RenderFrame* render_frame); virtual ~RenderFrameObserverEfl(); + void OnDestruct() override; + // IPC::Listener implementation. bool OnMessageReceived(const IPC::Message& message) override; diff --git a/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.cc b/tizen_src/ewk/efl_integration/renderer/render_thread_observer_efl.cc similarity index 81% rename from tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.cc rename to tizen_src/ewk/efl_integration/renderer/render_thread_observer_efl.cc index 1be4304..7caecf6 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/render_thread_observer_efl.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "renderer/render_process_observer_efl.h" +#include "renderer/render_thread_observer_efl.h" #include "base/allocator/allocator_extension.h" #include "base/command_line.h" @@ -23,7 +23,7 @@ using blink::WebCache; using blink::WebRuntimeFeatures; using content::RenderThread; -RenderProcessObserverEfl::RenderProcessObserverEfl( +RenderThreadObserverEfl::RenderThreadObserverEfl( ContentRendererClientEfl* content_client) : content_client_(content_client) { const base::CommandLine& command_line = *base::CommandLine::ForCurrentProcess(); @@ -31,10 +31,10 @@ RenderProcessObserverEfl::RenderProcessObserverEfl( WebRuntimeFeatures::enableCSSViewModeMediaFeature(true); } -bool RenderProcessObserverEfl::OnControlMessageReceived(const IPC::Message& message) +bool RenderThreadObserverEfl::OnControlMessageReceived(const IPC::Message& message) { bool handled = true; - IPC_BEGIN_MESSAGE_MAP(RenderProcessObserverEfl, message) + IPC_BEGIN_MESSAGE_MAP(RenderThreadObserverEfl, message) IPC_MESSAGE_HANDLER(EflViewMsg_ClearCache, OnClearCache) IPC_MESSAGE_HANDLER(EflViewMsg_SetCache, OnSetCache) IPC_MESSAGE_UNHANDLED(handled = false) @@ -42,12 +42,12 @@ bool RenderProcessObserverEfl::OnControlMessageReceived(const IPC::Message& mess return handled; } -void RenderProcessObserverEfl::OnClearCache() +void RenderThreadObserverEfl::OnClearCache() { WebCache::clear(); } -void RenderProcessObserverEfl::OnSetCache(const CacheParamsEfl& params) +void RenderThreadObserverEfl::OnSetCache(const CacheParamsEfl& params) { WebCache::setCapacities(static_cast(params.cache_min_dead_capacity), static_cast(params.cache_max_dead_capacity), diff --git a/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.h b/tizen_src/ewk/efl_integration/renderer/render_thread_observer_efl.h similarity index 65% rename from tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.h rename to tizen_src/ewk/efl_integration/renderer/render_thread_observer_efl.h index f4f4137..fbd136a 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_process_observer_efl.h +++ b/tizen_src/ewk/efl_integration/renderer/render_thread_observer_efl.h @@ -2,14 +2,14 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef RENDER_PROCESS_OBSERVER_EFL_H -#define RENDER_PROCESS_OBSERVER_EFL_H +#ifndef RENDER_THREAD_OBSERVER_EFL_H +#define RENDER_THREAD_OBSERVER_EFL_H #include #include "base/compiler_specific.h" #include "common/cache_params_efl.h" -#include "content/public/renderer/render_process_observer.h" +#include "content/public/renderer/render_thread_observer.h" namespace IPC { class Message; @@ -17,9 +17,9 @@ class Message; class ContentRendererClientEfl; -class RenderProcessObserverEfl : public content::RenderProcessObserver { +class RenderThreadObserverEfl : public content::RenderThreadObserver { public: - explicit RenderProcessObserverEfl(ContentRendererClientEfl* content_client); + explicit RenderThreadObserverEfl(ContentRendererClientEfl* content_client); bool OnControlMessageReceived(const IPC::Message& message) override; void OnClearCache(); diff --git a/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc b/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc index 9bdcb25..469d238 100644 --- a/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc +++ b/tizen_src/ewk/efl_integration/renderer/render_view_observer_efl.cc @@ -185,6 +185,10 @@ bool RenderViewObserverEfl::OnMessageReceived(const IPC::Message& message) return handled; } +void RenderViewObserverEfl::OnDestruct() { + delete this; +} + void RenderViewObserverEfl::DidCreateDocumentElement(blink::WebLocalFrame* frame) { std::string policy; 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 dc229b0..7784a51 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 @@ -48,6 +48,7 @@ class RenderViewObserverEfl: public content::RenderViewObserver { virtual ~RenderViewObserverEfl(); bool OnMessageReceived(const IPC::Message& message) override; + void OnDestruct() override; virtual void DidCreateDocumentElement(blink::WebLocalFrame* frame) override; virtual void DidChangePageScaleFactor() 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 a056bbe..f74aecc 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 @@ -7,12 +7,14 @@ #include "base/command_line.h" #include "base/files/file_util.h" +#include "base/memory/ptr_util.h" #include "base/strings/string_number_conversions.h" #include "base/threading/worker_pool.h" #include "base/threading/sequenced_worker_pool.h" #include "content/public/browser/cookie_store_factory.h" #include "content/public/common/content_switches.h" #include "content/public/common/url_constants.h" +#include "components/network_session_configurator/switches.h" #include "net/base/cache_type.h" #include "net/cert/cert_verifier.h" #include "net/dns/host_resolver.h" @@ -46,7 +48,7 @@ void InstallProtocolHandlers(net::URLRequestJobFactoryImpl* job_factory, it != protocol_handlers->end(); ++it) { bool set_protocol = job_factory->SetProtocolHandler( - it->first, make_scoped_ptr(it->second.release())); + it->first, base::WrapUnique(it->second.release())); DCHECK(set_protocol); } protocol_handlers->clear(); @@ -55,7 +57,7 @@ void InstallProtocolHandlers(net::URLRequestJobFactoryImpl* job_factory, } // namespace URLRequestContextGetterEfl::URLRequestContextGetterEfl( - scoped_ptr network_delegate, + std::unique_ptr network_delegate, bool ignore_certificate_errors, const base::FilePath& base_path, const scoped_refptr& io_task_runner, @@ -104,19 +106,19 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { new net::URLRequestContextStorage(url_request_context_.get())); storage_->set_cookie_store( CreateCookieStore(CookieStoreConfig())); - storage_->set_channel_id_service(make_scoped_ptr(new net::ChannelIDService( + storage_->set_channel_id_service(base::WrapUnique(new net::ChannelIDService( new net::DefaultChannelIDStore(NULL), base::WorkerPool::GetTaskRunner(true)))); storage_->set_http_user_agent_settings( - make_scoped_ptr(new HttpUserAgentSettingsEfl())); + base::WrapUnique(new HttpUserAgentSettingsEfl())); - scoped_ptr host_resolver( + std::unique_ptr host_resolver( net::HostResolver::CreateDefaultResolver( url_request_context_->net_log())); storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); storage_->set_transport_security_state( - make_scoped_ptr(new net::TransportSecurityState)); + base::WrapUnique(new net::TransportSecurityState)); // TODO(jam): use v8 if possible, look at chrome code. storage_->set_proxy_service( @@ -128,7 +130,7 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { storage_->set_http_auth_handler_factory( net::HttpAuthHandlerFactory::CreateDefault(host_resolver.get())); storage_->set_http_server_properties( - scoped_ptr( + std::unique_ptr( new net::HttpServerPropertiesImpl())); net::HttpCache::DefaultBackend* main_backend = NULL; @@ -181,7 +183,7 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { network_session_params.testing_fixed_https_port = value; } if (command_line.HasSwitch(switches::kHostResolverRules)) { - scoped_ptr mapped_host_resolver( + std::unique_ptr mapped_host_resolver( new net::MappedHostResolver(std::move(host_resolver))); mapped_host_resolver->SetRulesFromString( command_line.GetSwitchValueASCII(switches::kHostResolverRules)); @@ -197,39 +199,39 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { new net::HttpNetworkSession(network_session_params)); net::HttpCache* main_cache = new net::HttpCache( - http_network_session_.get(), make_scoped_ptr(main_backend), true); - storage_->set_http_transaction_factory(make_scoped_ptr(main_cache)); + http_network_session_.get(), base::WrapUnique(main_backend), true); + storage_->set_http_transaction_factory(base::WrapUnique(main_cache)); - scoped_ptr job_factory( + std::unique_ptr job_factory( new net::URLRequestJobFactoryImpl()); // Keep ProtocolHandlers added in sync with // ShellContentBrowserClient::IsHandledURL(). InstallProtocolHandlers(job_factory.get(), &protocol_handlers_); bool set_protocol = job_factory->SetProtocolHandler( - url::kDataScheme, make_scoped_ptr(new net::DataProtocolHandler)); + url::kDataScheme, base::WrapUnique(new net::DataProtocolHandler)); DCHECK(set_protocol); set_protocol = job_factory->SetProtocolHandler( url::kFileScheme, - make_scoped_ptr(new net::FileProtocolHandler( + base::WrapUnique(new net::FileProtocolHandler( BrowserThread::GetBlockingPool()-> GetTaskRunnerWithShutdownBehavior( base::SequencedWorkerPool::SKIP_ON_SHUTDOWN)))); DCHECK(set_protocol); // Set up interceptors in the reverse order. - scoped_ptr top_job_factory = + std::unique_ptr top_job_factory = std::move(job_factory); for (URLRequestInterceptorScopedVector::reverse_iterator i = request_interceptors_.rbegin(); i != request_interceptors_.rend(); ++i) { top_job_factory.reset(new net::URLRequestInterceptingJobFactory( - std::move(top_job_factory), make_scoped_ptr(*i))); + std::move(top_job_factory), base::WrapUnique(*i))); } request_interceptors_.weak_clear(); - storage_->set_job_factory(make_scoped_ptr(top_job_factory.release())); + storage_->set_job_factory(base::WrapUnique(top_job_factory.release())); } return url_request_context_.get(); @@ -297,7 +299,7 @@ void URLRequestContextGetterEfl::CreateSQLitePersistentCookieStore( // Set the new cookie store that will be used for all new requests. The old // cookie store, if any, will be automatically flushed and closed when no // longer referenced. - scoped_ptr cookie_monster( + std::unique_ptr cookie_monster( new net::CookieMonster(persistent_store.get(), NULL)); storage_->set_cookie_store(std::move(cookie_monster)); 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 16c42af..51fb201 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 @@ -6,7 +6,6 @@ #ifndef _URL_REQUEST_CONTEXT_GETTER_EFL_H_ #define _URL_REQUEST_CONTEXT_GETTER_EFL_H_ -#include "base/memory/scoped_ptr.h" #include "base/memory/weak_ptr.h" #include "content/public/browser/browser_context.h" #include "content/public/browser/browser_thread.h" @@ -27,7 +26,7 @@ namespace content { class URLRequestContextGetterEfl : public net::URLRequestContextGetter { public: - URLRequestContextGetterEfl(scoped_ptr network_delegate = scoped_ptr(), + URLRequestContextGetterEfl(std::unique_ptr network_delegate = std::unique_ptr(), bool ignore_certificate_errors = false, const base::FilePath& base_path = base::FilePath(), const scoped_refptr &io_task_runner = BrowserThread::GetMessageLoopProxyForThread(BrowserThread::IO), @@ -69,13 +68,13 @@ class URLRequestContextGetterEfl : public net::URLRequestContextGetter { net::NetLog* net_log_; base::FilePath cookie_store_path_; - scoped_ptr cookie_store_; + std::unique_ptr cookie_store_; - scoped_ptr http_network_session_; - scoped_ptr proxy_config_service_; - scoped_ptr network_delegate_; - scoped_ptr storage_; - scoped_ptr url_request_context_; + std::unique_ptr http_network_session_; + std::unique_ptr proxy_config_service_; + std::unique_ptr network_delegate_; + std::unique_ptr storage_; + std::unique_ptr url_request_context_; ProtocolHandlerMap protocol_handlers_; URLRequestInterceptorScopedVector request_interceptors_; base::WeakPtrFactory weak_ptr_factory_; 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 b798dd4..8260d3f 100644 --- a/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc @@ -244,14 +244,14 @@ void WebContentsDelegateEfl::RequestMediaAccessAllow( } else { callback.Run(MediaStreamDevices(), MEDIA_DEVICE_NOT_SUPPORTED, - scoped_ptr()); + std::unique_ptr()); } #else devices.push_back(MediaStreamDevice(request.video_type, "/dev/video0", "1")); #endif } - callback.Run(devices, MEDIA_DEVICE_OK,scoped_ptr()); + callback.Run(devices, MEDIA_DEVICE_OK,std::unique_ptr()); } void WebContentsDelegateEfl::RequestMediaAccessDeny( @@ -259,7 +259,7 @@ void WebContentsDelegateEfl::RequestMediaAccessDeny( const MediaResponseCallback& callback) { LOG(ERROR) << __FUNCTION__ << " Decline request with empty list"; callback.Run(MediaStreamDevices(), MEDIA_DEVICE_NOT_SUPPORTED, - scoped_ptr()); + std::unique_ptr()); } bool WebContentsDelegateEfl::CheckMediaAccessPermission( @@ -273,7 +273,7 @@ void WebContentsDelegateEfl::RequestMediaAccessPermission( WebContents* web_contents, const MediaStreamRequest& request, const MediaResponseCallback& callback) { - scoped_ptr<_Ewk_User_Media_Permission_Request> media_permission_request( + std::unique_ptr<_Ewk_User_Media_Permission_Request> media_permission_request( new _Ewk_User_Media_Permission_Request(this, request, callback)); Eina_Bool callback_result = EINA_FALSE; @@ -289,7 +289,7 @@ void WebContentsDelegateEfl::RequestMediaAccessPermission( ignore_result(media_permission_request.release()); else if (!media_permission_request->IsDecided()) { callback.Run(MediaStreamDevices(), MEDIA_DEVICE_NOT_SUPPORTED, - scoped_ptr()); + std::unique_ptr()); } } #endif @@ -493,7 +493,7 @@ void WebContentsDelegateEfl::DidFailLoad(RenderFrameHost* render_frame_host, } void WebContentsDelegateEfl::OnWrtPluginMessage(const Ewk_Wrt_Message_Data& data) { - scoped_ptr p(new Ewk_Wrt_Message_Data); + std::unique_ptr p(new Ewk_Wrt_Message_Data); p->type = data.type; p->value = data.value; p->id = data.id; @@ -533,7 +533,9 @@ void WebContentsDelegateEfl::OnPrintedMetafileReceived(const DidPrintPagesParams NOTREACHED() << "couldn't map"; return; } - scoped_ptr metafile(new printing::PdfMetafileSkia); + + std::unique_ptr metafile + (new printing::PdfMetafileSkia(printing::PDF_SKIA_DOCUMENT_TYPE)); if (!metafile->InitFromData(shared_buf.memory(), params.data_size)) { NOTREACHED() << "Invalid metafile header"; return; @@ -564,7 +566,7 @@ bool WebContentsDelegateEfl::AddMessageToConsole(WebContents* source, const string16& message, int32_t line_no, const string16& source_id) { - scoped_ptr<_Ewk_Console_Message> console_message(new _Ewk_Console_Message(level, + std::unique_ptr<_Ewk_Console_Message> console_message(new _Ewk_Console_Message(level, UTF16ToUTF8(message).c_str(), line_no, UTF16ToUTF8(source_id).c_str())); @@ -572,7 +574,7 @@ bool WebContentsDelegateEfl::AddMessageToConsole(WebContents* source, return true; } -void WebContentsDelegateEfl::RunFileChooser(WebContents* web_contents, const FileChooserParams& params) { +void WebContentsDelegateEfl::RunFileChooser(RenderFrameHost* render_frame_host, const FileChooserParams& params) { web_view_->ShowFileChooser(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 529fb6b..59815d8 100644 --- a/tizen_src/ewk/efl_integration/web_contents_delegate_efl.h +++ b/tizen_src/ewk/efl_integration/web_contents_delegate_efl.h @@ -7,7 +7,6 @@ #include -#include "base/memory/scoped_ptr.h" #include "content/public/browser/browser_context.h" #include "browser/javascript_dialog_manager_efl.h" #include "browser_context_efl.h" @@ -152,7 +151,7 @@ class WebContentsDelegateEfl const base::string16& message, int32_t line_no, const base::string16& source_id) override; - void RunFileChooser(WebContents* web_contents, + void RunFileChooser(content::RenderFrameHost* render_frame_host, const FileChooserParams& params) override; ColorChooser* OpenColorChooser(WebContents* web_contents, SkColor color, const std::vector& suggestions) override; @@ -203,12 +202,12 @@ class WebContentsDelegateEfl Ewk_CSP_Header_Type header_type; }; - scoped_ptr pending_content_security_policy_; + std::unique_ptr pending_content_security_policy_; bool document_created_; JavaScriptDialogManagerEfl* dialog_manager_; - scoped_ptr favicon_downloader_; + std::unique_ptr favicon_downloader_; base::WeakPtrFactory weak_ptr_factory_; - scoped_ptr<_Ewk_Certificate_Policy_Decision> certificate_policy_decision_; + std::unique_ptr<_Ewk_Certificate_Policy_Decision> certificate_policy_decision_; DISALLOW_COPY_AND_ASSIGN(WebContentsDelegateEfl); }; diff --git a/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.cc b/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.cc index eef97e6..b5ce1a4 100644 --- a/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.cc +++ b/tizen_src/ewk/efl_integration/web_contents_efl_delegate_ewk.cc @@ -14,7 +14,7 @@ bool WebContentsEflDelegateEwk::ShouldCreateWebContentsAsync( content::WebContentsEflDelegate::NewWindowDecideCallback callback, const GURL& target_url) { // this method is called ONLY when creating new window - no matter what type - scoped_ptr<_Ewk_Policy_Decision> pd( + std::unique_ptr<_Ewk_Policy_Decision> pd( new _Ewk_Policy_Decision(web_view_, callback)); pd->ParseUrl(target_url); web_view_->SmartCallback().call(pd.get()); diff --git a/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.cc b/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.cc index af0d103..553e8b0 100644 --- a/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.cc +++ b/tizen_src/ewk/efl_integration/wrt/wrt_widget_host.cc @@ -18,7 +18,7 @@ namespace { // TODO(z.kostrzewa) I would prefer not make it a singleton, check out // if it can't be a member of ContentMainDelegateEfl (but keep the static // getter, maybe?). -base::LazyInstance > g_wrt_widget_host = +base::LazyInstance > g_wrt_widget_host = LAZY_INSTANCE_INITIALIZER; bool SendToAllRenderers(IPC::Message* message) { diff --git a/tizen_src/ewk/efl_integration/wrt/wrtwidget.cc b/tizen_src/ewk/efl_integration/wrt/wrtwidget.cc index 9e67252..34f2e2a 100644 --- a/tizen_src/ewk/efl_integration/wrt/wrtwidget.cc +++ b/tizen_src/ewk/efl_integration/wrt/wrtwidget.cc @@ -12,7 +12,7 @@ // TODO(z.kostrzewa) Why it can't be implemented as IPC::ChannelProxy::MessageFilter (?) // Tried that and it seems that Observer starts receiving messages earlier than // MessageFilter what is crucial for message that sets widget handle -class WrtRenderThreadObserver : public content::RenderProcessObserver { +class WrtRenderThreadObserver : public content::RenderThreadObserver { public: explicit WrtRenderThreadObserver(WrtWidget* wrt_widget) : wrt_widget_(wrt_widget), @@ -55,7 +55,7 @@ WrtWidget::~WrtWidget() { delete observer_; } -content::RenderProcessObserver* WrtWidget::GetObserver() { +content::RenderThreadObserver* WrtWidget::GetObserver() { return observer_; } diff --git a/tizen_src/ewk/efl_integration/wrt/wrtwidget.h b/tizen_src/ewk/efl_integration/wrt/wrtwidget.h index e64abbd0..0caf364 100644 --- a/tizen_src/ewk/efl_integration/wrt/wrtwidget.h +++ b/tizen_src/ewk/efl_integration/wrt/wrtwidget.h @@ -7,7 +7,7 @@ #include -#include "content/public/renderer/render_process_observer.h" +#include "content/public/renderer/render_thread_observer.h" #include "url/gurl.h" #include "v8/include/v8.h" @@ -21,7 +21,7 @@ class WrtWidget { WrtWidget(); ~WrtWidget(); - content::RenderProcessObserver* GetObserver(); + content::RenderThreadObserver* GetObserver(); void SetWidgetInfo(const std::string& tizen_id, double scaleFactor, diff --git a/tizen_src/ewk/efl_webview_app/chromium-efl.xml b/tizen_src/ewk/efl_webview_app/chromium-efl.xml index 1ad8c0a..bb8afce 100644 --- a/tizen_src/ewk/efl_webview_app/chromium-efl.xml +++ b/tizen_src/ewk/efl_webview_app/chromium-efl.xml @@ -1,5 +1,5 @@ - + SWC mini browser application based on chromium-efl diff --git a/tizen_src/ewk/efl_webview_app/chromium-efl_v3.0.xml b/tizen_src/ewk/efl_webview_app/chromium-efl_v3.0.xml index 842aeb0..5036b0a 100644 --- a/tizen_src/ewk/efl_webview_app/chromium-efl_v3.0.xml +++ b/tizen_src/ewk/efl_webview_app/chromium-efl_v3.0.xml @@ -1,5 +1,5 @@ - + SWC mini browser application based on chromium-efl diff --git a/tizen_src/ewk/efl_webview_app/ubrowser.xml b/tizen_src/ewk/efl_webview_app/ubrowser.xml index 0003173..9bf7602 100644 --- a/tizen_src/ewk/efl_webview_app/ubrowser.xml +++ b/tizen_src/ewk/efl_webview_app/ubrowser.xml @@ -1,5 +1,5 @@ - micro browser application for chromium-efl package SWC micro browser application based on chromium-efl diff --git a/tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml b/tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml index 8961a68..4d674f3 100644 --- a/tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml +++ b/tizen_src/ewk/efl_webview_app/ubrowser_v3.0.xml @@ -1,5 +1,5 @@ - + SWC micro browser application based on chromium-efl diff --git a/tizen_src/ewk/ubrowser/ubrowser.xml b/tizen_src/ewk/ubrowser/ubrowser.xml index 66435d9..c8f2ad4 100644 --- a/tizen_src/ewk/ubrowser/ubrowser.xml +++ b/tizen_src/ewk/ubrowser/ubrowser.xml @@ -1,5 +1,5 @@ - + SRPOL Small reference browser application for chromium-efl port diff --git a/tizen_src/ewk/unittest/ewk-tests.gypi b/tizen_src/ewk/unittest/ewk-tests.gypi index 30b5406..e154ed9 100644 --- a/tizen_src/ewk/unittest/ewk-tests.gypi +++ b/tizen_src/ewk/unittest/ewk-tests.gypi @@ -394,7 +394,7 @@ 'resources/ewk_context/injected_bundle/chromium/bundle_sample.cc', ], 'dependencies': [ - '<(DEPTH)/v8/tools/gyp/v8.gyp:v8', + '<(DEPTH)/v8/src/v8.gyp:v8', ], 'include_dirs': [ '.', diff --git a/tizen_src/packaging/chromium-efl-libs.spec b/tizen_src/packaging/chromium-efl-libs.spec index c65cb52..0390e94 100644 --- a/tizen_src/packaging/chromium-efl-libs.spec +++ b/tizen_src/packaging/chromium-efl-libs.spec @@ -5,8 +5,8 @@ %define _binary_payload w3.gzdio Name: chromium-efl-libs -%define ChromiumVersion 51.2704.0 -%define Week 17 +%define ChromiumVersion 53.2785.0 +%define Week 36 Version: %{ChromiumVersion}.%{Week} Release: 1 Summary: Chromium-based app runtime, private libraries diff --git a/tizen_src/packaging/chromium-efl.spec b/tizen_src/packaging/chromium-efl.spec index 33f5fe1..fba1bb8 100644 --- a/tizen_src/packaging/chromium-efl.spec +++ b/tizen_src/packaging/chromium-efl.spec @@ -1,8 +1,8 @@ Name: chromium-efl Summary: Chromium EFL # Set by by scripts/update-chromium-version.sh -%define ChromiumVersion 51.2704.0 -%define Week 17 +%define ChromiumVersion 53.2785.0 +%define Week 36 Version: %{ChromiumVersion}.%{Week} Release: 1 # The 'Group' should be specified as one of the following valid group list. @@ -94,7 +94,6 @@ BuildRequires: pkgconfig(icu-i18n) BuildRequires: pkgconfig(libdrm) BuildRequires: pkgconfig(libexif) BuildRequires: pkgconfig(libffi) -BuildRequires: pkgconfig(libpci) BuildRequires: pkgconfig(libpng) BuildRequires: pkgconfig(libpulse) BuildRequires: pkgconfig(libtbm) @@ -244,14 +243,6 @@ Requires: %{name} = %{version}-%{release} Chromium EFL unit test utilities %endif -%if 0%{?build_chromedriver} -%package -n chromedriver -Summary: Selenium WebDriver for t-browser -Group: Development/Libraries -%description -n chromedriver -Selenium WebDriver for t-browser -%endif - # The macros '%TZ_' are valid from tizen v3.0 %if "%{chromium_efl_tizen_version}" >= "3.0" %define _manifestdir %TZ_SYS_RW_PACKAGES @@ -383,9 +374,6 @@ tizen_src/build/prebuild/ninja %{_smp_mflags} -C"%{OUTPUT_FOLDER}" \ %if 0%{?build_ewk_unittests} ewk_unittests \ %endif -%if 0%{?build_chromedriver} - chromedriver \ -%endif %if 0%{?build_xwalk} xwalk xwalk_application_tools \ %endif @@ -454,9 +442,6 @@ install -d "%{buildroot}"%{_includedir}/v8 install -d "%{buildroot}%{CHROMIUM_EXE_DIR}" install -d "%{buildroot}%{CHROMIUM_EXE_DIR}/locales" install -d "%{buildroot}%{CHROMIUM_DATA_DIR}"/themes -%if 0%{?build_chromedriver} -install -d "%{buildroot}"/usr/apps/com.samsung.chromedriver/bin -%endif cp -r "%{OUTPUT_FOLDER}/locale" "%{buildroot}/%{CHROMIUM_LOCALE_DIR}" @@ -502,11 +487,6 @@ install -m 0644 "%{OUTPUT_FOLDER}"/pkgconfig/*.pc "%{buildroot}"%{_libdir}/pk install -m 0644 tizen_src/ewk/efl_integration/public/*.h "%{buildroot}"%{_includedir}/chromium-ewk/ install -m 0644 v8/include/*.h "%{buildroot}"%{_includedir}/v8/ -%if 0%{?build_chromedriver} -install -m 0755 "%{OUTPUT_FOLDER}"/chromedriver "%{buildroot}"/usr/apps/com.samsung.chromedriver/bin -install -m 0755 tizen_src/scripts/start-chrome-driver.sh "%{buildroot}"/%{_bindir} -%endif - %if 0%{?_enable_content_shell} install -m 0755 "%{OUTPUT_FOLDER}"/content_shell "%{buildroot}%{CHROMIUM_EXE_DIR}"/content_shell sed 's#@binary@#%{CHROMIUM_EXE_DIR}/content_shell#' %{SOURCE1} > "%{buildroot}"%{_bindir}/content_shell @@ -632,12 +612,6 @@ mkdir -p %{_manifestdir} /opt/usr/resources/* %endif -%if 0%{?build_chromedriver} -%files -n chromedriver -/usr/bin/start-chrome-driver.sh -/usr/apps/com.samsung.chromedriver -%endif - %if 0%{?build_xwalk} %files -n crosswalk %manifest %{XWALK_GEN}/crosswalk.manifest diff --git a/tizen_src/packaging/crosswalk-bin.spec b/tizen_src/packaging/crosswalk-bin.spec index ae5f73b..a29d001 100644 --- a/tizen_src/packaging/crosswalk-bin.spec +++ b/tizen_src/packaging/crosswalk-bin.spec @@ -5,7 +5,7 @@ %define _binary_payload w3.gzdio Name: crosswalk-bin -Version: 15.51.2704.0 +Version: 15.53.2785.0 Release: 0 Summary: Chromium-based app runtime License: (BSD-3-Clause and LGPL-2.1+) diff --git a/tizen_src/packaging/manifest.xml b/tizen_src/packaging/manifest.xml index b831293..8d2db07 100644 --- a/tizen_src/packaging/manifest.xml +++ b/tizen_src/packaging/manifest.xml @@ -1,7 +1,7 @@ kmcele1k1p - 51.2704.0.17 + 53.2785.0.36 C++App diff --git a/tizen_src/scripts/start-chrome-driver.sh b/tizen_src/scripts/start-chrome-driver.sh deleted file mode 100644 index ba364ea..0000000 --- a/tizen_src/scripts/start-chrome-driver.sh +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/bash - -echo "Starting chromedriver for chromium M42 for Tizen 3.0" - -/usr/apps/com.samsung.chromedriver/bin/chromedriver --whitelisted-ips diff --git a/tizen_src/supplement.gypi b/tizen_src/supplement.gypi index d7aca67..a3f86d3 100644 --- a/tizen_src/supplement.gypi +++ b/tizen_src/supplement.gypi @@ -9,13 +9,20 @@ { 'variables': { 'variables': { - 'use_gstreamer_fft': 1, + # [M53_2785] Temporary disabling the 'use_gstreamer_fft' flag for switching + # to new chromium + # It will be fixed by multimedia team + # FIXME: + 'use_gstreamer_fft': 0, }, 'use_aura%': 0, 'use_efl%' : 1, 'use_default_render_theme%': 1, + # Whether or not we use external popup menu. + 'use_external_popup_menu%': 1, + 'ewk_bringup%': 1, 'wayland_bringup%': 0, -- 2.7.4 From cf373dc35881235cb2c645802e9697a3929b6fb5 Mon Sep 17 00:00:00 2001 From: Suchit Agrawal Date: Thu, 22 Sep 2016 04:24:37 +0000 Subject: [PATCH 03/16] Added TM1 mirror server profile and updated mirror server ip address. Changed mirror server IP from 10.113.63.117 to 165.213.149.200. Added TM1 mirror server profile in gbs.conf file. Change-Id: I6f5ec74bf9d4b1eb65e6609faa07fe02aff5b39c Signed-off-by: Suchit Agrawal --- tizen_src/build/gbs.conf | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/tizen_src/build/gbs.conf b/tizen_src/build/gbs.conf index aa38f68..9954f49 100755 --- a/tizen_src/build/gbs.conf +++ b/tizen_src/build/gbs.conf @@ -133,10 +133,10 @@ repos = repo.public_3.0_base_arm_mirror, repo.tztv_v3.0_arm-wayland_mirror buildroot = ~/GBS-ROOT-3.0-TV-ARM-WAYLAND [repo.public_3.0_base_arm_mirror] -url = http://10.113.63.117/snapshots/base/latest/repos/arm/packages/ +url = http://165.213.149.200/download/public_mirror/tizen/base/latest/repos/arm/packages/ [repo.tztv_v3.0_arm-wayland_mirror] -url = http://10.113.63.117/snapshots/tv/latest/repos/arm-wayland/packages/ +url = http://165.213.149.200/download/public_mirror/tizen/tv/latest/repos/arm-wayland/packages/ ############################################### # @@ -178,10 +178,10 @@ repos = repo.public_3.0_base_arm_mirror, repo.tzmb_v3.0_arm-wayland_mirror buildroot = ~/GBS-ROOT-3.0-MOBILE-ARM-WAYLAND [repo.public_3.0_base_arm_mirror] -url = http://10.113.63.117/snapshots/base/latest/repos/arm/packages/ +url = http://165.213.149.200/download/public_mirror/tizen/base/latest/repos/arm/packages/ [repo.tzmb_v3.0_arm-wayland_mirror] -url = http://10.113.63.117/snapshots/mobile/latest/repos/arm-wayland/packages/ +url = http://165.213.149.200/download/public_mirror/tizen/mobile/latest/repos/arm-wayland/packages/ ############################################### # @@ -208,10 +208,10 @@ repos = repo.public_3.0_base_arm64_mirror, repo.tzmb_v3.0_arm64-wayland_mirror buildroot = ~/GBS-ROOT-3.0-MOBILE-ARM64-WAYLAND [repo.public_3.0_base_arm64_mirror] -url = http://10.113.63.117/snapshots/base/latest/repos/arm64/packages/ +url = http://165.213.149.200/download/public_mirror/tizen/base/latest/repos/arm64/packages/ [repo.tzmb_v3.0_arm64-wayland_mirror] -url = http://10.113.63.117/snapshots/mobile/latest/repos/arm64-wayland/packages/ +url = http://165.213.149.200/download/public_mirror/tizen/mobile/latest/repos/arm64-wayland/packages/ ############################################### # @@ -242,3 +242,22 @@ url = http://download.tizen.org/snapshots/tizen/base/latest/repos/arm/packages/ [repo.tzmb_v3.0_TM1] url = http://download.tizen.org/snapshots/tizen/mobile/latest/repos/target-TM1/packages/ + +############################################### +# +# Tizen v3.0 for mobile (armv7l-wayland TM1), Mirroring Server for HQ developers +# +[profile.tzmb_v3.0_TM1_mirror] +obs = obs.tizen_v3.0 +repos = repo.public_3.0_base_arm_mirror, repo.tzmb_v3.0_TM1_mirror +buildroot = ~/GBS-ROOT-3.0-MOBILE-TM1 + +[repo.public_3.0_base_arm_mirror] +url = http://165.213.149.200/download/public_mirror/tizen/base/latest/repos/arm/packages/ +user = blinkbot +passwdx = QlpoOTFBWSZTWd0JOhUAAACBAABgIAAhAIIjF3JFOFCQ3Qk6FQ== + +[repo.tzmb_v3.0_TM1_mirror] +url = http://165.213.149.200/download/public_mirror/tizen/mobile/latest/repos/target-TM1/packages/ +user = blinkbot +passwdx = QlpoOTFBWSZTWd0JOhUAAACBAABgIAAhAIIjF3JFOFCQ3Qk6FQ== -- 2.7.4 From 666e75994cc0fc36c5e05ea7f10c65847bbb4712 Mon Sep 17 00:00:00 2001 From: Youngcheol Kang Date: Thu, 22 Sep 2016 19:17:20 +0900 Subject: [PATCH 04/16] fixup! Added TM1 mirror server profile and updated mirror server ip address. For connecting the mirror server, we need to authorization about that. This patch adds the authorization information in gbs.conf file. Change-Id: I8c7b2aa982f4ecadfeaaeaaaf029c356b0aafa43 Signed-off-by: Youngcheol Kang --- tizen_src/build/gbs.conf | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/tizen_src/build/gbs.conf b/tizen_src/build/gbs.conf index 9954f49..fbeb934 100755 --- a/tizen_src/build/gbs.conf +++ b/tizen_src/build/gbs.conf @@ -134,9 +134,13 @@ buildroot = ~/GBS-ROOT-3.0-TV-ARM-WAYLAND [repo.public_3.0_base_arm_mirror] url = http://165.213.149.200/download/public_mirror/tizen/base/latest/repos/arm/packages/ +user = blinkbot +passwdx = QlpoOTFBWSZTWd0JOhUAAACBAABgIAAhAIIjF3JFOFCQ3Qk6FQ== [repo.tztv_v3.0_arm-wayland_mirror] url = http://165.213.149.200/download/public_mirror/tizen/tv/latest/repos/arm-wayland/packages/ +user = blinkbot +passwdx = QlpoOTFBWSZTWd0JOhUAAACBAABgIAAhAIIjF3JFOFCQ3Qk6FQ== ############################################### # @@ -179,9 +183,13 @@ buildroot = ~/GBS-ROOT-3.0-MOBILE-ARM-WAYLAND [repo.public_3.0_base_arm_mirror] url = http://165.213.149.200/download/public_mirror/tizen/base/latest/repos/arm/packages/ +user = blinkbot +passwdx = QlpoOTFBWSZTWd0JOhUAAACBAABgIAAhAIIjF3JFOFCQ3Qk6FQ== [repo.tzmb_v3.0_arm-wayland_mirror] url = http://165.213.149.200/download/public_mirror/tizen/mobile/latest/repos/arm-wayland/packages/ +user = blinkbot +passwdx = QlpoOTFBWSZTWd0JOhUAAACBAABgIAAhAIIjF3JFOFCQ3Qk6FQ== ############################################### # @@ -209,9 +217,13 @@ buildroot = ~/GBS-ROOT-3.0-MOBILE-ARM64-WAYLAND [repo.public_3.0_base_arm64_mirror] url = http://165.213.149.200/download/public_mirror/tizen/base/latest/repos/arm64/packages/ +user = blinkbot +passwdx = QlpoOTFBWSZTWd0JOhUAAACBAABgIAAhAIIjF3JFOFCQ3Qk6FQ== [repo.tzmb_v3.0_arm64-wayland_mirror] url = http://165.213.149.200/download/public_mirror/tizen/mobile/latest/repos/arm64-wayland/packages/ +user = blinkbot +passwdx = QlpoOTFBWSZTWd0JOhUAAACBAABgIAAhAIIjF3JFOFCQ3Qk6FQ== ############################################### # -- 2.7.4 From 740d0e27362280f349b2428583cb498a36295a77 Mon Sep 17 00:00:00 2001 From: "yh106.jung" Date: Tue, 27 Sep 2016 14:28:03 +0900 Subject: [PATCH 05/16] Move the function, FilesSelectedInChooser, from RVH to RFH FilesSelectedInChooser is moved from RenderViewHost to RenderFrameHost by upstream codes. So this patch updates about it for EWK side. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2072 Reviewed by: g.czajkowski, sns.park Change-Id: Icf6481e2fc08e09f59d56b668df807a9b66157d4 Signed-off-by: yh106.jung --- tizen_src/ewk/efl_integration/eweb_view.cc | 8 +++----- tizen_src/ewk/efl_integration/eweb_view.h | 4 +++- .../ewk/efl_integration/file_chooser_controller_efl.cc | 14 ++++---------- .../ewk/efl_integration/file_chooser_controller_efl.h | 18 +++++++++--------- .../ewk/efl_integration/web_contents_delegate_efl.cc | 2 +- 5 files changed, 20 insertions(+), 26 deletions(-) diff --git a/tizen_src/ewk/efl_integration/eweb_view.cc b/tizen_src/ewk/efl_integration/eweb_view.cc index ebfd5cf..3edb475 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.cc +++ b/tizen_src/ewk/efl_integration/eweb_view.cc @@ -1813,10 +1813,8 @@ bool EWebView::IsDragging() const { return GetWebContentsViewEfl()->IsDragging(); } -void EWebView::ShowFileChooser(const content::FileChooserParams& params) { - RenderViewHost* render_view_host = web_contents_->GetRenderViewHost(); - if (!render_view_host) - return; +void EWebView::ShowFileChooser(content::RenderFrameHost* render_frame_host, + const content::FileChooserParams& params) { #if defined(OS_TIZEN_MOBILE) #if !defined(EWK_BRINGUP) if (params.capture) { @@ -1834,7 +1832,7 @@ void EWebView::ShowFileChooser(const content::FileChooserParams& params) { } #endif #endif - file_chooser_.reset(new content::FileChooserControllerEfl(render_view_host, ¶ms)); + file_chooser_.reset(new content::FileChooserControllerEfl(render_frame_host, ¶ms)); file_chooser_->Open(); } diff --git a/tizen_src/ewk/efl_integration/eweb_view.h b/tizen_src/ewk/efl_integration/eweb_view.h index 5e8ea90..f39e908 100644 --- a/tizen_src/ewk/efl_integration/eweb_view.h +++ b/tizen_src/ewk/efl_integration/eweb_view.h @@ -54,6 +54,7 @@ #include "web_contents_delegate_efl.h" namespace content { +class RenderFrameHost; class RenderViewHost; class RenderWidgetHostViewEfl; class WebContentsDelegateEfl; @@ -367,7 +368,8 @@ class EWebView { void SetDrawsTransparentBackground(bool enabled); void GetSessionData(const char **data, unsigned *length) const; bool RestoreFromSessionData(const char *data, unsigned length); - void ShowFileChooser(const content::FileChooserParams&); + void ShowFileChooser(content::RenderFrameHost* render_frame_host, + const content::FileChooserParams&); void SetBrowserFont(); void SetCertificatePem(const std::string& certificate); bool IsDragging() const; diff --git a/tizen_src/ewk/efl_integration/file_chooser_controller_efl.cc b/tizen_src/ewk/efl_integration/file_chooser_controller_efl.cc index 62bdf80..5f4d6a6 100644 --- a/tizen_src/ewk/efl_integration/file_chooser_controller_efl.cc +++ b/tizen_src/ewk/efl_integration/file_chooser_controller_efl.cc @@ -3,7 +3,7 @@ // found in the LICENSE file. #include "content/common/view_messages.h" -#include "content/public/browser/render_view_host.h" +#include "content/public/browser/render_frame_host.h" #include "content/public/common/file_chooser_file_info.h" #include "file_chooser_controller_efl.h" #include @@ -16,9 +16,9 @@ namespace content { static void _fs_done(void* data, Evas_Object* obj, void* event_info) { FileChooserControllerEfl* inst = static_cast(data); - RenderViewHost* render_view_host = inst->GetRenderViewHost(); + RenderFrameHost* render_frame_host = inst->GetRenderFrameHost(); - if (!render_view_host) + if (!render_frame_host) return; std::vector files; @@ -33,13 +33,7 @@ static void _fs_done(void* data, Evas_Object* obj, void* event_info) { } } -#if !defined(EWK_BRINGUP) -// [M53_2785] The FilesSelectedInChooser function moved to RenderFrameHost from -// RenderViewHost. -// It will be fixed by webcore team. -// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2072 - render_view_host->FilesSelectedInChooser(files, inst->GetParams()->mode); -#endif // EWK_BRINGUP + render_frame_host->FilesSelectedInChooser(files, inst->GetParams()->mode); evas_object_del(elm_object_top_widget_get(obj)); } 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 39caa02..02bffdb 100644 --- a/tizen_src/ewk/efl_integration/file_chooser_controller_efl.h +++ b/tizen_src/ewk/efl_integration/file_chooser_controller_efl.h @@ -10,7 +10,7 @@ namespace content { -class RenderViewHost; +class RenderFrameHost; #define DEF_TITLE_OPEN "Open"; #define DEF_TITLE_SAVE "Save"; @@ -18,13 +18,13 @@ class RenderViewHost; class FileChooserControllerEfl { public: - FileChooserControllerEfl() : render_view_host_(NULL), params_(NULL) { + FileChooserControllerEfl() : render_frame_host_(nullptr), params_(nullptr) { ParseParams(); } - FileChooserControllerEfl(RenderViewHost* render_view_host, + FileChooserControllerEfl(RenderFrameHost* render_frame_host, const content::FileChooserParams* params) - : render_view_host_(render_view_host), params_(params) { + : render_frame_host_(render_frame_host), params_(params) { ParseParams(); } ~FileChooserControllerEfl() { } @@ -39,18 +39,18 @@ class FileChooserControllerEfl { params_ = params; } - RenderViewHost* GetRenderViewHost() { - return render_view_host_; + RenderFrameHost* GetRenderFrameHost() { + return render_frame_host_; } - void SetRenderViewHost(RenderViewHost* render_view_host) { - render_view_host_ = render_view_host; + void SetRenderFrameHost(RenderFrameHost* render_frame_host) { + render_frame_host_ = render_frame_host; } private: void ParseParams(); - RenderViewHost* render_view_host_; + RenderFrameHost* render_frame_host_; const content::FileChooserParams* params_; std::string title_; std::string def_file_name_; 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 8260d3f..9f84ea9 100644 --- a/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc +++ b/tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc @@ -575,7 +575,7 @@ bool WebContentsDelegateEfl::AddMessageToConsole(WebContents* source, } void WebContentsDelegateEfl::RunFileChooser(RenderFrameHost* render_frame_host, const FileChooserParams& params) { - web_view_->ShowFileChooser(params); + web_view_->ShowFileChooser(render_frame_host, params); } content::ColorChooser* WebContentsDelegateEfl::OpenColorChooser( -- 2.7.4 From d71de83359b1bed8f5def031e2edc91bca4b6411 Mon Sep 17 00:00:00 2001 From: "yh106.jung" Date: Tue, 27 Sep 2016 11:22:20 +0900 Subject: [PATCH 06/16] Remove aw_pref_store.h|cc from build sources |InMemoryPrefStore| is being used as simple preference store instead of |AwPrefStore|. So we can remove aw_pref_store.h|cc from build sources. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2071 Reviewed by: g.czajkowski, sns.park Change-Id: I813dce7678feeb3d8e859549b595b5d1ea3d3edb Signed-off-by: yh106.jung --- tizen_src/ewk/efl_integration/efl_integration.gypi | 6 ------ 1 file changed, 6 deletions(-) diff --git a/tizen_src/ewk/efl_integration/efl_integration.gypi b/tizen_src/ewk/efl_integration/efl_integration.gypi index f55c2a2..db6cb5a 100644 --- a/tizen_src/ewk/efl_integration/efl_integration.gypi +++ b/tizen_src/ewk/efl_integration/efl_integration.gypi @@ -282,12 +282,6 @@ 'browser/web_view_browser_message_filter.cc', 'browser/web_view_browser_message_filter.h', -# [M53_2785] The AwPrefStore class was removed in m53. -# It will be fixed by webview team. -# FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2071 -# # Make use of Android webview's simplified pref class. -# '<(DEPTH)/android_webview/browser/aw_pref_store.h', -# '<(DEPTH)/android_webview/browser/aw_pref_store.cc', 'browser/autofill/autofill_client_efl.h', 'browser/autofill/autofill_client_efl.cc', 'browser/autofill/personal_data_manager_factory.cc', -- 2.7.4 From 17e457a7ba3ea88d34477a458b60700a352fa596 Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Fri, 21 Oct 2016 18:56:44 +0530 Subject: [PATCH 07/16] Fix for browser crash on loading HTTPS sites CTVerifier and CTPolicyEnforcer were not set for URLRequestContext. This resulted in failure of CHECKs in SSLClientSocketImpl ctor. Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2310 Reviewed by: g.czajkowski, sns.park Change-Id: I21498162e2c34a0cc1c5aeb0c1771b0185bb189d Signed-off-by: Chandan Padhi --- .../ewk/efl_integration/url_request_context_getter_efl.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) 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 f74aecc..4b4dae1 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 @@ -17,6 +17,8 @@ #include "components/network_session_configurator/switches.h" #include "net/base/cache_type.h" #include "net/cert/cert_verifier.h" +#include "net/cert/ct_policy_enforcer.h" +#include "net/cert/multi_log_ct_verifier.h" #include "net/dns/host_resolver.h" #include "net/dns/mapped_host_resolver.h" #include "net/extras/sqlite/sqlite_persistent_cookie_store.h" @@ -119,6 +121,10 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); storage_->set_transport_security_state( base::WrapUnique(new net::TransportSecurityState)); + storage_->set_cert_transparency_verifier( + base::WrapUnique(new net::MultiLogCTVerifier)); + storage_->set_ct_policy_enforcer( + base::WrapUnique(new net::CTPolicyEnforcer)); // TODO(jam): use v8 if possible, look at chrome code. storage_->set_proxy_service( @@ -156,6 +162,10 @@ net::URLRequestContext* URLRequestContextGetterEfl::GetURLRequestContext() { url_request_context_->cert_verifier(); network_session_params.transport_security_state = url_request_context_->transport_security_state(); + network_session_params.cert_transparency_verifier = + url_request_context_->cert_transparency_verifier(); + network_session_params.ct_policy_enforcer = + url_request_context_->ct_policy_enforcer(); network_session_params.channel_id_service = url_request_context_->channel_id_service(); network_session_params.proxy_service = -- 2.7.4 From e5f654bf44d758465eb64ea5ae40f307a2080ba0 Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Thu, 22 Sep 2016 14:55:17 +0530 Subject: [PATCH 08/16] Remove temporary patch for gpu_control_list.cc std::find() in gpu_control_list.cc caused build errors for mobile and tv profiles. This temporary patch was added to avoid the build error. The build error has been fixed in [1]. [1] http://165.213.202.130/gerrit/#/c/139091 Bug: http://suprem.sec.samsung.net/jira/browse/TWF-2058 Reviewed by: dhyuna.ko, mohan.reddy, sm.venugopal, sns.park Change-Id: I531a62ba3c2caab984ab6964ef3186927ff79799 Signed-off-by: Chandan Padhi --- .../patches/hotfix_m53_2785_gpu_control_list.diff | 34 ---------------------- 1 file changed, 34 deletions(-) delete mode 100644 tizen_src/build/patches/hotfix_m53_2785_gpu_control_list.diff diff --git a/tizen_src/build/patches/hotfix_m53_2785_gpu_control_list.diff b/tizen_src/build/patches/hotfix_m53_2785_gpu_control_list.diff deleted file mode 100644 index 0ea0fc0..0000000 --- a/tizen_src/build/patches/hotfix_m53_2785_gpu_control_list.diff +++ /dev/null @@ -1,34 +0,0 @@ -diff --git a/gpu/config/gpu_control_list.cc b/gpu/config/gpu_control_list.cc -index 5561d32..7524e98 100644 ---- a/gpu/config/gpu_control_list.cc -+++ b/gpu/config/gpu_control_list.cc -@@ -1034,8 +1034,14 @@ bool GpuControlList::GpuControlListEntry::SetFeatures( - if (supports_feature_type_all && feature_strings[i] == "all") { - for (FeatureMap::const_iterator iter = feature_map.begin(); - iter != feature_map.end(); ++iter) { -+#if !defined(EWK_BRINGUP) -+// [M53_2785] Temporary disabling the codes for swiching to new chromium -+// The codes makes a build problem in mobile and tv target. -+// It will be fixed by rendering team. -+// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2058 - if (std::find(exception_strings.begin(), exception_strings.end(), - iter->first) == exception_strings.end()) -+#endif // EWK_BRINGUP - features_.insert(iter->second); - } - continue; -@@ -1044,8 +1050,14 @@ bool GpuControlList::GpuControlListEntry::SetFeatures( - features_.clear(); - return false; - } -+#if !defined(EWK_BRINGUP) -+// [M53_2785] Temporary disabling the codes for swiching to new chromium -+// The codes makes a build problem in mobile and tv target. -+// It will be fixed by rendering team. -+// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2058 - if (std::find(exception_strings.begin(), exception_strings.end(), - feature_strings[i]) == exception_strings.end()) -+#endif // EWK_BRINGUP - features_.insert(feature); - } - return true; -- 2.7.4 From 63ff147f1f70f05888ff7f892503aced38781c92 Mon Sep 17 00:00:00 2001 From: Suchit Agrawal Date: Tue, 31 Jan 2017 10:08:46 +0000 Subject: [PATCH 09/16] Revert "Enabled the use_system_re2 flag" This reverts commit e9eaac2bf49757f4d57624cf6b4d153e3e059a1f. Change-Id: I93171ed4d4cd4ade05d978eb10659afe9b5a714e Signed-off-by: Suchit Agrawal --- tizen_src/build/gyp_chromiumefl.sh | 1 - tizen_src/packaging/chromium-efl.spec | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/tizen_src/build/gyp_chromiumefl.sh b/tizen_src/build/gyp_chromiumefl.sh index 90660ca..b0f6353 100755 --- a/tizen_src/build/gyp_chromiumefl.sh +++ b/tizen_src/build/gyp_chromiumefl.sh @@ -184,7 +184,6 @@ add_gbs_flags() { -Duse_system_libusb=1 -Duse_system_libxml=1 -Duse_system_libxslt=1 - -Duse_system_re2=1 -Duse_system_zlib=1 " diff --git a/tizen_src/packaging/chromium-efl.spec b/tizen_src/packaging/chromium-efl.spec index fba1bb8..a64108c 100644 --- a/tizen_src/packaging/chromium-efl.spec +++ b/tizen_src/packaging/chromium-efl.spec @@ -64,7 +64,7 @@ Requires(post): xkeyboard-config Requires(postun): /sbin/ldconfig BuildRequires: bison, edje-tools, expat-devel, flex, gettext, gperf, libcap-devel -BuildRequires: libjpeg-turbo-devel, perl, python, python-xml, re2-devel, which +BuildRequires: libjpeg-turbo-devel, perl, python, python-xml, which BuildRequires: pkgconfig(capi-appfw-application) BuildRequires: pkgconfig(capi-location-manager) BuildRequires: pkgconfig(capi-media-audio-io) -- 2.7.4 From b74b02c9678252babe14c3978f34f4e05ff218ab Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Fri, 9 Feb 2018 20:23:16 +0530 Subject: [PATCH 10/16] [M67 Dev][EFL] Integrate GN configuration The upstream chromium hasn't supported EFL port. So, this enables GN configurations for that. Temporary command: $ ./tizen_src/build/build_desktop.sh --use-gn Reference: https://review.tizen.org/gerrit/#/c/169727/ https://review.tizen.org/gerrit/#/c/174607/ https://review.tizen.org/gerrit/#/c/178028/ Change-Id: Ie426852c63a4ebcbfea482297ef2915c4a3b6edf Signed-off-by: Youngsoo Choi --- base/BUILD.gn | 56 +- base/third_party/libevent/BUILD.gn | 2 +- build/config/arm.gni | 2 +- build/config/chromecast_build.gni | 2 +- build/config/clang/BUILD.gn | 2 +- build/config/compiler/BUILD.gn | 6 +- build/config/features.gni | 8 +- build/config/linux/BUILD.gn | 39 + build/config/sysroot.gni | 6 + build/config/ui.gni | 6 +- build/gn_helpers.pyc | Bin 0 -> 12349 bytes build/secondary/third_party/nss/BUILD.gn | 3 +- build/split_static_library.gni | 6 +- chrome/BUILD.gn | 2 +- chrome/browser/BUILD.gn | 2 +- chrome/browser/ui/BUILD.gn | 2 +- chrome/test/BUILD.gn | 3 +- chrome/test/chromedriver/BUILD.gn | 8 + components/BUILD.gn | 2 +- components/crash/content/app/BUILD.gn | 4 +- components/crash/content/browser/BUILD.gn | 2 +- components/nacl/features.gni | 2 +- content/BUILD.gn | 65 + content/browser/BUILD.gn | 69 + content/common/BUILD.gn | 20 +- content/gpu/BUILD.gn | 12 + content/public/browser/BUILD.gn | 9 + content/public/common/BUILD.gn | 15 + content/public/renderer/BUILD.gn | 15 + content/renderer/BUILD.gn | 33 + content/shell/BUILD.gn | 22 + device/bluetooth/BUILD.gn | 12 +- device/serial/BUILD.gn | 10 +- device/udev_linux/BUILD.gn | 9 + gpu/config/BUILD.gn | 3 + gpu/ipc/service/BUILD.gn | 6 + media/BUILD.gn | 10 + media/audio/BUILD.gn | 6 + media/capture/BUILD.gn | 12 + media/media_options.gni | 2 +- net/BUILD.gn | 14 + printing/BUILD.gn | 14 + sandbox/BUILD.gn | 2 +- services/device/BUILD.gn | 1 + testing/test.gni | 24 + third_party/BUILD.gn | 2 +- third_party/angle/gni/angle.gni | 6 +- third_party/boringssl/BUILD.gn | 2 +- third_party/ffmpeg/ffmpeg_options.gni | 4 +- third_party/libvpx/BUILD.gn | 4 +- third_party/libxml/BUILD.gn | 236 +- third_party/libxslt/BUILD.gn | 2 +- third_party/mesa/BUILD.gn | 9 +- third_party/opus/BUILD.gn | 4 +- third_party/webrtc/BUILD.gn | 2 +- tizen_src/.gn | 256 + tizen_src/BUILD.gn | 18 + tizen_src/DEPS.efl | 6 +- tizen_src/build/BUILD.gn | 596 ++ tizen_src/build/build_desktop.sh | 48 +- tizen_src/build/cmd_execution.py | 17 + tizen_src/build/common.sh | 45 +- tizen_src/build/config/BUILD.gn | 131 + tizen_src/build/config/BUILDCONFIG.gn | 675 +++ tizen_src/build/config/compiler/BUILD.gn | 131 + tizen_src/build/config/linux/pkg_config.gni | 33 + tizen_src/build/config/tizen/BUILD.gn | 156 + tizen_src/build/config/tizen_features.gni | 87 + tizen_src/build/gn_chromiumefl | 164 + tizen_src/build/gn_chromiumefl.sh | 308 ++ tizen_src/build/jhbuild/jhbuildrc | 5 +- ...do-not-build-several-chromium-dependencies.diff | 10 +- .../build/patches/gn_build_is_tizen_on_ffmpeg.diff | 100 + tizen_src/build/toolchain/tizen/BUILD.gn | 70 + tizen_src/buildtools/arm/gn.arm | 0 tizen_src/chromium-efl-gn.patch | 5851 ++++++++++++++++++++ tizen_src/chromium_impl/base/base_efl.gni | 18 + .../chromium_impl/chrome/chrome_tests_efl.gni | 12 + tizen_src/chromium_impl/chromium_impl.gypi | 6 +- tizen_src/chromium_impl/components/components.gni | 9 + .../components/js_dialogs_efl/BUILD.gn | 23 + tizen_src/chromium_impl/content/BUILD.gn | 18 + .../chromium_impl/content/browser/browser_efl.gni | 82 + tizen_src/chromium_impl/content/common/BUILD.gn | 27 + .../chromium_impl/content/common/common_efl.gni | 57 + tizen_src/chromium_impl/content/content_efl.gni | 108 + tizen_src/chromium_impl/content/content_efl.gyp | 2 +- tizen_src/chromium_impl/content/gpu/gpu_efl.gni | 12 + .../content/renderer/renderer_efl.gni | 34 + .../chromium_impl/content/shell/shell_efl.gni | 12 + tizen_src/chromium_impl/device/battery_tizen.gni | 15 + .../device/vibration/vibration_efl.gni | 11 + tizen_src/chromium_impl/edje_resources/BUILD.gn | 34 + tizen_src/chromium_impl/efl/BUILD.gn | 47 + tizen_src/chromium_impl/gpu/gpu_efl.gni | 23 + tizen_src/chromium_impl/media/BUILD.gn | 23 + tizen_src/chromium_impl/media/media_efl.gni | 86 + .../third_party/WebKit/Source/core/BUILD.gn | 32 + .../third_party/WebKit/Source/core/core_efl.gni | 26 + .../third_party/WebKit/Source/core/core_efl.gypi | 4 +- .../WebKit/Source/core/make-file-arrays.py | 3 +- .../WebKit/Source/modules/modules_efl.gni | 10 + .../WebKit/Source/platform/blink_platform_efl.gni | 5 + tizen_src/chromium_impl/ui/BUILD.gn | 32 + tizen_src/chromium_impl/ui/ozone/BUILD.gn | 26 + tizen_src/chromium_impl/ui/ui_efl.gni | 136 + tizen_src/chromium_impl/ui/ui_efl_injections.gni | 37 + tizen_src/ewk/BUILD.gn | 12 + tizen_src/ewk/efl_integration/BUILD.gn | 546 ++ tizen_src/ewk/efl_integration/efl_integration.gypi | 2 +- tizen_src/ewk/efl_integration/launch_exec.sh | 2 +- .../link_xwalk_against_chromium_efl.gypi | 6 +- tizen_src/ewk/efl_integration/resource/BUILD.gn | 33 + tizen_src/ewk/efl_webview_app/BUILD.gn | 117 + tizen_src/ewk/po_tizen/BUILD.gn | 90 + tizen_src/ewk/tizen_version_defines_for_apps.gni | 19 + tizen_src/ewk/ubrowser/BUILD.gn | 68 + tizen_src/ewk/unittest/BUILD.gn | 395 ++ tools/battor_agent/BUILD.gn | 2 +- tools/perf/BUILD.gn | 2 + tools/perf/chrome_telemetry_build/BUILD.gn | 2 + ui/base/BUILD.gn | 34 +- ui/events/BUILD.gn | 17 + ui/events/devices/BUILD.gn | 9 + ui/events/ozone/BUILD.gn | 4 + ui/events/platform/x11/BUILD.gn | 8 + ui/gfx/BUILD.gn | 22 +- ui/gfx/x/BUILD.gn | 10 + ui/gl/BUILD.gn | 12 +- ui/native_theme/BUILD.gn | 10 + ui/ozone/BUILD.gn | 12 + ui/ozone/common/BUILD.gn | 4 + ui/shell_dialogs/BUILD.gn | 9 + ui/snapshot/BUILD.gn | 8 + ui/surface/BUILD.gn | 5 + ui/views/BUILD.gn | 2 +- v8/BUILD.gn | 5 +- 137 files changed, 11646 insertions(+), 319 deletions(-) create mode 100644 build/gn_helpers.pyc create mode 100644 tizen_src/.gn create mode 100644 tizen_src/BUILD.gn create mode 100644 tizen_src/build/BUILD.gn create mode 100644 tizen_src/build/cmd_execution.py create mode 100644 tizen_src/build/config/BUILD.gn create mode 100644 tizen_src/build/config/BUILDCONFIG.gn create mode 100644 tizen_src/build/config/compiler/BUILD.gn create mode 100644 tizen_src/build/config/linux/pkg_config.gni create mode 100644 tizen_src/build/config/tizen/BUILD.gn create mode 100644 tizen_src/build/config/tizen_features.gni create mode 100755 tizen_src/build/gn_chromiumefl create mode 100755 tizen_src/build/gn_chromiumefl.sh create mode 100644 tizen_src/build/patches/gn_build_is_tizen_on_ffmpeg.diff create mode 100644 tizen_src/build/toolchain/tizen/BUILD.gn create mode 100644 tizen_src/buildtools/arm/gn.arm create mode 100644 tizen_src/chromium-efl-gn.patch create mode 100644 tizen_src/chromium_impl/base/base_efl.gni create mode 100644 tizen_src/chromium_impl/chrome/chrome_tests_efl.gni create mode 100644 tizen_src/chromium_impl/components/components.gni create mode 100644 tizen_src/chromium_impl/components/js_dialogs_efl/BUILD.gn create mode 100644 tizen_src/chromium_impl/content/BUILD.gn create mode 100644 tizen_src/chromium_impl/content/browser/browser_efl.gni create mode 100644 tizen_src/chromium_impl/content/common/BUILD.gn create mode 100644 tizen_src/chromium_impl/content/common/common_efl.gni create mode 100644 tizen_src/chromium_impl/content/content_efl.gni create mode 100644 tizen_src/chromium_impl/content/gpu/gpu_efl.gni create mode 100644 tizen_src/chromium_impl/content/renderer/renderer_efl.gni create mode 100644 tizen_src/chromium_impl/content/shell/shell_efl.gni create mode 100644 tizen_src/chromium_impl/device/battery_tizen.gni create mode 100644 tizen_src/chromium_impl/device/vibration/vibration_efl.gni create mode 100644 tizen_src/chromium_impl/edje_resources/BUILD.gn create mode 100644 tizen_src/chromium_impl/efl/BUILD.gn create mode 100644 tizen_src/chromium_impl/gpu/gpu_efl.gni create mode 100644 tizen_src/chromium_impl/media/BUILD.gn create mode 100644 tizen_src/chromium_impl/media/media_efl.gni create mode 100644 tizen_src/chromium_impl/third_party/WebKit/Source/core/BUILD.gn create mode 100644 tizen_src/chromium_impl/third_party/WebKit/Source/core/core_efl.gni create mode 100644 tizen_src/chromium_impl/third_party/WebKit/Source/modules/modules_efl.gni create mode 100644 tizen_src/chromium_impl/third_party/WebKit/Source/platform/blink_platform_efl.gni create mode 100644 tizen_src/chromium_impl/ui/BUILD.gn create mode 100644 tizen_src/chromium_impl/ui/ozone/BUILD.gn create mode 100644 tizen_src/chromium_impl/ui/ui_efl.gni create mode 100644 tizen_src/chromium_impl/ui/ui_efl_injections.gni create mode 100644 tizen_src/ewk/BUILD.gn create mode 100644 tizen_src/ewk/efl_integration/BUILD.gn create mode 100644 tizen_src/ewk/efl_integration/resource/BUILD.gn create mode 100644 tizen_src/ewk/efl_webview_app/BUILD.gn create mode 100644 tizen_src/ewk/po_tizen/BUILD.gn create mode 100644 tizen_src/ewk/tizen_version_defines_for_apps.gni create mode 100644 tizen_src/ewk/ubrowser/BUILD.gn create mode 100644 tizen_src/ewk/unittest/BUILD.gn diff --git a/base/BUILD.gn b/base/BUILD.gn index 93b3794..31e8168 100644 --- a/base/BUILD.gn +++ b/base/BUILD.gn @@ -30,6 +30,9 @@ import("//build/config/ui.gni") import("//build/nocompile.gni") import("//testing/libfuzzer/fuzzer_test.gni") import("//testing/test.gni") +if (use_efl) { + import("//tizen_src/chromium_impl/base/base_efl.gni") +} declare_args() { # Override this value to give a specific build date. @@ -1586,14 +1589,21 @@ jumbo_component("base") { ] } else { # Non-Linux. - sources -= [ - "nix/mime_util_xdg.cc", - "nix/mime_util_xdg.h", - "nix/xdg_util.cc", - "nix/xdg_util.h", - ] - - if (!is_android) { + if (is_tizen) { + deps += [ + "//base/third_party/xdg_mime", + "//base/third_party/xdg_user_dirs", + ] + } + if (!is_tizen) { + sources -= [ + "nix/mime_util_xdg.cc", + "nix/mime_util_xdg.h", + "nix/xdg_util.cc", + "nix/xdg_util.h", + ] + } + if (!is_android && !is_tizen) { sources -= [ "linux_util.cc", "linux_util.h", @@ -2379,8 +2389,16 @@ test("base_unittests") { "win/wrapped_window_proc_unittest.cc", ] + if (use_efl) { + sources += external_base_sources + } + defines = [] + if (use_efl) { + configs += external_base_configs + } + deps = [ ":base", ":i18n", @@ -2502,6 +2520,28 @@ test("base_unittests") { } } + if (is_tizen) { + set_sources_assignment_filter([]) + sources += [ + "files/file_path_watcher_linux.cc", + "files/file_util_linux.cc", + "posix/unix_domain_socket_linux.cc", + "posix/unix_domain_socket_linux.h", + "process/internal_linux.cc", + "process/internal_linux.h", + "process/process_iterator_linux.cc", + "process/process_handle_linux.cc", + "process/memory_linux.cc", + "process/process_linux.cc", + "process/process_metrics_linux.cc", + "sys_info_linux.cc", + "threading/platform_thread_linux.cc", + "trace_event/malloc_dump_provider.cc", + "trace_event/malloc_dump_provider.h", + ] + set_sources_assignment_filter(sources_assignment_filter) + } + if (!use_glib) { sources -= [ "message_loop/message_pump_glib_unittest.cc" ] } diff --git a/base/third_party/libevent/BUILD.gn b/base/third_party/libevent/BUILD.gn index e934454..a39ad80 100644 --- a/base/third_party/libevent/BUILD.gn +++ b/base/third_party/libevent/BUILD.gn @@ -43,7 +43,7 @@ static_library("libevent") { "mac/event-config.h", ] include_dirs = [ "mac" ] - } else if (is_linux) { + } else if (is_linux || is_tizen) { sources += [ "epoll.c", "linux/config.h", diff --git a/build/config/arm.gni b/build/config/arm.gni index abd4dd0..87916afb 100644 --- a/build/config/arm.gni +++ b/build/config/arm.gni @@ -80,7 +80,7 @@ if (current_cpu == "arm" || v8_current_cpu == "arm") { } if (arm_float_abi == "") { - if (current_os == "android") { + if (current_os == "android" || target_os == "android" || is_tizen) { arm_float_abi = "softfp" } else if (target_os == "android") { if (build_devil_arm_deps) { diff --git a/build/config/chromecast_build.gni b/build/config/chromecast_build.gni index d4869d7..8869b55 100644 --- a/build/config/chromecast_build.gni +++ b/build/config/chromecast_build.gni @@ -23,7 +23,7 @@ declare_args() { # of Cast functionality. Though this defaults to true for x86 Linux devices, # this should be overriden manually for an embedded x86 build. # TODO(slan): Remove instances of this when x86 is a fully supported platform. - is_cast_desktop_build = is_chromecast && target_os == "linux" && + is_cast_desktop_build = is_chromecast && target_os == "linux" && !use_efl && (target_cpu == "x86" || target_cpu == "x64") } diff --git a/build/config/clang/BUILD.gn b/build/config/clang/BUILD.gn index 0092f8d..594d596 100644 --- a/build/config/clang/BUILD.gn +++ b/build/config/clang/BUILD.gn @@ -18,7 +18,7 @@ config("find_bad_constructs") { rebase_path("${clang_base_path}/lib/libFindBadConstructs.dylib", root_build_dir), ] - } else if (host_os == "linux") { + } else if (host_os == "linux" && !use_efl) { cflags += [ "-Xclang", "-load", diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn index 461e62d..d99a9a4 100644 --- a/build/config/compiler/BUILD.gn +++ b/build/config/compiler/BUILD.gn @@ -40,7 +40,7 @@ declare_args() { # warnings with known toolchains. Allow overriding this e.g. for Chromium # builds on Linux that could use a different version of the compiler. # With GCC, warnings in no-Chromium code are always not treated as errors. - treat_warnings_as_errors = true + treat_warnings_as_errors = !use_efl # Normally, Android builds are lightly optimized, even for debug builds, to # keep binary size down. Setting this flag to true disables such optimization @@ -1497,7 +1497,7 @@ config("no_chromium_code") { } else { # GCC may emit unsuppressible warnings so don't add -Werror for no chromium # code. crbug.com/589724 - if (treat_warnings_as_errors && is_clang) { + if (treat_warnings_as_errors && is_clang && !use_efl) { cflags += [ "-Werror" ] ldflags = [ "-Werror" ] } @@ -1850,7 +1850,7 @@ config("no_optimize") { "/Ob0", # Disable all inlining (on by default). "/GF", # Enable string pooling (off by default). ] - } else if (is_android && !android_full_debug) { + } else if ((is_android && !android_full_debug) || is_tizen) { # On Android we kind of optimize some things that don't affect debugging # much even when optimization is disabled to get the binary size down. if (is_clang) { diff --git a/build/config/features.gni b/build/config/features.gni index 09cddfd..4c1b2ef 100644 --- a/build/config/features.gni +++ b/build/config/features.gni @@ -46,9 +46,9 @@ declare_args() { fieldtrial_testing_like_official_build = is_chrome_branded # libudev usage. This currently only affects the content layer. - use_udev = is_linux && !is_chromecast + use_udev = (is_linux && !is_chromecast) || is_tizen - use_dbus = is_linux && !is_chromecast + use_dbus = (is_linux && !is_chromecast) || is_tizen use_gio = is_linux && !is_chromeos && !is_chromecast } @@ -58,3 +58,7 @@ declare_args() { # ============================================= # # See comment at the top. + +if (use_efl) { + import("//tizen_src/build/config/tizen_features.gni") +} diff --git a/build/config/linux/BUILD.gn b/build/config/linux/BUILD.gn index e3488ab..4dd971d 100644 --- a/build/config/linux/BUILD.gn +++ b/build/config/linux/BUILD.gn @@ -33,6 +33,45 @@ config("runtime_library") { } } +pkg_config("freetype2") { + visibility = [ "//build/linux:freetype2" ] + + packages = [ "freetype2" ] +} + +pkg_config("glib") { + packages = [ + "glib-2.0", + "gmodule-2.0", + "gobject-2.0", + "gthread-2.0", + ] +} + +#if (use_pango || use_cairo) { +# pkg_config("pangocairo") { +# packages = [ "pangocairo" ] +# } +#} + +#if (use_pango) { +# pkg_config("pangoft2") { +# packages = [ "pangoft2" ] +# } +#} + +# Note: if your target also depends on //dbus, you don't need to add this +# config (it will get added automatically if you depend on //dbus). +pkg_config("dbus") { + packages = [ "dbus-1" ] +} + +if (!is_tizen) { + pkg_config("libffi") { + packages = [ "libffi" ] + } +} + config("x11") { libs = [ "X11", diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni index d5daf2d..2aac587 100644 --- a/build/config/sysroot.gni +++ b/build/config/sysroot.gni @@ -47,6 +47,10 @@ if (current_os == target_os && current_cpu == target_cpu && assert(false, "No linux sysroot for cpu: $target_cpu") } + if (target_os == "tizen") { + sysroot = "/" + } + if (sysroot != "") { _script_arch = current_cpu if (_script_arch == "x86") { @@ -66,6 +70,8 @@ if (current_os == target_os && current_cpu == target_cpu && } else if (is_ios) { import("//build/config/ios/ios_sdk.gni") sysroot = ios_sdk_path +} else if (is_tizen) { + sysroot = "/" } else if (is_fuchsia) { import("//build/config/fuchsia/config.gni") if (current_cpu == "arm64") { diff --git a/build/config/ui.gni b/build/config/ui.gni index 547b42f..1ac6cfa 100644 --- a/build/config/ui.gni +++ b/build/config/ui.gni @@ -23,20 +23,20 @@ declare_args() { # Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux # that does not require X11. Enabling this feature disables use of glib, x11, # Pango, and Cairo. - use_ozone = is_chromeos || (is_chromecast && !is_android) || is_fuchsia + use_ozone = use_efl || is_chromeos || (is_chromecast && !is_android) || is_fuchsia # Indicates if Aura is enabled. Aura is a low-level windowing library, sort # of a replacement for GDI or GTK. use_aura = is_win || is_linux || is_fuchsia # Whether we should use glib, a low level C utility library. - use_glib = is_linux + use_glib = is_linux || use_efl } declare_args() { # True means the UI is built using the "views" framework. toolkit_views = (is_mac || is_win || is_chromeos || use_aura) && - !is_chromecast && !is_fuchsia + !is_chromecast && !is_fuchsia && !use_efl } # Additional dependent variables ----------------------------------------------- diff --git a/build/gn_helpers.pyc b/build/gn_helpers.pyc new file mode 100644 index 0000000000000000000000000000000000000000..7feab5ee5d44c237c8608ae00ea195b440144ab6 GIT binary patch literal 12349 zcmcgy&u<(@daWJ~Y0a1tWy_LG8_t%wvN_x(N0ybfY_FtUS(0TT-jOn-t*m5W(44N} zwAj-b<_o|IOg<_wlm>90H~8;^-;ksez}0n)+O+ z&y@P%-I_8pDwt89d+Kgo1$ExIJF9|OIhj+zoSZzPf@kF9hzgD<(~wpgERj~4Drl

e zCT?1jhJFZXkOKf#+_bl(=PkZcV!?r&jn>c7C`Q?KojLVB4Ok;m!TD=~d@AXzz z@#ItgNi!*)TScenz@0A1h?Z7Xs$p!!y`d}xMssIqFnJugH9Hd%_l-^l8V{rI%%oU{ zL~~p^hXz%!AOp;@-b*H_wm9@nQ>FrslvANG9@Ec~bg!Ke2sb*{AN9?c z>)*$v`~x)9d-&NSI2a(!Q{D9zZ?$STWGwFWI2*lQ)|87;5==NNt`>@voY@a>c6OMI z%voRF`)oQMxs&%ky7}R?v;84P98N}SW)Q8tb-sQ6&GYZH-)NsZ>nc?<(;n}2+3YF& zEJrct_4%ic-!u4K#n0|xx{-8#i`b-RJdse0ARVK!SlHc)E42!Ev zH5e95YK{*+5F>*z<>#=c2G38U>gn~oi&^R7$10nX$6%n|^QyNVFK?O%ua7;abaW2qOQTLi_e0H& z=J_njuid|{KAn+?z)>c`E_;0E=c~saV^U72$EYBq$H`)Ll>H29>eL0axHIG3L8W30 z$7Bqlmo4PIth2!v@&<#G;1yY#7qJ9glTA|4iLb2?KsX4UO#{*4Lq9Sx%y1x>EbTg) z7}&JdeiS9Uy&&v^a>5vYK{hyJZ6Lm&D$q|9xw-|7kZAZAfDDo_v~u7cL}L5N*x0t- zU<3F+iK9I|POJ^VE*hjp+sKl!j?6<7tq=r znM46d3>2LS0laODYz1kxXSJ6LapW#$7NIg0I9JnzVXZMEN!Aw8_v z;Fn4Swt+q_ZkgCT8mE`vz=dN3W!G?iCCkhRgyv?pTmvq8KFcLcz=3!`*>B)*t-#Kn z-Zpy#N}NxlH$`Azu0!`ShQm7<3%0?$z=4WjW{d32y=ay(Xp2S_x%B@G9FOBRR4LEdtFT&<8+s zfnxgw-ukLjA$hxZ=}EmVq1!v6 z<^=uJhv_(lQVFzA2e7ZFEl{DGXBnGo|4FUV5&Y26Fr^RZRM;P_CulRDc|slvkTZhm zN+Cb25T|QaR^hIiuY z=B|XQmhX$kN`FV{Fn$1#aJ0H}Yva1U)zRx4-J6{o`hzQ-Yail7bgsjYelWrGjD1_V zVS0=8-=dM`lF|%xKdDfeFx7@#Zp* z<=RS!CMc)f_xlM#9p`>a%M`g}WMouVzy(@M&6?O0mNwB_luzj1BCfz4I-ItX6h}eh z`@Gz-4eh!Wk07JDX49NVr!V-q0ji~u0>#kJV`zyrYcL~F)1-Y+Loy(h zXnipZ(9mUAWsBI@0;V1p*7CR@C=^}HpOQ5q{h9Rg3Y*}dssWJ(pq=0X@(>^gJ4XhX zwoO||O6QDx1?Jyc8YIaj3f1POpI$oGTw2j38s+VyO7w7b+@`AUh z;w@r&P%PD#OA`q2E6@AgDq#S@jvf$IK=M+IW8n0FVnnN8c?8|y#c?D72dM@CMw=)G zi{&QC_ev&EmXPFDk3ifa_;aF{xIzHzMn&BvE+ThAOrWsWG=xbzdll!kwnh$Y zKp|Qz#nv`7?9UiRpl}h1t8E11KiO9Uk@SnK_0zl-BkM(kt%yVscW=+B^bz$ME-z5I zAzZEF3~}j?S&SxGyz^5PACqdXrvp_N)E(4aZyn)?{|$%2EOIi;lUSvLUM+FUb(|pn zgX4z5xaxv}_ejU7q{-;sV0;6E8q$(ekGX8jaZeT^7Z#2M#f%jCZJ&fZcDaV#85~+X zRF^KabdeqJAWoOqpu5Ow3=1Wy3k95ry|P|^=pP!vGH&`PUx6ZV_**Emj1bh^9OVB= z@3?o$JLb*Tn%>cw{j}NFrL^yM3F?W$`kAF<68c4K;l?-aAG787vL!Qtj}=* zQ;{4obHYdtqXY>ommEe;*d>RNmU78qF=tGIhn0c_yiNa+DcA z`Z&9YL0p^U#Au1H0@83uIkk~V^K7mpD0A!!FN@W5;4i?sdy-sn0S94E!0x8Zx>i}} zX{r8%*a*sGOzb;blNiII04b)v_<>4vA>WY**F&yK5|zCPr+$k@QzpG#LKM0SQ9v|R zo*^~4i}x+_qm;d2Jf#}jx=&^SZK$Mxa`2aM^U+&e6pa5frRLMOW-`(o9b8|b)zXX>d5mfO5|PT)erxLpF@ApiFPtF2)lD> z_m?Qlm+tjSdvYzW@(vH>tJ9Za8YBziFRu!1cO%sSqMY8@Tv@a$O}RXTCXE1;s*h?nvk}Q5UTiFqPU>vU~SU^ zTl<^I!{V_uHeCeIy0uL4xD1UbNzUb!(pToBgrUGu=d4sbmXAQ1iYEwhu({G&hD-Qg zp3mz}KkoDa9uJZUlFDmk;0eCa%P!h|daGb0{wo?fC`?>>qs_O@rOW;}t~C{+v7I6) zw^$0(H;CQz=AJ&YQV7~gB8v(xqB*D9QQ4SxU@WG{71UoZtG9+e6F^u!L_Xh<~CBK)CjDc^9P8R3n#=BK#NJy>;w)y zCz-j0P(0LSdblfQij!$uC7gwvMA{q@Lv?=zz5Eq^md;c`N;kcENSD*jPHCg1o&E(b z;2v@d6{7MU{a$6R_D|&;#EVL`%B01NA)H~>bw_10Djg~W$)GWo7WbwN8vSyU3o^Ra za|Z7^WPNObp$GR=UWyBlLrq=WIgx8>4%?#kG#flE+SC$fUMc`ZgY;#?=4&tkC3Uj{BVYqG5gJ6Ux%>%UW<0Wn~&qz;z?SCt&#(~pp(2Cfq3ld|wGuI!Q z{0NZ2W*4IJfdWo}J<0G!7LG#G!1OEoeBVwq1)oC+rT(=HEd_ z9zyvX8P4V#GvD-{_g=^D>IrWV*yuCiKvb00ejO!W0~xGJ4FX$)2KfzH3}^TUX&-P9 zfXIh7r3R@}{XF_@=`x4Of5=7gc+vF1(pfS7ub$MVgYs80mcj+)k{tgl z_uQgK*9EZQ%`gaWUsNP->!g^dDIu;pl~-9E;CmG)buO;6AAPx$KZrhYP?m&I;1^>1zazs zq&|r5lJ2_8c(Q_X_X;jW8u8;foF9hIdKb-}02r-wAW~?dc1o1=LahM|p8|fVtWN;V z^WIA+Td0_>#B=oji|2!S?DqwQ1w5+wdP`(Ka6>ou*Mc5_pWQeh?&k#OKR<|B;Bp;E zv;QjXL#|B)?u4Q!`Yq3;(s6xoT#MdqX9#7iu!tNX{3*c=ulnULbXYdB^QFT7cW5OC z-YWnIg(f>9G)gebM$#{U{sIp_19SopV2&5lME(bjK8b+ z*^hA`W+eP^VZdnz1I#UNxXfQ&rK_}hQTr~=#B*RfJVGJX zNPcX@54fkoaKU|-kYT%mn|5p-xie%qkg{e%xX1%bW5uo|ht<}%a6jF}Ze6u4B>AQC z*?b)Qm{1Z}=s=p`cC8<8nV>D2Ljr~>D=JD~P*qW=d{SGydY8*^SdjTH+TI{!j^RYj zp1>wb9lpPTV~a&y+*4f!m!e^Ny&&oLdfhflC5s~Y6b24m+L#zdm$I`= 7 && arm_use_neon) { +} else if ((current_cpu == "arm" || is_tizen) && arm_version >= 7 && arm_use_neon) { ffmpeg_arch = "arm-neon" +} else if (is_tizen) { + ffmpeg_arch = "arm" } else { ffmpeg_arch = current_cpu } diff --git a/third_party/libvpx/BUILD.gn b/third_party/libvpx/BUILD.gn index 4e817b6..60b920a 100644 --- a/third_party/libvpx/BUILD.gn +++ b/third_party/libvpx/BUILD.gn @@ -17,7 +17,7 @@ if (current_cpu == "x86") { } else { cpu_arch_full = "x64" } -} else if (current_cpu == "arm") { +} else if (current_cpu == "arm" || is_tizen) { if (arm_use_neon) { cpu_arch_full = "arm-neon" } else if (is_android) { @@ -251,7 +251,7 @@ if (current_cpu == "arm") { } # Converts ARM assembly files to GAS style. -if (current_cpu == "arm" && arm_assembly_sources != []) { +if ((current_cpu == "arm" && arm_assembly_sources != []) || is_tizen) { action_foreach("convert_arm_assembly") { script = "//third_party/libvpx/run_perl.py" sources = arm_assembly_sources diff --git a/third_party/libxml/BUILD.gn b/third_party/libxml/BUILD.gn index 80b82fb..aafa506 100644 --- a/third_party/libxml/BUILD.gn +++ b/third_party/libxml/BUILD.gn @@ -1,243 +1,19 @@ -# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Copyright 2018 The Chromium Authors. All rights reserved. # Use of this source code is governed by a BSD-style license that can be # found in the LICENSE file. -# Define an "os_include" variable that points at the OS-specific generated -# headers. These were generated by running the configure script offline. -if (is_linux || is_android || is_nacl || is_fuchsia) { - os_include = "linux" -} else if (is_mac || is_ios) { - os_include = "mac" -} else if (is_win) { - os_include = "win32" -} - -config("libxml_config") { - # Define LIBXML_STATIC as nothing to match how libxml.h (an internal header) - # defines LIBXML_STATIC, otherwise we get the macro redefined warning from - # GCC. ("defines" does "-DFOO" which defines the macro FOO as 1.) - cflags = [ "-DLIBXML_STATIC=" ] - - include_dirs = [ - "src/include", - "$os_include/include", - ] -} - -config("libxml_warnings") { - if (is_win) { - cflags_c = [ - "/wd4018", # Signed/unsigned mismatch in comparison. - "/wd4267", # TODO(brucedawson): http://crbug.com/554200 fix C4267 - "/wd4311", # and C4311 warnings. - ] - } - if (is_clang) { - cflags = [ - # libxml passes `const unsigned char*` through `const char*`. - "-Wno-pointer-sign", - - # pattern.c and uri.c both have an intentional `for (...);` / - # `while(...);` loop. I submitted a patch to move the `'` to its own - # line, but until that's landed suppress the warning: - "-Wno-empty-body", - - # debugXML.c compares array 'arg' to NULL. - "-Wno-tautological-pointer-compare", - - # threads.c attempts to forward declare a pthread_equal which doesn't - # match the prototype in pthreads.h - "-Wno-ignored-attributes", +import("//build/config/linux/pkg_config.gni") - # libxml casts from int to long to void*. - "-Wno-int-to-void-pointer-cast", - - # libxml passes a volatile LPCRITICAL_SECTION* to a function expecting - # a void* volatile*. - "-Wno-incompatible-pointer-types", - - # trio_is_special_quantity and trio_is_negative are only - # used with certain preprocessor defines set. - "-Wno-unused-function", - - # Comparison between xmlElementType and xmlXPathTypeVal. - # TODO(hans): See if we can fix upstream (http://crbug.com/763944). - "-Wno-enum-compare", - ] - } else if (is_linux) { - cflags = [ - # gcc spits out a bunch of warnings about passing too many arguments to - # __xmlSimpleError. - "-Wno-format-extra-args", - ] - } +pkg_config("system_libxml") { + packages = [ "libxml-2.0" ] } static_library("libxml") { - output_name = "libxml2" - - # Commented out sources are libxml2 files we do not want to include. They are - # here to make it easy to identify files which are new. sources = [ "chromium/libxml_utils.cc", "chromium/libxml_utils.h", - "linux/config.h", - "linux/include/libxml/xmlversion.h", - "mac/config.h", - "mac/include/libxml/xmlversion.h", - - #"src/DOCBparser.c", - "src/HTMLparser.c", - "src/HTMLtree.c", - - #"src/SAX.c", - "src/SAX2.c", - "src/buf.c", - "src/buf.h", - - #"src/c14n.c", - #"src/catalog.c", - "src/chvalid.c", - - #"src/debugXML.c", - "src/dict.c", - "src/elfgcchack.h", - "src/enc.h", - "src/encoding.c", - "src/entities.c", - "src/error.c", - "src/globals.c", - "src/hash.c", - "src/include/libxml/DOCBparser.h", - "src/include/libxml/HTMLparser.h", - "src/include/libxml/HTMLtree.h", - "src/include/libxml/SAX.h", - "src/include/libxml/SAX2.h", - "src/include/libxml/c14n.h", - "src/include/libxml/catalog.h", - "src/include/libxml/chvalid.h", - "src/include/libxml/debugXML.h", - "src/include/libxml/dict.h", - "src/include/libxml/encoding.h", - "src/include/libxml/entities.h", - "src/include/libxml/globals.h", - "src/include/libxml/hash.h", - "src/include/libxml/list.h", - "src/include/libxml/nanoftp.h", - "src/include/libxml/nanohttp.h", - "src/include/libxml/parser.h", - "src/include/libxml/parserInternals.h", - "src/include/libxml/pattern.h", - "src/include/libxml/relaxng.h", - "src/include/libxml/schemasInternals.h", - "src/include/libxml/schematron.h", - "src/include/libxml/threads.h", - "src/include/libxml/tree.h", - "src/include/libxml/uri.h", - "src/include/libxml/valid.h", - "src/include/libxml/xinclude.h", - "src/include/libxml/xlink.h", - "src/include/libxml/xmlIO.h", - "src/include/libxml/xmlautomata.h", - "src/include/libxml/xmlerror.h", - "src/include/libxml/xmlexports.h", - "src/include/libxml/xmlmemory.h", - "src/include/libxml/xmlmodule.h", - "src/include/libxml/xmlreader.h", - "src/include/libxml/xmlregexp.h", - "src/include/libxml/xmlsave.h", - "src/include/libxml/xmlschemas.h", - "src/include/libxml/xmlschemastypes.h", - "src/include/libxml/xmlstring.h", - "src/include/libxml/xmlunicode.h", - "src/include/libxml/xmlwriter.h", - "src/include/libxml/xpath.h", - "src/include/libxml/xpathInternals.h", - "src/include/libxml/xpointer.h", - "src/include/win32config.h", - "src/include/wsockcompat.h", - - #"src/legacy.c", - "src/libxml.h", - "src/list.c", - "src/parser.c", - "src/parserInternals.c", - "src/pattern.c", - - #"src/relaxng.c", - "src/save.h", - - #"src/schematron.c", - "src/threads.c", - "src/timsort.h", - "src/tree.c", - "src/triodef.h", - "src/trionan.h", - - #"src/trio.c", - #"src/trio.h", - #"src/triodef.h", - # Note: xpath.c #includes trionan.c - #"src/trionan.c", - #"src/triop.h", - #"src/triostr.c", - #"src/triostr.h", - "src/uri.c", - "src/valid.c", - - #"src/xinclude.c", - #"src/xlink.c", - "src/xmlIO.c", - "src/xmlmemory.c", - - #"src/xmlmodule.c", - "src/xmlreader.c", - - #"src/xmlregexp.c", - "src/xmlsave.c", - - #"src/xmlschemas.c", - #"src/xmlschemastypes.c", - "src/xmlstring.c", - "src/xmlunicode.c", - "src/xmlwriter.c", - "src/xpath.c", - - #"src/xpointer.c", - #"src/xzlib.c", - "src/xzlib.h", - "win32/config.h", - "win32/include/libxml/xmlversion.h", ] - configs -= [ "//build/config/compiler:chromium_code" ] - configs += [ - "//build/config/compiler:no_chromium_code", - - # Must be after no_chromium_code for warning flags to be ordered correctly. - ":libxml_warnings", - ] - - if (is_win) { - # libxml2 already defines WIN32_LEAN_AND_MEAN. - configs -= [ "//build/config/win:lean_and_mean" ] - } - - public_configs = [ ":libxml_config" ] - public_deps = [ - "//third_party/icu:icuuc", - ] - deps = [ - "//third_party/zlib", - ] - - if (is_mac || is_ios || is_android || is_fuchsia) { - # http://www.xmlsoft.org/threads.html says that this is required when using - # libxml from several threads, which can possibly happen in chrome. On - # linux, this is picked up by transitivity from pkg-config output from - # build/linux/system.gyp. - defines = [ "_REENTRANT" ] - } - - include_dirs = [ "$os_include" ] + public_configs = [ ":system_libxml" ] } + diff --git a/third_party/libxslt/BUILD.gn b/third_party/libxslt/BUILD.gn index de06534..d6a7617 100644 --- a/third_party/libxslt/BUILD.gn +++ b/third_party/libxslt/BUILD.gn @@ -82,7 +82,7 @@ static_library("libxslt") { public_configs = [ ":libxslt_config" ] cflags = [] - if (is_linux || is_android || is_fuchsia) { + if (is_linux || is_android || is_fuchsia || is_tizen) { include_dirs = [ "linux" ] } else if (is_win) { include_dirs = [ "win32" ] diff --git a/third_party/mesa/BUILD.gn b/third_party/mesa/BUILD.gn index 148b7ec..49834b7 100644 --- a/third_party/mesa/BUILD.gn +++ b/third_party/mesa/BUILD.gn @@ -290,7 +290,8 @@ static_library("mesa_libglslcommon") { if (is_clang) { # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] + # TODO : check for uncomment or use use_efl + #configs -= [ "//build/config/clang:extra_warnings" ] } # UBsan's vptr is not compatible with -fno-rtti, @@ -679,7 +680,8 @@ static_library("mesa") { if (is_clang) { # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] + # TODO : check for uncomment or use use_efl + #configs -= [ "//build/config/clang:extra_warnings" ] } # UBsan's vptr is not compatible with -fno-rtti, @@ -739,7 +741,8 @@ loadable_module("osmesa") { if (is_clang) { # Mesa triggers some of these Clang warnings. - configs -= [ "//build/config/clang:extra_warnings" ] + # TODO : check for uncomment or use use_efl + #configs -= [ "//build/config/clang:extra_warnings" ] } # UBsan's vptr is not compatible with -fno-rtti, diff --git a/third_party/opus/BUILD.gn b/third_party/opus/BUILD.gn index 516ba08..e653e2f 100644 --- a/third_party/opus/BUILD.gn +++ b/third_party/opus/BUILD.gn @@ -11,12 +11,12 @@ use_opus_fixed_point = current_cpu == "arm" || current_cpu == "arm64" # If ARM optimizations shall be used to accelerate performance. # TODO(scottmg): Disabled on Fuchsia for now, see https://crbug.com/775272. use_opus_arm_optimization = - current_cpu == "arm" || (current_cpu == "arm64" && is_ios) + current_cpu == "arm" || (current_cpu == "arm64" && is_ios || is_tizen) # If OPUS Run Time CPU Detections (RTCD) shall be used. # Based on the conditions in celt/arm/armcpu.c: # defined(_MSC_VER) || defined(__linux__). -use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux) +use_opus_rtcd = current_cpu == "arm" && (is_win || is_android || is_linux) || is_tizen config("opus_config") { include_dirs = [ "src/include" ] diff --git a/third_party/webrtc/BUILD.gn b/third_party/webrtc/BUILD.gn index de5e773..2a9ae4a 100644 --- a/third_party/webrtc/BUILD.gn +++ b/third_party/webrtc/BUILD.gn @@ -129,7 +129,7 @@ config("common_inherited_config") { "WEBRTC_IOS", ] } - if (is_linux) { + if (is_linux || is_tizen) { defines += [ "WEBRTC_LINUX" ] } if (is_mac) { diff --git a/tizen_src/.gn b/tizen_src/.gn new file mode 100644 index 0000000..9aebe3e --- /dev/null +++ b/tizen_src/.gn @@ -0,0 +1,256 @@ +# This file is used by the GN meta build system to find the root of the source +# tree and to set startup options. For documentation on the values set in this +# file, run "gn help dotfile" at the command line. + +import("//build/dotfile_settings.gni") + +# The location of the build configuration file. +buildconfig = "//tizen_src/build/config/BUILDCONFIG.gn" + +# The secondary source root is a parallel directory tree where +# GN build files are placed when they can not be placed directly +# in the source tree, e.g. for third party source trees. +secondary_source = "//build/secondary/" + +# These arguments override the default values for items in a declare_args +# block. "gn args" in turn can override these. +# +# In general the value for a build arg in the declare_args block should be the +# default. In some cases, a DEPS-ed in project will want different defaults for +# being built as part of Chrome vs. being built standalone. In this case, the +# Chrome defaults should go here. There should be no overrides here for +# values declared in the main Chrome repository. +# +# Important note for defining defaults: This file is executed before the +# BUILDCONFIG.gn file. That file sets up the global variables like "is_ios". +# This means that the default_args can not depend on the platform, +# architecture, or other build parameters. If you really need that, the other +# repo should define a flag that toggles on a behavior that implements the +# additional logic required by Chrome to set the variables. +default_args = { + # TODO(brettw) bug 684096: Chrome on iOS does not build v8, so "gn gen" prints + # a warning that "Build argument has no effect". When adding a v8 variable, it + # also needs to be defined to src/ios/BUILD.gn (respectively removed from both + # location when it is removed). + + v8_extra_library_files = [ + # Dependencies used by the extra libraries. Putting them here causes them + # to be executed first during snapshot creation. + "//third_party/blink/renderer/core/streams/CommonOperations.js", + "//third_party/blink/renderer/core/streams/CommonStrings.js", + "//third_party/blink/renderer/core/streams/SimpleQueue.js", + + # Extra libraries. + "//third_party/blink/renderer/core/streams/ByteLengthQueuingStrategy.js", + "//third_party/blink/renderer/core/streams/CountQueuingStrategy.js", + "//third_party/blink/renderer/core/streams/ReadableStream.js", + "//third_party/blink/renderer/core/streams/WritableStream.js", + ] + v8_experimental_extra_library_files = [] + v8_enable_gdbjit = false + v8_imminent_deprecation_warnings = false + + # TODO(jochen): Remove this. http://crbug.com/v8/5830, + # http://crbug.com/728583. + v8_check_microtasks_scopes_consistency = false +} + +# These are the targets to check headers for by default. The files in targets +# matching these patterns (see "gn help label_pattern" for format) will have +# their includes checked for proper dependencies when you run either +# "gn check" or "gn gen --check". +check_targets = [ + #"//apps/*", # Medium-hard. + "//ash/*", + "//base/*", + "//blink/*", + "//build/*", + "//cc/*", + + #"//chrome/*", # Epic number of errors. + "//chrome/app/*", + "//chrome/app_shim/*", + "//chrome/browser/chromeos/*", + "//chrome/browser/extensions/*", + "//chrome/browser/ui/*", + "//chrome/common/*", + "//chrome/installer/*", + "//chrome/profiling", + "//chrome/third_party/mozilla_security_manager/*", + "//chrome/tools/*", + "//chrome/utility/*", + "//chromecast/*", + "//chromeos/*", + "//chrome_elf/*", + "//cloud_print/*", + "//components/*", + "//content/*", + "//courgette/*", + "//crypto/*", + "//data/*", + "//dbus/*", + "//device/*", + + #"//extensions/*", # Lots of errors. + "//extensions:extensions_unittests", + "//extensions/browser:browser_tests", + "//extensions/browser:unit_tests", + "//extensions/common:unit_tests", + "//extensions/renderer:unit_tests", + "//extensions/shell:browser_tests", + "//extensions/shell:unit_tests", + "//extensions/utility:unit_tests", + "//gin/*", + "//google_apis/*", + "//google_update/*", + "//gpu/*", + + "//ios/*", + "//ios_internal/*", + "//ipc/*", + + #"//jingle/*", + "//mash/*", + + "//media/*", + "//mojo/*", + + #"//native_client/*", + "//net/*", + + #"//pdf/*", # Medium-hard. + #"//ppapi/*", # Lots of errors. + "//ppapi/examples/*", + "//printing/*", + + #"//remoting/*", # Medium-hard. + "//rlz/*", + + #"//sandbox/*", # Medium-hard. + "//services/*", + "//skia/*", + "//sql/*", + "//storage/*", + "//testing/*", + + #"//third_party/*", # May not ever want this. + "//third_party/breakpad/*", + "//third_party/brotli/*", + "//third_party/hunspell/*", + "//third_party/leveldatabase/*", + "//third_party/libaddressinput/*", + "//third_party/libphonenumber/*", + "//third_party/libwebp/*", + "//third_party/snappy/*", + "//third_party/WebKit/*", + "//tools/*", + + "//ui/*", + "//url/*", + "//v8/*", + "//win8/*", +] + +# These are the list of GN files that run exec_script. This whitelist exists +# to force additional review for new uses of exec_script, which is strongly +# discouraged. +# +# GYPI_TO_GN +# +# Some of these entries are for legacy gypi_to_gn calls. We should not be +# adding new calls to this script in the build (see //build/gypi_to_gn.py for +# detailed advice). The only time you should be editing this list for +# gypi_to_gn purposes is when moving an existing call to a different place. +# +# PLEASE READ +# +# You should almost never need to add new exec_script calls. exec_script is +# slow, especially on Windows, and can cause confusing effects. Although +# individually each call isn't slow or necessarily very confusing, at the scale +# of our repo things get out of hand quickly. By strongly pushing back on all +# additions, we keep the build fast and clean. If you think you need to add a +# new call, please consider: +# +# - Do not use a script to check for the existance of a file or directory to +# enable a different mode. Instead, use GN build args to enable or disable +# functionality and set options. An example is checking for a file in the +# src-internal repo to see if the corresponding src-internal feature should +# be enabled. There are several things that can go wrong with this: +# +# - It's mysterious what causes some things to happen. Although in many cases +# such behavior can be conveniently automatic, GN optimizes for explicit +# and obvious behavior so people can more easily diagnose problems. +# +# - The user can't enable a mode for one build and not another. With GN build +# args, the user can choose the exact configuration of multiple builds +# using one checkout. But implicitly basing flags on the state of the +# checkout, this functionality is broken. +# +# - It's easy to get stale files. If for example the user edits the gclient +# to stop checking out src-internal (or any other optional thing), it's +# easy to end up with stale files still mysteriously triggering build +# conditions that are no longer appropriate (yes, this happens in real +# life). +# +# - Do not use a script to iterate files in a directory (glob): +# +# - This has the same "stale file" problem as the above discussion. Various +# operations can leave untracked files in the source tree which can cause +# surprising effects. +# +# - It becomes impossible to use "git grep" to find where a certain file is +# referenced. This operation is very common and people really do get +# confused when things aren't listed. +# +# - It's easy to screw up. One common case is a build-time script that packs +# up a directory. The author notices that the script isn't re-run when the +# directory is updated, so adds a glob so all the files are listed as +# inputs. This seems to work great... until a file is deleted. When a +# file is deleted, all the inputs the glob lists will still be up to date +# and no command-lines will have been changed. The action will not be +# re-run and the build will be broken. It is possible to get this correct +# using glob, and it's possible to mess it up without glob, but globs make +# this situation much easier to create. if the build always lists the +# files and passes them to a script, it will always be correct. + +exec_script_whitelist = + build_dotfile_settings.exec_script_whitelist + [ + # Whitelist entries for //build should go into + # //build/dotfile_settings.gni instead, so that they can be shared + # with other repos. The entries in this list should be only for files + # in the Chromium repo outside of //build. + "//build_overrides/build.gni", + + # TODO(dgn): Layer violation but breaks the build otherwise, see + # https://crbug.com/474506. + "//clank/java/BUILD.gn", + "//clank/native/BUILD.gn", + + "//cowboy/BUILD.gn", + "//cowboy/make_sbrowser_apk.gni", + "//remoting/host/installer/linux/BUILD.gn", + "//remoting/remoting_version.gni", + "//remoting/host/installer/win/generate_clsids.gni", + + "//terrace/BUILD.gn", + "//terrace/make_terrace_target.gni", + # TODO(dpranke): Get these from the appropriate repos instead. + "//third_party/angle/BUILD.gn", + "//third_party/angle/src/tests/BUILD.gn", + "//third_party/angle/src/vulkan_support/BUILD.gn", + "//third_party/catapult/tracing/BUILD.gn", + "//third_party/google_input_tools/inputview.gni", + "//third_party/skia/gn/shared_sources.gni", + + "//tizen_src/ewk/efl_integration/BUILD.gn", + + # CLD2 should be removed soon, delete this when we do. + "//third_party/cld_2/BUILD.gn", + "//tools/grit/grit_rule.gni", + + # Not gypi-to-gn. + "//google_apis/BUILD.gn", + "//printing/BUILD.gn", + + "//v8/BUILD.gn", + ] diff --git a/tizen_src/BUILD.gn b/tizen_src/BUILD.gn new file mode 100644 index 0000000..3550d31 --- /dev/null +++ b/tizen_src/BUILD.gn @@ -0,0 +1,18 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +#import("//build/config/features.gni") +#import("//tizen_src/supplement.gni") +#import("//build/config/sanitizers/sanitizers.gni") +#import("//build/config/ui.gni") +#import("//build_overrides/v8.gni") +#import("//media/media_options.gni") +#import("//third_party/openh264/openh264_args.gni") + +group("tizen_src_root") { + testonly = true + deps = [ + "//tizen_src/ewk:chromium_efl_all" + ] +} diff --git a/tizen_src/DEPS.efl b/tizen_src/DEPS.efl index 94e8d4d..a354b2b 100644 --- a/tizen_src/DEPS.efl +++ b/tizen_src/DEPS.efl @@ -26,7 +26,7 @@ khronos_cl_api_rev = '6f4be98d10f03ce2b12c769cd9835c73a441c00f' # SVN revision while Blink is still in SVN. blink_upstream_rev = '191638' #TODO(TK) : need to update revision number -efl_integration_branch = 'origin/dev/m53_2785' +efl_integration_branch = 'origin/dev/m63_3239' ct_git = 'ssh://165.213.202.130:29418/webplatform' crosswalk_git = 'https://github.com/crosswalk-project' @@ -46,8 +46,8 @@ solutions = [ ct_git + '/s-chromium.git@' + efl_integration_branch, 'src/third_party/skia': ct_git + '/s-skia.git@' + efl_integration_branch, - 'src/third_party/webrtc': - ct_git + '/s-webrtc.git@' + efl_integration_branch, + #'src/third_party/webrtc': + # ct_git + '/s-webrtc.git@' + efl_integration_branch, 'src/v8': ct_git + '/s-v8.git@' + efl_integration_branch, diff --git a/tizen_src/build/BUILD.gn b/tizen_src/build/BUILD.gn new file mode 100644 index 0000000..4b125f2 --- /dev/null +++ b/tizen_src/build/BUILD.gn @@ -0,0 +1,596 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") +import("//tizen_src/build/config/linux/pkg_config.gni") + +config("evas") { + ldflags = [ "-levas" ] +} + +tizen_pkg_config("libevas") { + packages = [ "evas" ] +} + +config("evas-public") { + #cflags = [ "-evas" ] +} + +config("ecore") { + #TODO: toolsets may be required + #'toolsets': ['host', 'target'], + ldflags = [ "-lecore" ] +} + +tizen_pkg_config("libecore") { + #TODO: toolsets may be required + #'toolsets': ['host', 'target'], + packages = [ "ecore" ] +} + +config("ecore-imf-evas") { + ldflags = [ "-lecore_imf_evas" ] +} + +tizen_pkg_config("libecore-imf-evas") { + packages = [ "ecore-imf-evas" ] +} + +config("ecore-imf-evas-public") { +} + +config("ecore-x") { + if (!use_wayland) { + ldflags = [ "-lecore_x" ] + } +} + +tizen_pkg_config("libecore-x") { + packages = [] + if (!use_wayland) { + packages = [ "ecore-x" ] + } +} + +config("ecore-x-public") { + if (!use_wayland) { + #cflags = [ "-ecore-x" ] + } +} + +config("ecore-wayland") { + if (building_for_tizen && use_wayland) { + ldflags = [ "-lecore_wayland" ] + } +} + +tizen_pkg_config("libecore-wayland") { + packages = [] + if (building_for_tizen && use_wayland) { + packages = [ "ecore-wayland" ] + } +} + +config("ecore-wayland-public") { + if (building_for_tizen && use_wayland) { + cflags = [ "-ecore-wayland" ] + } +} + +config("ecore-evas") { + ldflags = [ "-lecore_evas" ] +} + +tizen_pkg_config("libecore-evas") { + packages = [ "ecore-evas" ] +} + +config("ecore-evas-public") { +} + +config("ecore-input") { + ldflags = [ "-lecore_input" ] +} + +tizen_pkg_config("libecore-input") { + packages = [ "ecore-input" ] +} + +config("ecore-input-public") { + cflags = [ "-ecore-input" ] +} + +config("elementary") { + ldflags = [ + "-lelementary", + "-leet", + "-lefreet", + "-lefreet_mime", + "-lefreet_trash", + ] +} + +tizen_pkg_config("libelementary") { + packages = [ "elementary" ] +} + +config("elementary-public") { + cflags = [] #[ "-elementary" ] + if (is_clang) { + # Fix: elm_prefs_common.h:27:9: warning: empty struct has size 0 in C, size 1 in C++ + cflags += [ "-Wno-extern-c-compat" ] + } +} + +config("edje") { + ldflags = [ "-ledje" ] +} + +tizen_pkg_config("libedje") { + packages = [ "edje" ] +} + +config("edje-public") { + cflags = [ "-edje" ] +} + +config("efl-extension") { + if (building_for_tizen) { + ldflags = [ "-lefl-extension" ] + } +} + +tizen_pkg_config("libefl-extension") { + packages = [] + if (building_for_tizen) { + packages = [ "efl-extension" ] + } +} + +config("efl-extension-public") { + if (building_for_tizen) { + cflags = [ "-efl-extension" ] + } +} + +config("ui-gadget") { + if (building_for_tizen && building_strategy=="ewk") { + ldflags = [ "-lui-gadget-1" ] + } +} + +tizen_pkg_config("libui-gadget") { + packages = [] + if (building_for_tizen && building_strategy=="ewk") { + packages = [ "ui-gadget-1" ] + } +} + +config("ui-gadget-public") { + if (building_for_tizen && building_strategy=="ewk") { + cflags = [ "-DUG_WAYLAND" ] + } +} + +config("capi-appfw-application") { + if (building_for_tizen) { + ldflags = [ "-lcapi-appfw-application" ] + } +} + +tizen_pkg_config("libcapi-appfw-application") { + packages = [] + if (building_for_tizen) { + packages = [ "capi-appfw-application" ] + } +} + +config("capi-appfw-application-public") { + if (building_for_tizen) { +# cflags = [ "-capi-appfw-application" ] + } +} + +config("capi-location-manager") { + if (building_for_tizen && building_strategy=="ewk") { + ldflags = [ "-lcapi-location-manager" ] + } +} + +tizen_pkg_config("libcapi-location-manager") { + packages = [] + if (building_for_tizen && building_strategy=="ewk") { + packages = [ "capi-location-manager" ] + } +} + +config("capi-location-manager-public") { + if (building_for_tizen && building_strategy=="ewk") { + #cflags = [ "-capi-location-manager" ] + } +} + +config("capi-system-info") { + if (building_for_tizen && building_strategy=="ewk") { + ldflags = [ "-lcapi-system-info" ] + } +} + +tizen_pkg_config("libcapi-system-info") { + packages = [] + if (building_for_tizen && building_strategy=="ewk") { + packages = [ "capi-system-info" ] + } +} + +config("capi-system-info-public") { + if (building_for_tizen && building_strategy=="ewk") { + #cflags = [ "-capi-system-info" ] + } +} + +config("capi-system-device") { + if (building_for_tizen_mobile) { + ldflags = [ "-lcapi-system-device" ] + } +} + +tizen_pkg_config("libcapi-system-device") { + packages = [] + if (building_for_tizen_mobile) { + packages = [ "capi-system-device" ] + } +} + +config("capi-system-device-public") { + if (building_for_tizen_mobile) { + #cflags = [ "-capi-system-device" ] + } +} + +config("capi-system-sensor") { + if (building_for_tizen_mobile) { + #ldflags = [ "-capi-system-sensor" ] + } +} + +tizen_pkg_config("libcapi-system-sensor") { + packages = [] + if (building_for_tizen_mobile) { + packages = [ "capi-system-sensor" ] + } +} + +config("capi-system-sensor-public") { + if (building_for_tizen_mobile) { + cflags = [ "-capi-system-sensor" ] + } +} + +config("capi-system-system-settings") { + if (building_for_tizen) { + ldflags = [ "-lcapi-system-system-settings" ] + } +} + +tizen_pkg_config("libcapi-system-system-settings") { + packages = [] + if (building_for_tizen) { + packages = [ "capi-system-system-settings" ] + } +} + +config("capi-system-system-settings-public") { + if (building_for_tizen) { + cflags = [ "-capi-system-system-settings" ] + } +} + +config("libdri2") { + if (building_for_tizen && !use_wayland) { + ldflags = [ "-llibdri2" ] + } +} + +tizen_pkg_config("liblibdri2") { + packages = [] + if (building_for_tizen && !use_wayland) { + packages = [ "libdri2" ] + } +} + +config("libdri2-public") { + if (building_for_tizen && !use_wayland) { + cflags = [ "-libdri2" ] + } +} + +config("libdrm") { + if (building_for_tizen) { + ldflags = [ "-llibdrm" ] + } +} + +tizen_pkg_config("liblibdrm") { + packages = [] + if (building_for_tizen) { + packages = [ "libdrm" ] + } +} + +config("libdrm-public") { + if (building_for_tizen) { + cflags = [ "-libdrm" ] + } +} + +config("libtbm") { + if (building_for_tizen) { + ldflags = [ "-llibtbm" ] + } +} + +tizen_pkg_config("liblibtbm") { + packages = [] + if (building_for_tizen) { + packages = [ "libtbm" ] + } +} + +config("libtbm-public") { + if (building_for_tizen) { + cflags = [ "-libtbm" ] + } +} + +config("x11") { + if (!use_wayland) { + #ldflags = [ "-x11" ] + } +} + +tizen_pkg_config("libx11") { + packages = [] + if (!use_wayland) { + packages = [ "x11" ] + } +} + +config("x11-public") { + if (!use_wayland) { + cflags = [ "-x11" ] + } +} + +config("gstreamer") { + if (chromium_efl_tizen_version >= 24) { + ldflags = [ + "-lgstreamer-1.0", + "-lgstbase-1.0", + "-lgstapp-1.0", + "-lgstpbutils-1.0", + "-lgstvideo-1.0", + ] + } else { # for Tizen v2.X + ldflags = [ + "gstreamer-0.10", + "gstreamer-base-0.10", + "gstreamer-app-0.10", + "gstreamer-pbutils-0.10", + "gstreamer-interfaces-0.10", + "gstreamer-video-0.10", + ] + } +} + +tizen_pkg_config("libgstreamer") { + if (chromium_efl_tizen_version >= 24) { + packages = [ + "gstreamer-1.0", + "gstreamer-base-1.0", + "gstreamer-app-1.0", + "gstreamer-pbutils-1.0", + "gstreamer-video-1.0", + ] + } else { # for Tizen v2.X + packages = [ + "gstreamer-0.10", + "gstreamer-base-0.10", + "gstreamer-app-0.10", + "gstreamer-pbutils-0.10", + "gstreamer-interfaces-0.10", + "gstreamer-video-0.10", + ] + } +} + +config("gstreamer-public") { + #cflags = dependent_pkgs +} + +config("gstreamer-fft") { + ldflags = [ "-gstreamer-fft-1.0" ] +} + +tizen_pkg_config("libgstreamer-fft") { + packages = [ "gstreamer-fft-1.0" ] +} + +config("gstreamer-fft-public") { + cflags = [ "-gstreamer-fft-1.0" ] +} + +config("capi-media-camera") { + if (building_for_tizen) { + #ldflags = [ "-capi-media-camera" ] + } +} + +tizen_pkg_config("libcapi-media-camera") { + packages = [] + if (building_for_tizen) { + packages = [ "capi-media-camera" ] + } +} + +config("capi-media-camera-public") { + if (building_for_tizen) { + #cflags = [ "-capi-media-camera" ] + } +} + +config("capi-media-audio-io") { + if (building_for_tizen) { + ldflags = [ "-lcapi-media-audio-io" ] + } +} + +tizen_pkg_config("libcapi-media-audio-io") { + packages = [] + if (building_for_tizen) { + packages = [ "capi-media-audio-io" ] + } +} + +config("capi-media-audio-io-public") { + if (building_for_tizen) { + cflags = [ "-capi-media-audio-io" ] + } +} + +config("capi-media-player") { + if (building_for_tizen) { + #ldflags = [ "-capi-media-player" ] + } +} + +tizen_pkg_config("libcapi-media-player") { + packages = [] + if (building_for_tizen) { + packages = [ "capi-media-player" ] + } +} + +config("capi-media-player-public") { + if (building_for_tizen) { + cflags = [ "-capi-media-player" ] + } +} + +config("capi-media-tool") { + if (building_for_tizen) { + ldflags = [ "-lcapi-media-tool" ] + } +} + +tizen_pkg_config("libcapi-media-tool") { + packages = [] + if (building_for_tizen) { + packages = [ "capi-media-tool" ] + } +} + +config("capi-media-tool-public") { + if (building_for_tizen) { + cflags = [ "-capi-media-tool" ] + } +} + +config("mm-player") { + if (building_for_tizen) { + ldflags = [ "-lmm-player" ] + } +} + +tizen_pkg_config("libmm-player") { + packages = [] + if (building_for_tizen) { + packages = [ "mm-player" ] + } +} + +config("mm-player-public") { + if (building_for_tizen) { + cflags = [ "-mm-player" ] + } +} + +config("tts") { + if (building_for_tizen) { + ldflags = [ "-ltts" ] + } +} + +tizen_pkg_config("libtts") { + packages = [] + if (building_for_tizen) { + packages = [ "tts" ] + } +} + +config("tts-public") { + if (building_for_tizen) { + cflags = [ "-tts" ] + } +} + +config("vconf") { + if (building_for_tizen) { + ldflags = [ "-lvconf" ] + } +} + +tizen_pkg_config("libvconf") { + packages = [] + if (building_for_tizen) { + packages = [ "vconf" ] + } +} + +config("vconf-public") { + if (building_for_tizen) { + #cflags = [ "-vconf" ] + } +} + +config("feedback") { + if (building_for_tizen && building_strategy=="ewk") { + ldflags = [ "-lfeedback" ] + } +} + +tizen_pkg_config("libfeedback") { + packages = [] + if (building_for_tizen && building_strategy=="ewk") { + packages = [ "feedback" ] + } +} + +config("feedback-public") { + if (building_for_tizen && building_strategy=="ewk") { + #cflags = [ "-feedback" ] + } +} + +config("tizen_tzplatform_config") { + if (chromium_efl_tizen_version >= 30 && is_tizen) { + ldflags = [ + "-ltzplatform-config-static", + "-ltzplatform-config-2.0", + ] + } +} + +tizen_pkg_config("libtizen_tzplatform_config") { + packages = [] + if (chromium_efl_tizen_version >= 30) { + #packages = [ "libtzplatform-config" ] + } +} + +config("tizen_tzplatform_config-public") { + if (chromium_efl_tizen_version >= 30) { + cflags = [ "-libtzplatform-config" ] + } +} diff --git a/tizen_src/build/build_desktop.sh b/tizen_src/build/build_desktop.sh index 576a2c6..1e9463f 100755 --- a/tizen_src/build/build_desktop.sh +++ b/tizen_src/build/build_desktop.sh @@ -7,13 +7,20 @@ trap 'error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT host_arch=$(getHostArch) -if [ -z "$GYP_GENERATOR_OUTPUT" ]; then - export GYP_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" -fi - parseHostBuildScriptParams desktop $@ -JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" +JHBUILD_STAMPFILE="" +if [ "$USE_GN" ]; then + if [ -z "$GN_GENERATOR_OUTPUT" ]; then + export GN_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" + fi + JHBUILD_STAMPFILE="${GN_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" +else + if [ -z "$GYP_GENERATOR_OUTPUT" ]; then + export GYP_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" + fi + JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" +fi forceJHBuildIfNeeded() { if [[ $FORCE_JHBUILD == 1 ]]; then @@ -29,7 +36,12 @@ forceJHBuildIfNeeded() { forceJHBuildIfNeeded -JHBUILD_DEPS="${GYP_GENERATOR_OUTPUT}/Dependencies/Root" +JHBUILD_DEPS="" +if [ "$USE_GN" ]; then + JHBUILD_DEPS="${GN_GENERATOR_OUTPUT}/Dependencies/Root" +else + JHBUILD_DEPS="${GYP_GENERATOR_OUTPUT}/Dependencies/Root" +fi if [ "${host_arch}" == "x64" ]; then _LIBDIR=lib64 elif [ "${host_arch}" == "ia32" ]; then @@ -47,9 +59,29 @@ fi ${SCRIPTDIR}/apply_patches.sh ${SCRIPTDIR}/patches -export __GYP_CHROMIUMEFL_TARGET=desktop +if [ "$USE_GN" ]; then + export __GN_CHROMIUMEFL_TARGET=desktop +else + export __GYP_CHROMIUMEFL_TARGET=desktop +fi -hostGypChromiumEfl +#export BUILD_DEPENDENCIES_LIB_PATH="${JHBUILD_DEPS}/${_LIBDIR}" +#export BUILD_DEPENDENCIES_INCLUDE_PATH="${JHBUILD_DEPS}/include" + +#deps_include_path="\"${JHBUILD_DEPS}/include " +#for module in "${JHBUILD_DEPS}/include/*" +#do +# deps_include_path="$deps_include_path$module " +#done +#deps_include_path="$deps_include_path\"" + +if [ "$USE_GN" ]; then + #hostGnChromiumEfl "deps_include_path=$deps_include_path deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" + hostGnChromiumEfl "deps_include_path=\"${JHBUILD_DEPS}/include\" deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" +# deps_efl_pc_path=\"${JHBUILD_DEPS}/Source/efl-1.16.0/pc\" +else + hostGypChromiumEfl +fi export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}:$LD_LIBRARY_PATH" export PATH="${JHBUILD_DEPS}/bin:$PATH" diff --git a/tizen_src/build/cmd_execution.py b/tizen_src/build/cmd_execution.py new file mode 100644 index 0000000..0159933 --- /dev/null +++ b/tizen_src/build/cmd_execution.py @@ -0,0 +1,17 @@ +#!/usr/bin/env python + +import sys +import os + +if __name__ == '__main__': + + l = len(sys.argv) + c = 1; + cmd = "" + while c < l: + cmd += sys.argv[c] + " " + c += 1 + + os.system(cmd) + + sys.exit(0) diff --git a/tizen_src/build/common.sh b/tizen_src/build/common.sh index 63b0867..1f029d4 100755 --- a/tizen_src/build/common.sh +++ b/tizen_src/build/common.sh @@ -78,6 +78,12 @@ function parseHostBuildScriptParams() { --skip-gyp) export SKIP_GYP=1 ;; + --use-gn) + export USE_GN=1 + ;; + --skip-gn) + export SKIP_GN=1 + ;; --ccache) echo using ccache export USE_CCACHE=1 @@ -137,6 +143,25 @@ function hostGypChromiumEfl() { fi } +function hostGnChromiumEfl() { + if [[ $SKIP_GN != 1 ]]; then + local XWALK_ARG="" + local COMPONENT_ARG="" + if [[ $BUILD_XWALK == 1 ]]; then + XWALK_ARG="xwalk=true" + fi + if [[ $COMPONENT_BUILD == 1 ]]; then + COMPONENT_ARG="component=shared_library" + fi + ${TOPDIR}/tizen_src/build/gn_chromiumefl.sh \ + $XWALK_ARG \ + $COMPONENT_ARG \ + "outdir=\"$TOPDIR/out.$(getHostArch)\"" \ + "chromium_efl_tizen_version=30" \ + $@ + fi +} + function hostNinja() { if [[ $SKIP_NINJA == 0 ]]; then TARGETS="chromium-ewk efl_webprocess efl_webview_app ubrowser" @@ -149,7 +174,15 @@ function hostNinja() { if [[ $BUILD_XWALK == 1 ]]; then TARGETS="$TARGETS xwalk" fi - BUILDDIR=${GYP_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} + if [[ $BUILD_CHROMEDRIVER == 1 ]]; then + TARGETS="$TARGETS chromedriver" + fi + if [ "$USE_GN" ]; then + export BUILD_SUBDIRECTORY="" + BUILDDIR=${GN_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} + else + BUILDDIR=${GYP_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} + fi ninja -C $BUILDDIR ${JOBS} ${TARGETS} fi } @@ -245,6 +278,16 @@ function setupAndExecuteTargetBuild() { count=$(( $count + 1 )) ARGS[$count]="_skip_gyp 1" ;; + --use-gn) + ARGS[$count]=--define + count=$(( $count + 1 )) + ARGS[$count]="_use_gn 1" + ;; + --skip-gn) + ARGS[$count]=--define + count=$(( $count + 1 )) + ARGS[$count]="_skip_gn 1" + ;; --xwalk) ARGS[$count]=--define count=$(( $count + 1 )) diff --git a/tizen_src/build/config/BUILD.gn b/tizen_src/build/config/BUILD.gn new file mode 100644 index 0000000..67a787e --- /dev/null +++ b/tizen_src/build/config/BUILD.gn @@ -0,0 +1,131 @@ +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/features.gni") +import("//build/config/ui.gni") + +# One common error that happens is that GYP-generated headers within gen/ get +# included rather than the GN-generated ones within gen/ subdirectories. +# TODO(agrieve): Remove once GYP is gone (as well as exec_script exception). +#assert( +# exec_script("//build/dir_exists.py", [ "obj.host" ], "string") == "False", +# "GYP artifacts detected in $root_build_dir.$0x0A" + +# "You must wipe this directory before building with GN.") + +# TODO(brettw) Most of these should be removed. Instead of global feature +# flags, we should have more modular flags that apply only to a target and its +# dependents. For example, depending on the "x11" meta-target should define +# USE_X11 for all dependents so that everything that could use X11 gets the +# define, but anything that doesn't depend on X11 doesn't see it. +# +# For now we define these globally to match the current GYP build. +config("tizen_feature_flags") { + defines = [ + # TODO: Check if those defines are still necessary. If they are add an explanation why. + "COMPONENT_BUILD", + "SKIA_DLL", + "BUILDING_V8_SHARED", + "V8_SHARED", + ] + + if (use_efl) { + defines += [ "USE_EFL" ] + } + if (tizen_tbm_support) { + defines += [ "TIZEN_TBM_SUPPORT" ] + } + if (ewk_bringup) { + defines += [ "EWK_BRINGUP" ] + } + + if (prebuilt_ld_gold_dir != "") { + ldflags = [ "-B${prebuilt_ld_gold_dir}" ] + + if (gcc_version >= 49) { + # In GCC 4.9, the linker (either bfd or gold) is called with the -plugin argument + # which our current bundled gold linker (in build/prebuild) does not accept. + # Since our gold a x64 64bit statically linked binary, even if we rebuild it + # with plugin support enabled, the plugin being loaded would be a 32bit ARM binary. + # and load would fail. So we disable linker's plugin loadeir (specifically + # gcc's liblto_plugin). + cflags = [ "-fPIC" ] + ldflags += [ "-shared" ] + ldflags += [ "-fno-use-linker-plugin" ] + } + } + + if (building_for_tizen) { + defines += [ + "OS_TIZEN", + "WTF_OS_TIZEN", + ] + # Tizen build system has a global option '-Wformat-security'. + # So, a cflag '-Wno-format' from chromium-efl needs to be ignored. + # Otherwise, following error will happen. + # error: -Wformat-security ignored without -Wformat [-Werror=format-security] + if (prebuilt_ld_gold_dir == "") { + cflags = [ "-Wno-format" ] + } + + defines += [ "NO_UNWIND_TABLES" ] + + if (chromium_efl_tizen_version == 30) { + defines += [ + "TIZEN_MAJOR_VERSION=3", + "TIZEN_MINOR_VERSION=0", + "TIZEN_PATCH_VERSION=0", + ] + } else if (chromium_efl_tizen_version == 24) { + defines += [ + "TIZEN_MAJOR_VERSION=2", + "TIZEN_MINOR_VERSION=4", + "TIZEN_PATCH_VERSION=0", + ] + } else if (chromium_efl_tizen_version == 23) { + defines += [ + "TIZEN_MAJOR_VERSION=2", + "TIZEN_MINOR_VERSION=3", + "TIZEN_PATCH_VERSION=0", + ] + } + + if (use_wayland) { + defines += [ "USE_WAYLAND" ] + } + if (tizen_multimedia_support) { + defines += [ + "TIZEN_MULTIMEDIA_SUPPORT", + "TIZEN_MULTIMEDIA_USE_CAPI_AUDIO_IO", + ] + } + + # TODO: There are X11 dependencies in following condition. + # The files need to be implemented based on Wayland. + if (wayland_bringup) { + defines += [ "WAYLAND_BRINGUP" ] + } + } + + if (building_for_tizen_mobile) { + defines += [ + "OS_TIZEN_MOBILE", + "WTF_OS_TIZEN_MOBILE", + "TIZEN_CONTENTS_DETECTION", + ] + } + + if (building_for_tizen_tv) { + defines += [ + "OS_TIZEN_TV", + "WTF_OS_TIZEN_TV", + ] + + if (chromium_efl_tizen_version == 24) { + cflags -= [ + "-march=armv7-a", + "-mtune=generic-armv7-a", + ] + } + } +} diff --git a/tizen_src/build/config/BUILDCONFIG.gn b/tizen_src/build/config/BUILDCONFIG.gn new file mode 100644 index 0000000..72d85b1 --- /dev/null +++ b/tizen_src/build/config/BUILDCONFIG.gn @@ -0,0 +1,675 @@ +# Copyright (c) 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# ============================================================================= +# WHAT IS THIS FILE? +# ============================================================================= +# +# This is the master GN build configuration. This file is loaded after the +# build args (args.gn) for the build directory and after the toplevel ".gn" +# file (which points to this file as the build configuration). +# +# This file will be executed and the resulting context will be used to execute +# every other file in the build. So variables declared here (that don't start +# with an underscore) will be implicitly global. + +# ============================================================================= +# PLATFORM SELECTION +# ============================================================================= +# +# There are two main things to set: "os" and "cpu". The "toolchain" is the name +# of the GN thing that encodes combinations of these things. +# +# Users typically only set the variables "target_os" and "target_cpu" in "gn +# args", the rest are set up by our build and internal to GN. +# +# There are three different types of each of these things: The "host" +# represents the computer doing the compile and never changes. The "target" +# represents the main thing we're trying to build. The "current" represents +# which configuration is currently being defined, which can be either the +# host, the target, or something completely different (like nacl). GN will +# run the same build file multiple times for the different required +# configuration in the same build. +# +# This gives the following variables: +# - host_os, host_cpu, host_toolchain +# - target_os, target_cpu, default_toolchain +# - current_os, current_cpu, current_toolchain. +# +# Note the default_toolchain isn't symmetrical (you would expect +# target_toolchain). This is because the "default" toolchain is a GN built-in +# concept, and "target" is something our build sets up that's symmetrical with +# its GYP counterpart. Potentially the built-in default_toolchain variable +# could be renamed in the future. +# +# When writing build files, to do something only for the host: +# if (current_toolchain == host_toolchain) { ... + +if (target_os == "") { + target_os = host_os +} + +if (target_cpu == "") { + if (target_os == "tizen") { + # If we're building for Tizen, we should assume that we want to + # build for ARM by default, not the host_cpu (which is likely x64). + # This allows us to not have to specify both target_os and target_cpu + # on the command line. + target_cpu = "arm" + } else { + target_cpu = host_cpu + } +} + +if (current_cpu == "") { + current_cpu = target_cpu +} +if (current_os == "") { + current_os = target_os +} + +# ============================================================================= +# BUILD FLAGS +# ============================================================================= +# +# This block lists input arguments to the build, along with their default +# values. +# +# If a value is specified on the command line, it will overwrite the defaults +# given in a declare_args block, otherwise the default will be used. +# +# YOU SHOULD ALMOST NEVER NEED TO ADD FLAGS TO THIS FILE. GN allows any file in +# the build to declare build flags. If you need a flag for a single component, +# you can just declare it in the corresponding BUILD.gn file. +# +# - If your feature is a single target, say //components/foo, you can put +# a declare_args() block in //components/foo/BUILD.gn and use it there. +# Nobody else in the build needs to see the flag. +# +# - Defines based on build variables should be implemented via the generated +# build flag header system. See //build/buildflag_header.gni. You can put +# the buildflag_header target in the same file as the build flag itself. You +# should almost never set "defines" directly. +# +# - If your flag toggles a target on and off or toggles between different +# versions of similar things, write a "group" target that forwards to the +# right target (or no target) depending on the value of the build flag. This +# group can be in the same BUILD.gn file as the build flag, and targets can +# depend unconditionally on the group rather than duplicating flag checks +# across many targets. +# +# - If a semi-random set of build files REALLY needs to know about a define and +# the above pattern for isolating the build logic in a forwarding group +# doesn't work, you can put the argument in a .gni file. This should be put +# in the lowest level of the build that knows about this feature (which should +# almost always be outside of the //build directory!). +# +# Other flag advice: +# +# - Use boolean values when possible. If you need a default value that expands +# to some complex thing in the default case (like the location of the +# compiler which would be computed by a script), use a default value of -1 or +# the empty string. Outside of the declare_args block, conditionally expand +# the default value as necessary. +# +# - Use a name like "use_foo" or "is_foo" (whatever is more appropriate for +# your feature) rather than just "foo". +# +# - Write good comments directly above the declaration with no blank line. +# These comments will appear as documentation in "gn args --list". +# +# - Don't call exec_script inside declare_args. This will execute the script +# even if the value is overridden, which is wasteful. See first bullet. + +declare_args() { + # Set to enable the official build level of optimization. This has nothing + # to do with branding, but enables an additional level of optimization above + # release (!is_debug). This might be better expressed as a tri-state + # (debug, release, official) but for historical reasons there are two + # separate flags. + is_official_build = false + + # Debug build. Enabling official builds automatically sets is_debug to false. + is_debug = false + + # Whether we're a traditional desktop unix. + is_desktop_linux = current_os == "linux" + + # Set to true when compiling with the Clang compiler. Typically this is used + # to configure warnings. + is_clang = current_os == "ios" + + # Allows the path to a custom target toolchain to be injected as a single + # argument, and set as the default toolchain. + custom_toolchain = "" + + # This should not normally be set as a build argument. It's here so that + # every toolchain can pass through the "global" value via toolchain_args(). + if (current_os == "tizen") { + host_toolchain = "//tizen_src/build/toolchain/tizen:$host_cpu" + } else { + host_toolchain = "" + } + + # DON'T ADD MORE FLAGS HERE. Read the comment above. +} + +declare_args() { + # Component build. Setting to true compiles targets declared as "components" + # as shared libraries loaded dynamically. This speeds up development time. + # When false, components will be linked statically. + # + # For more information see + # https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md + is_component_build = is_debug && current_os != "ios" +} + +assert(!(is_debug && is_official_build), "Can't do official debug builds") + +# ============================================================================== +# TOOLCHAIN SETUP +# ============================================================================== +# +# Here we set the default toolchain, as well as the variable host_toolchain +# which will identify the toolchain corresponding to the local system when +# doing cross-compiles. When not cross-compiling, this will be the same as the +# default toolchain. +# +# We do this before anything else to make sure we complain about any +# unsupported os/cpu combinations as early as possible. + +if (host_toolchain == "") { + # This should only happen in the top-level context. + # In a specific toolchain context, the toolchain_args() + # block should have propagated a value down. + # TODO(dpranke): Add some sort of assert here that verifies that + # no toolchain omitted host_toolchain from its toolchain_args(). + + if (host_os == "linux") { + if (target_os != "linux") { + # TODO(dpranke) - is_clang normally applies only to the target + # build, and there is no way to indicate that you want to override + # it for both the target build *and* the host build. Do we need to + # support this? + host_toolchain = "//build/toolchain/linux:clang_$host_cpu" + } else if (is_clang) { + host_toolchain = "//build/toolchain/linux:clang_$host_cpu" + } else { + host_toolchain = "//build/toolchain/linux:$host_cpu" + } + } else if (host_os == "mac") { + host_toolchain = "//build/toolchain/mac:clang_$host_cpu" + } else if (host_os == "win") { + # On Windows always use the target CPU for host builds. On the + # configurations we support this will always work and it saves build steps. + if (is_clang) { + host_toolchain = "//build/toolchain/win:clang_$target_cpu" + } else { + host_toolchain = "//build/toolchain/win:$target_cpu" + } + } else { + assert(false, "Unsupported host_os: $host_os") + } +} + +_default_toolchain = "" + +if (target_os == "tizen") { + assert(host_os == "linux" || host_os == "mac", + "Tizen builds are only supported on Linux and Mac hosts.") + if (is_clang) { + _default_toolchain = "//tizen_src/build/toolchain/tizen_clang_$target_cpu" + } else { + _default_toolchain = "//tizen_src/build/toolchain/tizen_$target_cpu" + } +} else if (target_os == "chromeos" || target_os == "linux") { + # See comments in build/toolchain/cros/BUILD.gn about board compiles. + if (is_clang) { + _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" + } else { + _default_toolchain = "//build/toolchain/linux:$target_cpu" + } +} else if (target_os == "ios") { + _default_toolchain = "//build/toolchain/mac:ios_clang_$target_cpu" +} else if (target_os == "mac") { + assert(host_os == "mac", "Mac cross-compiles are unsupported.") + _default_toolchain = host_toolchain +} else if (target_os == "win") { + # On Windows we use the same toolchain for host and target by default. + assert(target_os == host_os, "Win cross-compiles only work on win hosts.") + if (is_clang) { + _default_toolchain = "//build/toolchain/win:clang_$target_cpu" + } else { + _default_toolchain = "//build/toolchain/win:$target_cpu" + } +} else if (target_os == "winrt_81" || target_os == "winrt_81_phone" || + target_os == "winrt_10") { + _default_toolchain = "//build/toolchain/win:winrt_$target_cpu" +} else { + assert(false, "Unsupported target_os: $target_os") +} + +# If a custom toolchain has been set in the args, set it as default. Otherwise, +# set the default toolchain for the platform (if any). +if (custom_toolchain != "") { + set_default_toolchain(custom_toolchain) +} else if (_default_toolchain != "") { + set_default_toolchain(_default_toolchain) +} + +# ============================================================================= +# OS DEFINITIONS +# ============================================================================= +# +# We set these various is_FOO booleans for convenience in writing OS-based +# conditions. +# +# - is_android, is_chromeos, is_ios, and is_win should be obvious. +# - is_mac is set only for desktop Mac. It is not set on iOS. +# - is_posix is true for mac and any Unix-like system (basically everything +# except Windows). +# - is_linux is true for desktop Linux and ChromeOS, but not Android (which is +# generally too different despite being based on the Linux kernel). +# +# Do not add more is_* variants here for random lesser-used Unix systems like +# aix or one of the BSDs. If you need to check these, just check the +# current_os value directly. + +if (current_os == "win" || current_os == "winrt_81" || + current_os == "winrt_81_phone" || current_os == "winrt_10") { + is_android = false + is_chromeos = false + is_ios = false + is_linux = false + is_mac = false + is_nacl = false + is_posix = false + is_win = true + is_tizen = false + use_efl = false +} else if (current_os == "mac") { + is_android = false + is_chromeos = false + is_ios = false + is_linux = false + is_mac = true + is_nacl = false + is_posix = true + is_win = false + is_tizen = false + use_efl = false +} else if (current_os == "tizen") { + is_android = false + is_chromeos = false + is_fuchsia = false + is_ios = false + is_linux = false + is_mac = false + is_nacl = false + is_posix = true + is_win = false + is_tizen = true + use_efl = true + is_official_build = false +} else if (current_os == "nacl") { + # current_os == "nacl" will be passed by the nacl toolchain definition. + # It is not set by default or on the command line. We treat is as a + # Posix variant. + is_android = false + is_chromeos = false + is_ios = false + is_linux = false + is_mac = false + is_nacl = true + is_posix = true + is_win = false + is_tizen = false + use_efl = false +} else if (current_os == "ios") { + is_android = false + is_chromeos = false + is_ios = true + is_linux = false + is_mac = false + is_nacl = false + is_posix = true + is_win = false + is_tizen = false + use_efl = false +} else if (current_os == "linux") { + is_android = false + is_chromeos = false + is_fuchsia = false + is_ios = false + is_linux = true + is_mac = false + is_nacl = false + is_posix = true + is_win = false + is_tizen = false + use_efl = true + is_official_build = false +} + +# ============================================================================= +# SOURCES FILTERS +# ============================================================================= +# +# These patterns filter out platform-specific files when assigning to the +# sources variable. The magic variable |sources_assignment_filter| is applied +# to each assignment or appending to the sources variable and matches are +# automatically removed. +# +# Note that the patterns are NOT regular expressions. Only "*" and "\b" (path +# boundary = end of string or slash) are supported, and the entire string +# must match the pattern (so you need "*.cc" to match all .cc files, for +# example). + +# DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call +# below. +sources_assignment_filter = [] +if (!is_posix) { + sources_assignment_filter += [ + "*_posix.h", + "*_posix.cc", + "*_posix_unittest.h", + "*_posix_unittest.cc", + "*\bposix/*", + ] +} +if (!is_win) { + sources_assignment_filter += [ + "*_win.cc", + "*_win.h", + "*_win_unittest.cc", + "*\bwin/*", + "*.def", + "*.rc", + ] +} +if (!is_mac) { + sources_assignment_filter += [ + "*_mac.h", + "*_mac.cc", + "*_mac.mm", + "*_mac_unittest.h", + "*_mac_unittest.cc", + "*_mac_unittest.mm", + "*\bmac/*", + "*_cocoa.h", + "*_cocoa.cc", + "*_cocoa.mm", + "*_cocoa_unittest.h", + "*_cocoa_unittest.cc", + "*_cocoa_unittest.mm", + "*\bcocoa/*", + ] +} +if (!is_ios) { + sources_assignment_filter += [ + "*_ios.h", + "*_ios.cc", + "*_ios.mm", + "*_ios_unittest.h", + "*_ios_unittest.cc", + "*_ios_unittest.mm", + "*\bios/*", + ] +} +if (!is_mac && !is_ios) { + sources_assignment_filter += [ "*.mm" ] +} +if (!is_linux) { + sources_assignment_filter += [ + "*_linux.h", + "*_linux.cc", + "*_linux_unittest.h", + "*_linux_unittest.cc", + "*\blinux/*", + ] +} +if (!is_android) { + sources_assignment_filter += [ + "*_android.h", + "*_android.cc", + "*_android_unittest.h", + "*_android_unittest.cc", + "*\bandroid/*", + ] +} +if (!is_chromeos) { + sources_assignment_filter += [ + "*_chromeos.h", + "*_chromeos.cc", + "*_chromeos_unittest.h", + "*_chromeos_unittest.cc", + "*\bchromeos/*", + ] +} + +# DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call +# below. + +# Actually save this list. +# +# These patterns are executed for every file in the source tree of every run. +# Therefore, adding more patterns slows down the build for everybody. We should +# only add automatic patterns for configurations affecting hundreds of files +# across many projects in the tree. +# +# Therefore, we only add rules to this list corresponding to platforms on the +# Chromium waterfall. This is not for non-officially-supported platforms +# (FreeBSD, etc.) toolkits, (X11, GTK, etc.), or features. For these cases, +# write a conditional in the target to remove the file(s) from the list when +# your platform/toolkit/feature doesn't apply. +set_sources_assignment_filter(sources_assignment_filter) + +# ============================================================================= +# TARGET DEFAULTS +# ============================================================================= +# +# Set up the default configuration for every build target of the given type. +# The values configured here will be automatically set on the scope of the +# corresponding target. Target definitions can add or remove to the settings +# here as needed. + +# Holds all configs used for running the compiler. +default_compiler_configs = [ + "//build/config:feature_flags", + "//tizen_src/build/config:tizen_feature_flags", + "//build/config/compiler:afdo", + "//build/config/compiler:compiler", + "//build/config/compiler:clang_stackrealign", + "//build/config/compiler:compiler_arm_fpu", + "//build/config/compiler:chromium_code", + "//build/config/compiler:default_include_dirs", + "//tizen_src/build/config/compiler:tizen_default_include_dirs", + "//build/config/compiler:default_optimization", + "//build/config/compiler:default_stack_frames", + "//build/config/compiler:default_symbols", + "//build/config/compiler:no_rtti", + "//build/config/compiler:runtime_library", + "//build/config/compiler:thin_archive", + "//build/config/coverage:default_coverage", + "//build/config/sanitizers:default_sanitizer_flags", +] +if (!is_tizen) { + default_compiler_configs += [ + "//tizen_src/build/config/compiler:tizen_default_lib_dirs", + ] +} +if (is_win) { + default_compiler_configs += [ + "//build/config/win:default_crt", + "//build/config/win:lean_and_mean", + "//build/config/win:nominmax", + "//build/config/win:unicode", + "//build/config/win:winver", + "//build/config/win:vs_code_analysis", + ] +} +if (current_os == "winrt_81" || current_os == "winrt_81_phone" || + current_os == "winrt_10") { + default_compiler_configs += [ "//build/config/win:target_winrt" ] +} +if (is_posix) { + default_compiler_configs += [ + "//build/config/compiler:no_exceptions", + "//build/config/gcc:symbol_visibility_hidden", + ] +} + +if (!use_efl) { + default_compiler_configs += + [ "//build/config/android:default_cygprofile_instrumentation" ] +} + +if (is_clang && !is_nacl) { + default_compiler_configs += [ + "//build/config/clang:find_bad_constructs", + "//build/config/clang:extra_warnings", + ] +} + +# Debug/release-related defines. +if (is_debug) { + default_compiler_configs += [ "//build/config:debug" ] +} else { + default_compiler_configs += [ "//build/config:release" ] +} + +# Static libraries and source sets use only the compiler ones. +set_defaults("static_library") { + configs = default_compiler_configs +} +set_defaults("source_set") { + configs = default_compiler_configs +} + +# Compute the set of configs common to all linked targets (shared libraries, +# loadable modules, executables) to avoid duplication below. +if (is_win) { + # Many targets remove these configs, so they are not contained within + # //build/config:executable_config for easy removal. + _linker_configs = [ + "//build/config/win:default_incremental_linking", + + # Default to console-mode apps. Most of our targets are tests and such + # that shouldn't use the windows subsystem. + "//build/config/win:console", + ] +} else if (is_mac || is_ios) { + _linker_configs = [ "//build/config/mac:strip_all" ] +} else { + _linker_configs = [] +} + +# Executable defaults. +default_executable_configs = default_compiler_configs + [ + "//build/config:default_libs", + "//build/config:executable_config", + ] + _linker_configs +set_defaults("executable") { + configs = default_executable_configs +} + +# Test defaults. +set_defaults("test") { + configs = default_executable_configs +} + +# Shared library and loadable module defaults (also for components in component +# Test defaults.# mode). +default_shared_library_configs = default_compiler_configs + [ + "//build/config:default_libs", + "//build/config:shared_library_config", + ] + _linker_configs +if (!use_efl) { + # Strip native JNI exports from shared libraries by default. Binaries that + # want this can remove this config. + default_shared_library_configs += + [ "//build/config/android:hide_native_jni_exports" ] +} +set_defaults("shared_library") { + configs = default_shared_library_configs +} +set_defaults("loadable_module") { + configs = default_shared_library_configs +} + +# ============================================================================== +# COMPONENT SETUP +# ============================================================================== + +# Defines a component, which equates to a shared_library when +# is_component_build == true and a static_library otherwise. +# +# Use static libraries for the static build rather than source sets because +# many of of our test binaries link many large dependencies but often don't +# use large portions of them. The static libraries are much more efficient to +# link in this situation since only the necessary object files are linked. +# +# The invoker can override the type of the target in the non-component-build +# case by setting static_component_type to either "source_set" or +# "static_library". If unset, the default will be used. +template("component") { + if (is_component_build) { + _component_mode = "shared_library" + } else if (defined(invoker.static_component_type)) { + assert(invoker.static_component_type == "static_library" || + invoker.static_component_type == "source_set") + _component_mode = invoker.static_component_type + } else if (is_android || !defined(invoker.sources)) { + # When there are no sources defined, use a source set to avoid creating + # an empty static library (which generally don't work). + # + # When we changed components to default from source sets to static + # libraries, an Android benchmark regressed slightly + # (https://crbug.com/619593). We don't have a good theory on why this might + # be since theoretically it should be the same. It could be something as + # silly as random code locality luck. + # + # There seems to be no build-time performance hit to using source sets on + # Android (the normal reason for defaulting to static libraries), so we + # make the default on Android to be source set. + # + # If it's been a long time since this was added and you're skeptical, + # please feel free to remove the Android exception and see if any + # benchmarks obviously regress. If not, it would be great to standardize + # with the rest of the platforms. + _component_mode = "source_set" + } else { + _component_mode = "static_library" + } + target(_component_mode, target_name) { + # Explicitly forward visibility, implicitly forward everything else. + # Forwarding "*" doesn't recurse into nested scopes (to avoid copying all + # globals into each template invocation), so won't pick up file-scoped + # variables. Normally this isn't too bad, but visibility is commonly + # defined at the file scope. Explicitly forwarding visibility and then + # excluding it from the "*" set works around this problem. + # See http://crbug.com/594610 + forward_variables_from(invoker, [ "visibility" ]) + forward_variables_from(invoker, "*", [ "visibility" ]) + + # All shared libraries must have the sanitizer deps to properly link in + # asan mode (this target will be empty in other cases). + if (!defined(deps)) { + deps = [] + } + deps += [ "//build/config:exe_and_shlib_deps" ] + } +} + +# Component defaults +set_defaults("component") { + if (is_component_build) { + configs = default_shared_library_configs + if (is_android) { + configs -= [ "//build/config/android:hide_native_jni_exports" ] + } + } else { + configs = default_compiler_configs + } +} diff --git a/tizen_src/build/config/compiler/BUILD.gn b/tizen_src/build/config/compiler/BUILD.gn new file mode 100644 index 0000000..dc194a3 --- /dev/null +++ b/tizen_src/build/config/compiler/BUILD.gn @@ -0,0 +1,131 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { + if (is_tizen) { + deps_include_path = "/usr/include" + deps_lib_path = "/usr/lib" + } else { + deps_include_path = "" + } +} + +config("tizen_default_lib_dirs") { + lib_dirs = [ + ] +} + +config("tizen_default_include_dirs") { + include_dirs = [ + "//tizen_src", + "//tizen_src/chromium_impl", + "//tizen_src/ecore_wrapper", + + "//third_party/blink/renderer", + + deps_include_path, + # find / -name *.h -printf '%h\n' | sort --unique + "$deps_include_path/dbus-1.0", + "$deps_include_path/ecore-1", + "$deps_include_path/ecore-audio-1", + "$deps_include_path/ecore-audio-cxx-1", + "$deps_include_path/ecore-avahi-1", + "$deps_include_path/ecore-con-1", + "$deps_include_path/ecore-cxx-1", + "$deps_include_path/ecore-evas-1", + "$deps_include_path/ecore-file-1", + "$deps_include_path/ecore-imf-1", + "$deps_include_path/ecore-imf-evas-1", + "$deps_include_path/ecore-input-1", + "$deps_include_path/ecore-input-evas-1", + "$deps_include_path/ecore-ipc-1", + "$deps_include_path/ecore-x-1", + "$deps_include_path/ector-1", + "$deps_include_path/ector-1/cairo", + "$deps_include_path/ector-1/generic", + "$deps_include_path/ector-1/software", + "$deps_include_path/edje-1", + "$deps_include_path/eet-1", + "$deps_include_path/eet-cxx-1", + "$deps_include_path/eet-cxx-1/eet-cxx", + "$deps_include_path/eeze-1", + "$deps_include_path/efl-1", + "$deps_include_path/efl-1/interfaces", + "$deps_include_path/efl-cxx-1", + "$deps_include_path/efreet-1", + "$deps_include_path/eina-1", + "$deps_include_path/eina-1/eina", + "$deps_include_path/eina-cxx-1", + "$deps_include_path/eina-cxx-1/eina-cxx", + "$deps_include_path/eio-1", + "$deps_include_path/eio-cxx-1", + "$deps_include_path/eldbus-1", + "$deps_include_path/eldbus_cxx-1", + "$deps_include_path/elementary-1", + "$deps_include_path/elementary-cxx-1", + "$deps_include_path/elocation-1", + "$deps_include_path/elua-1", + "$deps_include_path/embryo-1", + "$deps_include_path/emile-1", + "$deps_include_path/emotion-1", + "$deps_include_path/eo-1", + "$deps_include_path/eo-cxx-1", + "$deps_include_path/eolian-1", + "$deps_include_path/eolian-cxx-1", + "$deps_include_path/eolian-cxx-1/grammar", + "$deps_include_path/ethumb-1", + "$deps_include_path/ethumb-client-1", + "$deps_include_path/evas-1", + "$deps_include_path/evas-1/canvas", + "$deps_include_path/evas-cxx-1", + "$deps_include_path/evas-cxx-1/canvas", + "$deps_include_path/gio-unix-2.0", + "$deps_include_path/gio-unix-2.0/gio", + "$deps_include_path/glib-2.0", + "$deps_include_path/glib-2.0/gio", + "$deps_include_path/glib-2.0/glib", + "$deps_include_path/glib-2.0/glib/deprecated", + "$deps_include_path/glib-2.0/gobject", + "$deps_include_path/gstreamer-1.0", + "$deps_include_path/gstreamer-1.0/gst", + "$deps_include_path/gstreamer-1.0/gst/allocators", + "$deps_include_path/gstreamer-1.0/gst/app", + "$deps_include_path/gstreamer-1.0/gst/audio", + "$deps_include_path/gstreamer-1.0/gst/base", + "$deps_include_path/gstreamer-1.0/gst/basecamerabinsrc", + "$deps_include_path/gstreamer-1.0/gst/check", + "$deps_include_path/gstreamer-1.0/gst/codecparsers", + "$deps_include_path/gstreamer-1.0/gst/controller", + "$deps_include_path/gstreamer-1.0/gst/egl", + "$deps_include_path/gstreamer-1.0/gst/fft", + "$deps_include_path/gstreamer-1.0/gst/insertbin", + "$deps_include_path/gstreamer-1.0/gst/interfaces", + "$deps_include_path/gstreamer-1.0/gst/mpegts", + "$deps_include_path/gstreamer-1.0/gst/net", + "$deps_include_path/gstreamer-1.0/gst/pbutils", + "$deps_include_path/gstreamer-1.0/gst/riff", + "$deps_include_path/gstreamer-1.0/gst/rtp", + "$deps_include_path/gstreamer-1.0/gst/rtsp", + "$deps_include_path/gstreamer-1.0/gst/sdp", + "$deps_include_path/gstreamer-1.0/gst/tag", + "$deps_include_path/gstreamer-1.0/gst/uridownloader", + "$deps_include_path/gstreamer-1.0/gst/video", + "$deps_include_path/libsoup-2.4", + "$deps_include_path/libsoup-2.4/libsoup", + "$deps_include_path/orc-0.4", + "$deps_include_path/orc-0.4/orc", + "$deps_include_path/orc-0.4/orc-test", + ] + + if (is_tizen) { + include_dirs += [ + "$deps_include_path/appfw", + "$deps_include_path/system", + + "$deps_lib_path/dbus-1.0/include", + "$deps_lib_path/gstreamer-1.0/include", + "$deps_lib_path/gstreamer-1.0/include/gst", + ] + } +} diff --git a/tizen_src/build/config/linux/pkg_config.gni b/tizen_src/build/config/linux/pkg_config.gni new file mode 100644 index 0000000..19f6d5c --- /dev/null +++ b/tizen_src/build/config/linux/pkg_config.gni @@ -0,0 +1,33 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/linux/pkg_config.gni") + +template("tizen_pkg_config") { + assert(defined(invoker.packages), + "Variable |packages| must be defined to be a list in pkg_config.") + + if (invoker.packages == []) { + config(target_name) { + } + } else { + pkg_config(target_name) { + packages = invoker.packages + + if (defined(invoker.extra_args)) { + extra_args = invoker.extra_args + } + + if (defined(invoker.ignore_libs)) { + ignore_libs = invoker.ignore_libs + } + + forward_variables_from(invoker, + [ + "defines", + "visibility", + ]) + } + } +} diff --git a/tizen_src/build/config/tizen/BUILD.gn b/tizen_src/build/config/tizen/BUILD.gn new file mode 100644 index 0000000..4c1430a --- /dev/null +++ b/tizen_src/build/config/tizen/BUILD.gn @@ -0,0 +1,156 @@ +# Copyright 2014 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/sanitizers/sanitizers.gni") +import("//build/config/sysroot.gni") + +assert(is_tizen) + +# This is included by reference in the //build/config/compiler config that +# is applied to all targets. It is here to separate out the logic that is +# Android-only. +config("compiler") { + cflags = [ + "-ffunction-sections", + "-fno-short-enums", + ] + ldflags = [] + + if (!is_clang) { + # Clang doesn't support these flags. + cflags += [ "-finline-limit=64" ] + } + if (is_clang) { + rebased_android_toolchain_root = + rebase_path(android_toolchain_root, root_build_dir) + assert(rebased_android_toolchain_root != "") # Mark as used. + if (current_cpu == "mipsel") { + cflags += [ + # TODO(gordanac) Enable integrated-as. + "-no-integrated-as", + "-B${rebased_android_toolchain_root}/bin", # Else /usr/bin/as gets picked up. + ] + } + } + + # Use gold for Android for most CPU architectures. + if (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm") { + if (linux_use_gold_flags == true) { + cflags += [ "-Wno-deprecated" ] + ldflags += [ "-fuse-ld=gold" ] + } + if (is_clang) { + # Let clang find the ld.gold in the NDK. + ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ] + } + + # Use -mstackrealign due to a bug on ia32 Jelly Bean. + # See crbug.com/521527 + if (current_cpu == "x86") { + cflags += [ "-mstackrealign" ] + } + } + + if (current_cpu == "mipsel" && is_clang) { + # Let clang find the ld.bfd in the NDK. + ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ] + } + + ldflags += [ + #"-Wl,--build-id=sha1", + #"-Wl,--no-undefined", + + # Don't allow visible symbols from libgcc or libc++ to be + # re-exported. + "-Wl,--exclude-libs=libgcc.a", + "-Wl,--exclude-libs=libc++_static.a", + + # Don't allow visible symbols from libraries that contain + # assembly code with symbols that aren't hidden properly. + # http://crbug.com/448386 + "-Wl,--exclude-libs=libvpx_assembly_arm.a", + ] + + if (is_clang) { + if (current_cpu == "arm") { + abi_target = "arm-linux-androideabi" + } else if (current_cpu == "x86") { + abi_target = "i686-linux-androideabi" + } else if (current_cpu == "arm64") { + # Place holder for arm64 support, not tested. + # TODO: Enable clang support for Android Arm64. http://crbug.com/539781 + abi_target = "aarch64-linux-androideabi" + } else if (current_cpu == "x64") { + # Place holder for x64 support, not tested. + # TODO: Enable clang support for Android x64. http://crbug.com/539781 + abi_target = "x86_64-linux-androideabi" + } else if (current_cpu == "mipsel") { + abi_target = "mipsel-linux-android" + } else if (current_cpu == "mips64el") { + # Place holder for mips64 support, not tested. + abi_target = "mips64el-linux-androideabi" + } else { + assert(false, "Architecture not supported") + } + cflags += [ + "-target", + abi_target, + ] + ldflags += [ + "-target", + abi_target, + ] + } + + # Assign any flags set for the C compiler to asmflags so that they are sent + # to the assembler. + asmflags = cflags +} + +config("executable_config") { + cflags = [ "-fPIE" ] + asmflags = [ "-fPIE" ] + ldflags = [ "-pie" ] +} + +config("hide_native_jni_exports") { + ldflags = [ "-Wl,--version-script=" + + rebase_path("//build/android/android_no_jni_exports.lst") ] +} + +# Instrumentation ------------------------------------------------------------- +# +# The BUILDCONFIG file sets the "default_cygprofile_instrumentation" config on +# targets by default. You can override whether the cygprofile instrumentation is +# used on a per-target basis: +# +# configs -= [ "//build/config/android:default_cygprofile_instrumentation" ] +# configs += [ "//build/config/android:no_cygprofile_instrumentation" ] + +#config("default_cygprofile_instrumentation") { +# if (use_order_profiling) { +# configs = [ ":cygprofile_instrumentation" ] +# } else { +# configs = [ ":no_cygprofile_instrumentation" ] +# } +#} + +config("cygprofile_instrumentation") { + defines = [ "CYGPROFILE_INSTRUMENTATION=1" ] + cflags = [ "-finstrument-functions" ] + + if (!is_clang) { + cflags += [ + # Allow mmx intrinsics to inline, so that the compiler can expand the intrinsics. + "-finstrument-functions-exclude-file-list=mmintrin.h", + + # Avoid errors with current NDK: + # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426:3: error: argument must be a constant" + "-finstrument-functions-exclude-file-list=arm_neon.h", + ] + } +} + +config("no_cygprofile_instrumentation") { +} diff --git a/tizen_src/build/config/tizen_features.gni b/tizen_src/build/config/tizen_features.gni new file mode 100644 index 0000000..b5e4f0b --- /dev/null +++ b/tizen_src/build/config/tizen_features.gni @@ -0,0 +1,87 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/ui.gni") + +declare_args() { + gcc_version = 49 + + use_wayland = false + + linux_use_gold_flags = false # no use of this variable, if removing then revome from gn_chromiumefl.sh also + + deps_lib_path = "" + disable_fatal_linker_warnings = true # no use of this variable, if removing then revome from gn_chromiumefl.sh also + + python_ver = "2.5" # no use of this variable, if removing then revome from gn_chromiumefl.sh also + + depth = "" # no use of this variable, if removing then revome from gn_chromiumefl.sh also + outdir = "" + + use_cairo = false + use_pango = false + + tizen_multimedia_support = false + werror=false + # declared from BUILDCONFIG.gn + #is_clang = false + xwalk_link_against_chromium_ewk = false + + tizen_mobile = false + building_for_tizen_tv = false + building_for_tizen_mobile = false + if (is_tizen && tizen_multimedia_support) { + tizen_multimedia_eme_support = true + } else { + tizen_multimedia_eme_support = false + } + + exe_dir = "/usr/lib/chromium-efl/" + edje_dir = "/usr/share/chromium-efl/themes/" + tizen_data_dir = "/usr/share/chromium-efl/" + locale_dir = "/usr/share/chromium-efl/locale/" + + prebuilt_ld_gold_dir = "" + chromium_efl_tizen_version = 24 + tizen_tbm_support = false + building_for_tizen = false +} + +werror = false + +# This file should contain gn code that is supposed to be common +# for all build targets we have in chromium-ewk. Things specific only to one +# component should go to appropriate gni file included below. + +use_gstreamer_fft = false + +use_aura = false + +ewk_bringup = true +wayland_bringup = use_wayland + +building_strategy = "ewk" # 'ewk', 'libs' and 'crosswalk-bin' + +compile_suid_client = true +compile_credentials = true + +edje_compiler = "edje_cc" + +grit_additional_defines = "-Duse_aura" + +if (use_ozone) { + # Declared from the //build/config/ui.gni + #use_glib = true + external_ozone_platforms = [ "efl" ] +} + +if (xwalk_link_against_chromium_ewk) { + import("//tizen_src/ewk/efl_integration/link_xwalk_against_chromium_efl.gni") +} + +is_official_build = false + +treat_warnings_as_errors=werror + +use_x11=false diff --git a/tizen_src/build/gn_chromiumefl b/tizen_src/build/gn_chromiumefl new file mode 100755 index 0000000..52d6101 --- /dev/null +++ b/tizen_src/build/gn_chromiumefl @@ -0,0 +1,164 @@ +#!/usr/bin/env python + +import argparse +import glob +import os +import shlex +import subprocess +import sys + +top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) +if '--xwalk' in sys.argv: + xwalk_dir = os.path.join(top_dir, '..', 'xwalk') + sys.argv.remove('--xwalk') +else: + xwalk_dir = None +chrome_src = os.environ.get('CHROME_SRC') +if chrome_src: + chrome_src = os.path.abspath(chrome_src) +if not chrome_src or not os.path.isdir(chrome_src): + chrome_src = os.path.join(top_dir, '..') + print 'CHROME_SRC not set, falling back to ' + chrome_src + +script_dir = os.path.abspath(os.path.join(chrome_src, 'build')) +if not os.path.isdir(script_dir): + print script_dir + " is not a valid directory" + sys.exit(1) + +sys.path.insert(0, script_dir) +import gn_helpers + + +# Add paths so that pymod_do_main(...) can import files. +sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers')) +sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit')) + +# Remove the above and keep the line below once we require a newer specific +# Chromium revision. +sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', + 'Source', 'build', 'scripts')) +sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build')) +sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build')) + +def GetOutputDirectory(): + """Returns the output directory that GN will use.""" + + # Handle command line generator flags. + parser = argparse.ArgumentParser() + parser.add_argument('-G', dest='genflags', default=[], action='append') + genflags = parser.parse_known_args()[0].genflags + + # Handle generator flags from the environment. + genflags += shlex.split(os.environ.get('GN_GENERATOR_FLAGS', '')) + + needle = 'output_dir=' + for item in genflags: + if item.startswith(needle): + return item[len(needle):] + + return 'out' + + +if __name__ == '__main__': + arg = 0 + args = [] + for i in range(len(sys.argv)): + if arg > 0: + args[arg] += " " + sys.argv[i]; + continue + if sys.argv[i] in ("--args="): + args.append(sys.argv[i]) + arg=i + else: + args.append(sys.argv[i]) + + # On Mac we want to override CXX and CC that is provided with + # the Chromium GYP environment. + if sys.platform.startswith('darwin'): + os.environ['CXX'] = 'clang++' + os.environ['CC'] = 'clang' + + #gyp_helper.apply_chromium_gyp_env() + +# args.extend(['-I' + i for i in additional_include_files(args)]) + + # On Mac we want to build in x64 mode. And we want to use libc++. + # Even though we are not on linux, it seems we specifically have to disable linux_use_tcmalloc. + if sys.platform in ('darwin',): + args[arg] += " host_arch=\"x64\" use_libcpp=true linux_use_tcmalloc=false" + + # There shouldn't be a circular dependency relationship between .gyp files, + # but in Chromium's .gyp files, on non-Mac platforms, circular relationships + # currently exist. The check for circular dependencies is currently + # bypassed on other platforms, but is left enabled on the Mac, where a + # violation of the rule causes Xcode to misbehave badly. + # TODO(mark): Find and kill remaining circular dependencies, and remove this + # option. http://crbug.com/35878. + # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the + # list. + #if sys.platform not in ('darwin',): + # args[arg] += " no_circular_check=true" + + # the top_level source directory is the first common ancestor of our module and the chromium source tree for the build to be sane. + # commonprefix works on a character basis, so it might return a phony common prefix (not the common parent directory we expect), + toplevel= os.path.commonprefix([top_dir, chrome_src]) + + if not os.path.exists(toplevel): + toplevel = os.path.join(toplevel, os.pardir) + #args[arg] += " toplevel-dir=\"" + toplevel + "\"" + # Tweak the output location. + #args[arg] += "generator-output=\"" + os.path.abspath(GetOutputDirectory()) + "\"" + #args[arg] += " Goutput_dir=\"" + os.path.abspath(GetOutputDirectory()) + "\"" + #args[arg] += " check=true" + + # gyp on gbs fails with multiprocessing.SemLock() not implemented + # disabling parallel gyp for gbs + gbs_build = os.environ.get('BUILDING_WITH_GBS') + #if gbs_build: + #args[arg] += " no-parallel=true" + + os.environ["CHROMIUM_BUILDTOOLS_PATH"]=os.path.join(chrome_src, "buildtools") + + #notifications -> enable_notifications in build/config/features.gni + #args[arg] += " ewk_bringup=false xwalk_link_against_chromium_ewk=false notifications=false" + args[arg] += " xwalk_link_against_chromium_ewk=false" + + args[arg] += " gcc_version=49" # It should be in condition for arm target + + args.append("--defines=USE_EFL") + args.append("-v") + + buildtools_path = os.environ.get('CHROMIUM_BUILDTOOLS_PATH') + host_arch = os.environ.get('HOST_ARCH') + if not buildtools_path: + print "build tool path is empty" + sys.exit(1) + else: + if sys.platform.startswith(('cygwin', 'win')): + subdir = 'win' + elif sys.platform == 'darwin': + subdir = 'mac' + elif host_arch.startswith('arm'): + buildtools_path = os.path.join(buildtools_path, "../tizen_src/buildtools/") + subdir = 'arm' + elif sys.platform.startswith('linux'): + subdir = 'linux64' + else: + raise Error('Unknown platform: ' + sys.platform) + + bin_path = os.path.join(buildtools_path, subdir) + + exeSuffix = '' + if sys.platform.startswith(('cygwin', 'win')): + exeSuffix = '.exe' + elif host_arch.startswith('arm'): + exeSuffix = '.arm' + + gn_path = os.path.join(bin_path, 'gn' + exeSuffix) + if not os.path.exists(gn_path): + print 'Could not find gn executable at: %s' % gn_path + sys.exit(2) + else: + print 'Updating projects from gn files...' + sys.exit(subprocess.call([gn_path] + args[1:])) + diff --git a/tizen_src/build/gn_chromiumefl.sh b/tizen_src/build/gn_chromiumefl.sh new file mode 100755 index 0000000..03d27b3 --- /dev/null +++ b/tizen_src/build/gn_chromiumefl.sh @@ -0,0 +1,308 @@ +#!/bin/bash + +source $(dirname $0)/common.sh +trap 'error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT +host_arch=$(getHostArch) +export HOST_ARCH=$host_arch + +supported_targets=("mobile" "tv" "desktop") + +if [ -z "$GN_GENERATOR_OUTPUT" ]; then + GN_GENERATOR_OUTPUT="out.${host_arch}" +fi + +echo ${host_arch} +echo $GN_GENERATOR_OUTPUT + +if [ -z "$GN_GENERATOR_FLAG" ]; then + export GN_GENERATOR_FLAG=$GN_GENERATOR_OUTPUT +fi + +EXTRA_GN_ARGS="$@" + +# __GN_CHROMIUMEFL_TARGET is defined when we are called from build_desktop.sh. +# Otherwise we are called by gbs whch already passes the correct building_for_* flag. +if [ "$__GN_CHROMIUMEFL_TARGET" == "desktop" ]; then + target=desktop +fi + +while [[ $# > 0 ]]; do + case "$1" in + building_for_tizen_*=true) + buildType="gbs" + target=$(echo $1 | sed -e 's/building_for_tizen_\(.*\)=true/\1/') + target_arch="arm" + ;; + chromium_efl_tizen_version=*) + tizen_version=$(echo $1 | sed -e 's#chromium_efl_tizen_version\=\([0-9.]*\)#\1#') + ;; + tizen_emulator_support=1) + tizen_emulator_support=1 + ;; + #use_wayland=true) + # use_wayland=true + # ;; + --xwalk) + building_xwalk=1 + ;; + building_crosswalk_bin=*) + building_xwalk_for_development=1 + ;; + esac + shift; +done + +findElementInArray "$target" "${supported_targets[@]}" +if [[ $? == 1 ]]; then + echo "Unsupported target: $target" + exit 1 +fi + +if [ "$__GN_CHROMIUMEFL_TARGET" == "crosscompile" ]; then + buildType=crosscompile + EXTRA_GN_ARGS+=" edje_compiler=${TOPDIR}/out.${host_arch}/Dependencies/Root/bin/edje_cc" +fi + +ORIGINAL_GN_DEFINES="$GN_DEFINES" +export GN_DEFINES=$(echo "$GN_DEFINES" | sed -e 's/component\s*=\s*shared_library//g') +if [ "$ORIGINAL_GN_DEFINES" != "$GN_DEFINES" ]; then + echo "WARNING: component build is not supported." + echo "Removing component=shared_library from GN_DEFINES." +fi + +COMMON_GN_PARAMETERS=" + use_libjpeg_turbo=true + proprietary_codecs=true + use_alsa=false + use_aura=false + use_kerberos=false + use_ozone=true + ozone_auto_platforms=false + ozone_platform_wayland=false + is_desktop_linux=false + use_pango=false + use_cairo=false + enable_plugins=true + enable_extensions=true + use_cups=false + use_allocator=\"none\" + disable_fatal_linker_warnings=true + depth=\"${TOPDIR}\" + use_libpci=false + " + # Moved it in //tizen_src/build/config/BUILDCONFIG.gn + # use_efl=true + # declared also from build config + # is_desktop_linux=false + # declared also from //build/config/features.gni + # proprietary_codecs=true + # enable_plugins=true + +if [ "$building_xwalk" == "1" ] && [ "$building_xwalk_for_development" != "1" ]; then + COMMON_GN_PARAMETERS+=" + xwalk_link_against_chromium_ewk=true + " +fi + +add_desktop_flags() { + clang="true" + if [ "$USECLANG" == "0" ]; then + clang="false" + fi + ADDITIONAL_GN_PARAMETERS+="building_for_tizen=false + building_for_tizen_mobile=false + building_for_tizen_tv=false + is_clang=${clang} + werror=false + use_sysroot=false + use_wayland=false + target_os="\"linux\"" + target_cpu=\"${host_arch}\" + " +} + +add_arm_flags() { + ADDITIONAL_GN_PARAMETERS+="armv7=true + arm_thumb=true + arm_use_neon=true + " +} + +add_tizen_flags() { + ADDITIONAL_GN_PARAMETERS+="building_for_tizen=true + python_ver=\"$(getPythonVersion)\" + enable_basic_printing=true + enable_print_preview=true + is_clang=false + linux_use_bundled_binutils=false + enable_nacl=false + tizen_multimedia_eme_support=false + target_os="\"tizen\"" + " + # We do not need it + # tizen=true + # not used any place + # linux_use_bundled_gold=false + # declared also from //build/config/features.gni + #enable_basic_printing=true + #enable_print_preview=true + #It is defined from //build/toolchain/gcc_toolchain.gni + #is_clang=false + + # TODO(youngsoo): Once binutils-gold issue on tizen v3.0 ARM 64bit is fixed, + # make the latest tizen version unconditional. + if [ "$tizen_version" == "30" ] && [ "$host_arch" == "arm" ]; then + # [M48_2564] Temporary disabling the flag for switching to new chromium + # FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15383 + ADDITIONAL_GN_PARAMETERS+="linux_use_gold_flags=true + " + #prebuilt_ld_gold_dir=\"${TOPDIR}/tizen_src/build/prebuild\" + #" + elif [ "$tizen_version" == "24" -a "$target" == "tv" ]; then + ADDITIONAL_GN_PARAMETERS+="linux_use_gold_flags=false + prebuilt_ld_gold_dir=\"${TOPDIR}/tizen_src/build/prebuild/tizen_v2.4_tv\" + " + else + ADDITIONAL_GN_PARAMETERS+="linux_use_gold_flags=false + prebuilt_ld_gold_dir=\"${TOPDIR}/tizen_src/build/prebuild\" + " + fi + + if [ "$tizen_version" == "30" ]; then + # [M49_2623] Temporary disabling the flag. + # FIXME: http://165.213.149.170/jira/browse/TWF-610 + ADDITIONAL_GN_PARAMETERS+="tizen_multimedia_support=false + tizen_tbm_support=false + " + else + ADDITIONAL_GN_PARAMETERS+="tizen_multimedia_support=false + werror=false + " + fi + + # use_wayland come from spec file and based on that wayland_bringup sets in tizen_features.gni + #add_wayland_flags +} + +add_wayland_flags() { + if [ "$use_wayland" == "true" ]; then + ADDITIONAL_GN_PARAMETERS+="use_wayland=true + wayland_bringup=true + " + else + ADDITIONAL_GN_PARAMETERS+="use_wayland=false + wayland_bringup=false + " + fi +} + +add_gbs_flags() { + # target_arch changed to target_cpu but not changed because it seems that + # it is used for gbs and added target_cpu also. + ADDITIONAL_GN_PARAMETERS+="target_cpu=\"${host_arch}\" + " + # sysroot="" + #" + #no-parallel=true + #" + # TODO(b.kelemen): ideally crosscompile should also support system libs. + # Unfortunately the gbs root doesn't contain everything chromium needs. +# SYSTEM_DEPS="-Duse_system_expat=true +# -Duse_system_libjpeg=false +# -Duse_system_libpng=true +# -Duse_system_libusb=true +# -Duse_system_libxml=true +# -Duse_system_libxslt=true +# -Duse_system_re2=true +# -Duse_system_zlib=true +# " + SYSTEM_DEPS="" #"--system-libraries + #libxml + #" + + # [M50_2661] Temporary using the icu of internal chformium instead of system. + # The icu of system doesn't support utrie2.h + # FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-967 +# SYSTEM_DEPS+="-Duse_system_icu=false +# " + + if [ "$target" == "mobile" ]; then +# SYSTEM_DEPS+="-Duse_system_bzip2=true +# -Duse_system_libexif=true +# -Duse_system_nspr=true +# " + SYSTEM_DEPS+=" + " + fi +} + +add_cross_flags() { + # target_arch changed to target_cpu but not changed because it seems that + # it is used for gbs and added target_cpu also. + ADDITIONAL_GN_PARAMETERS+="target_cpu=\"arm\" + sysroot=\"$SYSROOTDIR\" + arm_tune=\"arm7\" + " + + # Compiling yasm with crosscompile + icecc leads to some strange errors (one file is built for target instead of host). + # Yasm is an assembler used only by the build (not at runtime) and it is generally available in Linux distros so let's just + # use it from the system. + ADDITIONAL_GN_PARAMETERS+="use_system_yasm=true" +} + +if [ "$target" == "desktop" ]; then + add_desktop_flags +else + add_tizen_flags + if [ "$target" == "mobile" -o "$target" == "tv" ]; then + if [ "$target_arch" == "arm" ]; then + add_arm_flags + fi + if [ "$buildType" == "gbs" ]; then + add_gbs_flags + elif [ "$buildType" == "crosscompile" ]; then + add_cross_flags + fi + fi + if [ "$SYSTEM_DEPS" != "" ]; then + #replacing original files with correct ones according to $SYSTEM_DEPS + $TOPDIR/build/linux/unbundle/replace_gn_files.py $SYSTEM_DEPS + fi +fi + +_GN_ARGS=" + gen + $GN_GENERATOR_FLAG + --root=${TOPDIR} + --dotfile=${TOPDIR}/tizen_src/.gn + --args= + $COMMON_GN_PARAMETERS + $SYSTEM_DEPS + $ADDITIONAL_GN_PARAMETERS + $EXTRA_GN_ARGS + " +printf "GN_ARGUMENTS:\n" +for arg in $_GN_ARGS; do + printf " * ${arg##-D}\n" +done + +if [ -f "${TOPDIR}/BUILD_.gn" ]; then + rm "${TOPDIR}/BUILD.gn" +else + mv "${TOPDIR}/BUILD.gn" "${TOPDIR}/BUILD_.gn" +fi +ln -s "${TOPDIR}/tizen_src/BUILD.gn" "${TOPDIR}/BUILD.gn" + +${TOPDIR}/tizen_src/build/gn_chromiumefl \ + ${_GN_ARGS} + +ret=$? + +mv ${TOPDIR}/BUILD_.gn ${TOPDIR}/BUILD.gn + +if [ "$SYSTEM_DEPS" != "" ]; then + # Restore gn files to their original states not to mess up the tree permanently. + $TOPDIR/build/linux/unbundle/replace_gn_files.py --undo $SYSTEM_DEPS +fi + +exit $ret diff --git a/tizen_src/build/jhbuild/jhbuildrc b/tizen_src/build/jhbuild/jhbuildrc index 6ae610c..8a90c1b 100644 --- a/tizen_src/build/jhbuild/jhbuildrc +++ b/tizen_src/build/jhbuild/jhbuildrc @@ -30,7 +30,10 @@ moduleset = [ __moduleset_file_uri, ] __extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",") modules = [ 'chromeefl-dependencies', ] -outdir = os.environ.get('GYP_GENERATOR_OUTPUT', 'out') +if os.environ['USE_GN']: + outdir = os.environ.get('GN_GENERATOR_OUTPUT', 'out') +else: + outdir = os.environ.get('GYP_GENERATOR_OUTPUT', 'out') checkoutroot = os.path.abspath(os.path.join(outdir,'Dependencies', 'Source')) prefix = os.path.abspath(os.path.join(outdir,'Dependencies', 'Root')) diff --git a/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff b/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff index 75cbc03..7f9e74d 100644 --- a/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff +++ b/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff @@ -192,7 +192,7 @@ BUG=XWALK-2571 + + 'dependencies': [ + '../ui/accessibility/accessibility.gyp:ax_gen', -+ '../third_party/WebKit/public/blink_headers.gyp:blink_headers', ++ '../third_party/blink/public/blink_headers.gyp:blink_headers', + '../skia/skia.gyp:skia', + + '../device/battery/battery.gyp:device_battery_mojo_bindings', @@ -208,7 +208,7 @@ BUG=XWALK-2571 + # The public content API headers directly include Blink API headers, so we + # have to export the blink header settings so that relative paths in these + # headers resolve correctly. -+ '../third_party/WebKit/public/blink_headers.gyp:blink_headers', ++ '../third_party/blink/public/blink_headers.gyp:blink_headers', + # The public render_widget_host.h needs to re-export skia defines. + '../skia/skia.gyp:skia', + 'content_common_mojo_bindings.gyp:content_common_mojo_bindings', @@ -603,10 +603,10 @@ BUG=XWALK-2571 'type': '<(component)', 'variables': { 'enable_wexit_time_desctructors': 1, }, 'defines': [ ---- src/third_party/WebKit/public/blink.gyp -+++ src/third_party/WebKit/public/blink.gyp +--- src/third_party/blink/public/blink.gyp ++++ src/third_party/blink/public/blink.gyp @@ -36,17 +36,18 @@ - # GN version: //third_party/WebKit/public:blink + # GN version: //third_party/blink/public:blink 'target_name': 'blink', 'type': 'none', - 'dependencies': [ diff --git a/tizen_src/build/patches/gn_build_is_tizen_on_ffmpeg.diff b/tizen_src/build/patches/gn_build_is_tizen_on_ffmpeg.diff new file mode 100644 index 0000000..342adbf --- /dev/null +++ b/tizen_src/build/patches/gn_build_is_tizen_on_ffmpeg.diff @@ -0,0 +1,100 @@ +diff --git a/third_party/ffmpeg/ffmpeg_generated.gni b/third_party/ffmpeg/ffmpeg_generated.gni +index e952679..d0208c7 100644 +--- a/third_party/ffmpeg/ffmpeg_generated.gni ++++ b/third_party/ffmpeg/ffmpeg_generated.gni +@@ -12,7 +12,7 @@ ffmpeg_c_sources = [] + ffmpeg_gas_sources = [] + ffmpeg_yasm_sources = [] + +-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) { ++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium") || is_tizen) { + ffmpeg_c_sources += [ + "libavcodec/allcodecs.c", + "libavcodec/autorename_libavcodec_utils.c", +@@ -146,7 +146,7 @@ if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "C + ] + } + +-if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) { ++if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium") || is_tizen) { + ffmpeg_c_sources += [ + "libavcodec/h264pred.c", + "libavcodec/hpeldsp.c", +@@ -167,7 +167,7 @@ if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "C + ] + } + +-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) { ++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || is_tizen) { + ffmpeg_c_sources += [ + "libavcodec/aac_ac3_parser.c", + "libavcodec/aac_parser.c", +@@ -255,7 +255,7 @@ if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chr + ] + } + +-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) { ++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || is_tizen) { + ffmpeg_c_sources += [ + "libavcodec/arm/fft_fixed_init_arm.c", + "libavcodec/arm/fft_init_arm.c", +@@ -282,7 +282,7 @@ if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chr + ] + } + +-if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) { ++if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || is_tizen) { + ffmpeg_c_sources += [ + "libavcodec/arm/h264pred_init_arm.c", + "libavcodec/arm/hpeldsp_init_arm.c", +@@ -302,7 +302,7 @@ if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chr + ] + } + +-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) { ++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_tizen && arm_use_neon)) { + ffmpeg_c_sources += [ + "libavutil/arm/float_dsp_init_neon.c", + ] +@@ -361,7 +361,7 @@ if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_l + ] + } + +-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) { ++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || is_tizen) { + ffmpeg_c_sources += [ + "libavcodec/arm/aacpsdsp_init_arm.c", + "libavcodec/arm/mpegaudiodsp_init_arm.c", +@@ -483,7 +483,7 @@ if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chr + ] + } + +-if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) { ++if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_tizen && arm_use_neon)) { + ffmpeg_c_sources += [ + "libavcodec/arm/hpeldsp_init_neon.c", + "libavcodec/arm/vp8dsp_init_neon.c", +diff --git a/third_party/ffmpeg/ffmpeg_options.gni b/third_party/ffmpeg/ffmpeg_options.gni +index 6bb719a..44735d6 100644 +--- a/third_party/ffmpeg/ffmpeg_options.gni ++++ b/third_party/ffmpeg/ffmpeg_options.gni +@@ -47,8 +47,10 @@ assert(ffmpeg_branding == "Chromium" || + + if (current_cpu == "x86") { + ffmpeg_arch = "ia32" +-} else if (current_cpu == "arm" && arm_version >= 7 && arm_use_neon) { ++} else if ((current_cpu == "arm" || is_tizen) && arm_version >= 7 && arm_use_neon) { + ffmpeg_arch = "arm-neon" ++} else if (is_tizen) { ++ ffmpeg_arch = "arm" + } else { + ffmpeg_arch = current_cpu + } +@@ -61,6 +63,6 @@ os_config = current_os + if ((is_linux || is_chromeos) && is_msan) { + os_config = "linux-noasm" + disable_ffmpeg_asm = true +-} else if (is_chromeos) { ++} else if (is_chromeos || is_tizen) { + os_config = "linux" + } diff --git a/tizen_src/build/toolchain/tizen/BUILD.gn b/tizen_src/build/toolchain/tizen/BUILD.gn new file mode 100644 index 0000000..af68b41 --- /dev/null +++ b/tizen_src/build/toolchain/tizen/BUILD.gn @@ -0,0 +1,70 @@ +# Copyright 2013 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/sysroot.gni") # Imports android/config.gni. +import("//build/toolchain/gcc_toolchain.gni") + +template("tizen_gcc_toolchain") { + gcc_toolchain(target_name) { + + is_clang = invoker.is_clang + if (is_clang) { + prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", + root_build_dir) + cc = "$prefix/clang" + cxx = "$prefix/clang++" + } else { + cc = "gcc" + cxx = "g++" + } + ar = cc + "-ar" + ld = cxx + readelf = "readelf" + nm = "nm" + #strip = "strip" + + # Don't use .cr.so for loadable_modules since they are always loaded via + # absolute path. + loadable_module_extension = ".so" + + toolchain_os = "tizen" + toolchain_cpu = invoker.toolchain_cpu + use_goma = false + } +} + +template("tizen_gcc_toolchains_helper") { + tizen_gcc_toolchain(target_name) { + toolchain_cpu = invoker.toolchain_cpu + } + + tizen_gcc_toolchain("clang_$target_name") { + toolchain_cpu = invoker.toolchain_cpu + is_clang = true + } +} + +tizen_gcc_toolchains_helper("x86") { + toolchain_cpu = "x86" +} + +tizen_gcc_toolchains_helper("arm") { + toolchain_cpu = "arm" +} + +tizen_gcc_toolchains_helper("mipsel") { + toolchain_cpu = "mipsel" +} + +tizen_gcc_toolchains_helper("x64") { + toolchain_cpu = "x86_64" +} + +tizen_gcc_toolchains_helper("arm64") { + toolchain_cpu = "aarch64" +} + +tizen_gcc_toolchains_helper("mips64el") { + toolchain_cpu = "mipsel64el" +} diff --git a/tizen_src/buildtools/arm/gn.arm b/tizen_src/buildtools/arm/gn.arm new file mode 100644 index 0000000..e69de29 diff --git a/tizen_src/chromium-efl-gn.patch b/tizen_src/chromium-efl-gn.patch new file mode 100644 index 0000000..0c0514d --- /dev/null +++ b/tizen_src/chromium-efl-gn.patch @@ -0,0 +1,5851 @@ +diff --git a/.gn b/.gn +new file mode 100644 +index 0000000..53ef4d0 +--- /dev/null ++++ b/.gn +@@ -0,0 +1,253 @@ ++# This file is used by the GN meta build system to find the root of the source ++# tree and to set startup options. For documentation on the values set in this ++# file, run "gn help dotfile" at the command line. ++ ++# The location of the build configuration file. ++buildconfig = "//tizen_src/build/config/BUILDCONFIG.gn" ++ ++# The secondary source root is a parallel directory tree where ++# GN build files are placed when they can not be placed directly ++# in the source tree, e.g. for third party source trees. ++secondary_source = "//build/secondary/" ++ ++# These are the targets to check headers for by default. The files in targets ++# matching these patterns (see "gn help label_pattern" for format) will have ++# their includes checked for proper dependencies when you run either ++# "gn check" or "gn gen --check". ++check_targets = [ ++ #"//apps/*", # Medium-hard. ++ "//ash/*", ++ "//base/*", ++ "//blink/*", ++ "//breakpad/*", ++ "//build/*", ++ "//cc/*", ++ ++ #"//chrome/*", # Epic number of errors. ++ "//chrome/app/*", ++ "//chrome/common/*", ++ "//chrome/installer/*", ++ "//chrome/third_party/mozilla_security_manager/*", ++ "//chrome/tools/*", ++ "//chrome/utility/*", ++ "//chromecast/*", ++ "//chrome_elf/*", ++ "//cloud_print/*", ++ "//components/*", ++ ++ #"//content/*", # A whole lot of errors. ++ "//content/gpu/*", ++ "//content/public/*", ++ "//content/renderer/*", ++ ++ #"//content/shell/*", # Needs Android fix, bug 597020. ++ ++ #"//content/test/*", # A couple of errors left. ++ "//content/test:content_gl_benchmark", ++ "//content/test:content_gl_tests", ++ "//content/test:content_perftests", ++ "//content/test:content_site_isolation_browsertests", ++ "//content/test:content_test_mojo_bindings", ++ "//content/test:content_unittests", ++ "//content/test:test_support", ++ "//courgette/*", ++ "//crypto/*", ++ "//data/*", ++ "//dbus/*", ++ "//device/*", ++ ++ #"//extensions/*", # Lots of errors. ++ "//gin/*", ++ "//google_apis/*", ++ "//google_update/*", ++ "//gpu/*", ++ ++ #"//ios/*", ++ "//ipc/*", ++ ++ #"//jingle/*", ++ "//mash/*", ++ ++ #"//media/*", # Lots of errors. ++ "mojo/*", ++ ++ #"//native_client/*", ++ "//net/*", ++ ++ #"//pdf/*", # Medium-hard. ++ #"//ppapi/*", # Lots of errors. ++ "//ppapi/examples/*", ++ "//printing/*", ++ ++ #"//remoting/*", # Medium-hard. ++ "//rlz/*", ++ ++ #"//sandbox/*", # Medium-hard. ++ "//sdch/*", ++ "//skia/*", ++ "//sql/*", ++ "//storage/*", ++ "//sync/*", ++ "//testing/*", ++ ++ #"//third_party/*", # May not ever want this. ++ "//third_party/hunspell/*", ++ "//third_party/kasko/*", ++ "//third_party/libaddressinput/*", ++ "//third_party/libphonenumber/*", ++ "//third_party/blink/renderer/*", ++ "//tools/*", ++ ++ #"//ui/*", # Work left on Chromeos w/ use_ozone. Some parts of UI that work: ++ "//ui/accessibility/*", ++ "//ui/android/*", ++ "//ui/app_list/*", ++ "//ui/aura/*", ++ "//ui/aura_extra/*", ++ "//ui/base/*", ++ "//ui/chromeos/*", ++ "//ui/compositor/*", ++ "//ui/display/*", ++ "//ui/events:events", # Specifically avoid //ui/events/ozone ++ "//ui/events:events_base", ++ "//ui/events:events_unittests", ++ "//ui/file_manager/*", ++ "//ui/gfx/*", ++ "//ui/gl/*", ++ "//ui/keyboard/*", ++ "//ui/login/*", ++ "//ui/message_center/*", ++ "//ui/mojo/*", ++ "//ui/native_theme/*", ++ "//ui/platform_window/*", ++ "//ui/resources/*", ++ "//ui/shell_dialogs/*", ++ "//ui/snapshot/*", ++ "//ui/strings/*", ++ "//ui/surface/*", ++ "//ui/touch_selection/*", ++ "//ui/views/*", ++ "//ui/views_content_client/*", ++ "//ui/web_dialogs/*", ++ "//ui/webui/*", ++ "//ui/wm/*", ++ "//url/*", ++ "//v8/*", ++ "//win8/*", ++] ++ ++# These are the list of GN files that run exec_script. This whitelist exists ++# to force additional review for new uses of exec_script, which is strongly ++# discouraged except for gypi_to_gn calls. ++exec_script_whitelist = [ ++ "//android_webview/BUILD.gn", ++ "//ash/BUILD.gn", ++ "//build/config/BUILD.gn", ++ "//build/config/android/config.gni", ++ "//build/config/android/internal_rules.gni", ++ "//build/config/android/rules.gni", ++ "//build/config/compiler/BUILD.gn", ++ "//build/config/gcc/gcc_version.gni", ++ "//build/config/ios/ios_sdk.gni", ++ "//build/config/linux/BUILD.gn", ++ "//build/config/linux/pkg_config.gni", ++ "//build/config/mac/mac_sdk.gni", ++ "//build/config/posix/BUILD.gn", ++ "//build/config/sysroot.gni", ++ "//build/config/win/BUILD.gn", ++ "//build/config/win/visual_studio_version.gni", ++ "//build/gn_helpers.py", ++ "//build/gypi_to_gn.py", ++ "//build/linux/BUILD.gn", ++ "//build/toolchain/concurrent_links.gni", ++ "//build/toolchain/gcc_toolchain.gni", ++ "//build/toolchain/mac/BUILD.gn", ++ "//build/toolchain/nacl/BUILD.gn", ++ "//build/toolchain/win/BUILD.gn", ++ "//build/util/version.gni", ++ "//chrome/android/BUILD.gn", ++ "//chrome/browser/BUILD.gn", ++ "//chrome/browser/chromeos/BUILD.gn", ++ "//chrome/browser/extensions/BUILD.gn", ++ "//chrome/browser/resources/chromeos/chromevox/BUILD.gn", ++ "//chrome/browser/media/router/BUILD.gn", ++ "//chrome/browser/ui/BUILD.gn", ++ "//chrome/chrome_tests.gni", ++ "//chrome/common/BUILD.gn", ++ "//chrome/common/extensions/api/schemas.gni", ++ "//chrome/renderer/BUILD.gn", ++ "//chrome/test/BUILD.gn", ++ "//chrome/utility/BUILD.gn", ++ "//chromeos/BUILD.gn", ++ ++ # TODO(dgn): Layer violation but breaks the build otherwise, see ++ # https://crbug.com/474506 ++ "//clank/java/BUILD.gn", ++ "//clank/native/BUILD.gn", ++ ++ "//components/domain_reliability/BUILD.gn", ++ "//content/browser/browser.gni", ++ "//content/child/child.gni", ++ "//content/common/common.gni", ++ "//content/public/android/BUILD.gn", ++ "//content/renderer/renderer.gni", ++ "//content/test/BUILD.gn", ++ "//content/utility/utility.gni", ++ "//extensions/common/api/schemas.gni", ++ "//extensions/extensions.gni", ++ "//extensions/shell/app_shell.gni", ++ "//extensions/shell/common/api/schemas.gni", ++ "//google_apis/BUILD.gn", ++ "//gpu/gles2_conform_support/BUILD.gn", ++ "//gpu/khronos_glcts_support/BUILD.gn", ++ "//jingle/BUILD.gn", ++ "//net/BUILD.gn", ++ "//ppapi/ppapi_sources.gni", ++ "//printing/BUILD.gn", ++ "//remoting/host/BUILD.gn", ++ "//remoting/remoting_srcs.gni", ++ "//remoting/remoting_version.gni", ++ "//skia/BUILD.gn", ++ "//sync/protocol/protocol_sources.gni", ++ "//third_party/android_platform/BUILD.gn", ++ "//third_party/angle/BUILD.gn", ++ "//third_party/angle/src/tests/BUILD.gn", ++ "//third_party/boringssl/BUILD.gn", ++ "//third_party/catapult/tracing/BUILD.gn", ++ "//third_party/cld_2/BUILD.gn", ++ "//third_party/cython/rules.gni", ++ "//third_party/google_input_tools/inputview.gni", ++ "//third_party/harfbuzz-ng/BUILD.gn", ++ "//third_party/libaddressinput/BUILD.gn", ++ "//third_party/opus/BUILD.gn", ++ "//third_party/openh264/BUILD.gn", ++ "//third_party/blink/renderer/bindings/bindings.gni", ++ "//third_party/blink/renderer/bindings/scripts/scripts.gni", ++ "//third_party/blink/renderer/config.gni", ++ "//third_party/blink/renderer/core/core.gni", ++ "//third_party/blink/renderer/devtools/BUILD.gn", ++ "//third_party/blink/renderer/modules/modules.gni", ++ "//third_party/blink/renderer/platform/BUILD.gn", ++ "//third_party/blink/renderer/platform/platform.gni", ++ "//third_party/blink/renderer/web/BUILD.gn", ++ "//third_party/blink/renderer/wtf/BUILD.gn", ++ "//third_party/blink/public/BUILD.gn", ++ "//tools/gn/BUILD.gn", ++ "//tools/gn/build_settings.h", ++ "//tools/gn/command_help.cc", ++ "//tools/gn/docs/language.md", ++ "//tools/gn/format_test_data/053.gn", ++ "//tools/gn/format_test_data/053.golden", ++ "//tools/gn/format_test_data/055.gn", ++ "//tools/gn/format_test_data/055.golden", ++ "//tools/gn/function_exec_script.cc", ++ "//tools/gn/gn.gyp", ++ "//tools/gn/input_conversion.cc", ++ "//tools/gn/misc/emacs/gn.el", ++ "//tools/gn/misc/vim/syntax/gn.vim", ++ "//tools/gn/setup.cc", ++ "//ui/accessibility/BUILD.gn", ++ "//ui/views/BUILD.gn", ++ "//v8/test/cctest/BUILD.gn", ++ "//v8/test/unittests/BUILD.gn", ++] +diff --git a/BUILD.gn b/BUILD.gn +new file mode 100644 +index 0000000..3550d31 +--- /dev/null ++++ b/BUILD.gn +@@ -0,0 +1,18 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++#import("//build/config/features.gni") ++#import("//tizen_src/supplement.gni") ++#import("//build/config/sanitizers/sanitizers.gni") ++#import("//build/config/ui.gni") ++#import("//build_overrides/v8.gni") ++#import("//media/media_options.gni") ++#import("//third_party/openh264/openh264_args.gni") ++ ++group("tizen_src_root") { ++ testonly = true ++ deps = [ ++ "//tizen_src/ewk:chromium_efl_all" ++ ] ++} +diff --git a/build/BUILD.gn b/build/BUILD.gn +new file mode 100644 +index 0000000..4b125f2 +--- /dev/null ++++ b/build/BUILD.gn +@@ -0,0 +1,596 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++import("//tizen_src/build/config/linux/pkg_config.gni") ++ ++config("evas") { ++ ldflags = [ "-levas" ] ++} ++ ++tizen_pkg_config("libevas") { ++ packages = [ "evas" ] ++} ++ ++config("evas-public") { ++ #cflags = [ "-evas" ] ++} ++ ++config("ecore") { ++ #TODO: toolsets may be required ++ #'toolsets': ['host', 'target'], ++ ldflags = [ "-lecore" ] ++} ++ ++tizen_pkg_config("libecore") { ++ #TODO: toolsets may be required ++ #'toolsets': ['host', 'target'], ++ packages = [ "ecore" ] ++} ++ ++config("ecore-imf-evas") { ++ ldflags = [ "-lecore_imf_evas" ] ++} ++ ++tizen_pkg_config("libecore-imf-evas") { ++ packages = [ "ecore-imf-evas" ] ++} ++ ++config("ecore-imf-evas-public") { ++} ++ ++config("ecore-x") { ++ if (!use_wayland) { ++ ldflags = [ "-lecore_x" ] ++ } ++} ++ ++tizen_pkg_config("libecore-x") { ++ packages = [] ++ if (!use_wayland) { ++ packages = [ "ecore-x" ] ++ } ++} ++ ++config("ecore-x-public") { ++ if (!use_wayland) { ++ #cflags = [ "-ecore-x" ] ++ } ++} ++ ++config("ecore-wayland") { ++ if (building_for_tizen && use_wayland) { ++ ldflags = [ "-lecore_wayland" ] ++ } ++} ++ ++tizen_pkg_config("libecore-wayland") { ++ packages = [] ++ if (building_for_tizen && use_wayland) { ++ packages = [ "ecore-wayland" ] ++ } ++} ++ ++config("ecore-wayland-public") { ++ if (building_for_tizen && use_wayland) { ++ cflags = [ "-ecore-wayland" ] ++ } ++} ++ ++config("ecore-evas") { ++ ldflags = [ "-lecore_evas" ] ++} ++ ++tizen_pkg_config("libecore-evas") { ++ packages = [ "ecore-evas" ] ++} ++ ++config("ecore-evas-public") { ++} ++ ++config("ecore-input") { ++ ldflags = [ "-lecore_input" ] ++} ++ ++tizen_pkg_config("libecore-input") { ++ packages = [ "ecore-input" ] ++} ++ ++config("ecore-input-public") { ++ cflags = [ "-ecore-input" ] ++} ++ ++config("elementary") { ++ ldflags = [ ++ "-lelementary", ++ "-leet", ++ "-lefreet", ++ "-lefreet_mime", ++ "-lefreet_trash", ++ ] ++} ++ ++tizen_pkg_config("libelementary") { ++ packages = [ "elementary" ] ++} ++ ++config("elementary-public") { ++ cflags = [] #[ "-elementary" ] ++ if (is_clang) { ++ # Fix: elm_prefs_common.h:27:9: warning: empty struct has size 0 in C, size 1 in C++ ++ cflags += [ "-Wno-extern-c-compat" ] ++ } ++} ++ ++config("edje") { ++ ldflags = [ "-ledje" ] ++} ++ ++tizen_pkg_config("libedje") { ++ packages = [ "edje" ] ++} ++ ++config("edje-public") { ++ cflags = [ "-edje" ] ++} ++ ++config("efl-extension") { ++ if (building_for_tizen) { ++ ldflags = [ "-lefl-extension" ] ++ } ++} ++ ++tizen_pkg_config("libefl-extension") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "efl-extension" ] ++ } ++} ++ ++config("efl-extension-public") { ++ if (building_for_tizen) { ++ cflags = [ "-efl-extension" ] ++ } ++} ++ ++config("ui-gadget") { ++ if (building_for_tizen && building_strategy=="ewk") { ++ ldflags = [ "-lui-gadget-1" ] ++ } ++} ++ ++tizen_pkg_config("libui-gadget") { ++ packages = [] ++ if (building_for_tizen && building_strategy=="ewk") { ++ packages = [ "ui-gadget-1" ] ++ } ++} ++ ++config("ui-gadget-public") { ++ if (building_for_tizen && building_strategy=="ewk") { ++ cflags = [ "-DUG_WAYLAND" ] ++ } ++} ++ ++config("capi-appfw-application") { ++ if (building_for_tizen) { ++ ldflags = [ "-lcapi-appfw-application" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-appfw-application") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "capi-appfw-application" ] ++ } ++} ++ ++config("capi-appfw-application-public") { ++ if (building_for_tizen) { ++# cflags = [ "-capi-appfw-application" ] ++ } ++} ++ ++config("capi-location-manager") { ++ if (building_for_tizen && building_strategy=="ewk") { ++ ldflags = [ "-lcapi-location-manager" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-location-manager") { ++ packages = [] ++ if (building_for_tizen && building_strategy=="ewk") { ++ packages = [ "capi-location-manager" ] ++ } ++} ++ ++config("capi-location-manager-public") { ++ if (building_for_tizen && building_strategy=="ewk") { ++ #cflags = [ "-capi-location-manager" ] ++ } ++} ++ ++config("capi-system-info") { ++ if (building_for_tizen && building_strategy=="ewk") { ++ ldflags = [ "-lcapi-system-info" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-system-info") { ++ packages = [] ++ if (building_for_tizen && building_strategy=="ewk") { ++ packages = [ "capi-system-info" ] ++ } ++} ++ ++config("capi-system-info-public") { ++ if (building_for_tizen && building_strategy=="ewk") { ++ #cflags = [ "-capi-system-info" ] ++ } ++} ++ ++config("capi-system-device") { ++ if (building_for_tizen_mobile) { ++ ldflags = [ "-lcapi-system-device" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-system-device") { ++ packages = [] ++ if (building_for_tizen_mobile) { ++ packages = [ "capi-system-device" ] ++ } ++} ++ ++config("capi-system-device-public") { ++ if (building_for_tizen_mobile) { ++ #cflags = [ "-capi-system-device" ] ++ } ++} ++ ++config("capi-system-sensor") { ++ if (building_for_tizen_mobile) { ++ #ldflags = [ "-capi-system-sensor" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-system-sensor") { ++ packages = [] ++ if (building_for_tizen_mobile) { ++ packages = [ "capi-system-sensor" ] ++ } ++} ++ ++config("capi-system-sensor-public") { ++ if (building_for_tizen_mobile) { ++ cflags = [ "-capi-system-sensor" ] ++ } ++} ++ ++config("capi-system-system-settings") { ++ if (building_for_tizen) { ++ ldflags = [ "-lcapi-system-system-settings" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-system-system-settings") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "capi-system-system-settings" ] ++ } ++} ++ ++config("capi-system-system-settings-public") { ++ if (building_for_tizen) { ++ cflags = [ "-capi-system-system-settings" ] ++ } ++} ++ ++config("libdri2") { ++ if (building_for_tizen && !use_wayland) { ++ ldflags = [ "-llibdri2" ] ++ } ++} ++ ++tizen_pkg_config("liblibdri2") { ++ packages = [] ++ if (building_for_tizen && !use_wayland) { ++ packages = [ "libdri2" ] ++ } ++} ++ ++config("libdri2-public") { ++ if (building_for_tizen && !use_wayland) { ++ cflags = [ "-libdri2" ] ++ } ++} ++ ++config("libdrm") { ++ if (building_for_tizen) { ++ ldflags = [ "-llibdrm" ] ++ } ++} ++ ++tizen_pkg_config("liblibdrm") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "libdrm" ] ++ } ++} ++ ++config("libdrm-public") { ++ if (building_for_tizen) { ++ cflags = [ "-libdrm" ] ++ } ++} ++ ++config("libtbm") { ++ if (building_for_tizen) { ++ ldflags = [ "-llibtbm" ] ++ } ++} ++ ++tizen_pkg_config("liblibtbm") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "libtbm" ] ++ } ++} ++ ++config("libtbm-public") { ++ if (building_for_tizen) { ++ cflags = [ "-libtbm" ] ++ } ++} ++ ++config("x11") { ++ if (!use_wayland) { ++ #ldflags = [ "-x11" ] ++ } ++} ++ ++tizen_pkg_config("libx11") { ++ packages = [] ++ if (!use_wayland) { ++ packages = [ "x11" ] ++ } ++} ++ ++config("x11-public") { ++ if (!use_wayland) { ++ cflags = [ "-x11" ] ++ } ++} ++ ++config("gstreamer") { ++ if (chromium_efl_tizen_version >= 24) { ++ ldflags = [ ++ "-lgstreamer-1.0", ++ "-lgstbase-1.0", ++ "-lgstapp-1.0", ++ "-lgstpbutils-1.0", ++ "-lgstvideo-1.0", ++ ] ++ } else { # for Tizen v2.X ++ ldflags = [ ++ "gstreamer-0.10", ++ "gstreamer-base-0.10", ++ "gstreamer-app-0.10", ++ "gstreamer-pbutils-0.10", ++ "gstreamer-interfaces-0.10", ++ "gstreamer-video-0.10", ++ ] ++ } ++} ++ ++tizen_pkg_config("libgstreamer") { ++ if (chromium_efl_tizen_version >= 24) { ++ packages = [ ++ "gstreamer-1.0", ++ "gstreamer-base-1.0", ++ "gstreamer-app-1.0", ++ "gstreamer-pbutils-1.0", ++ "gstreamer-video-1.0", ++ ] ++ } else { # for Tizen v2.X ++ packages = [ ++ "gstreamer-0.10", ++ "gstreamer-base-0.10", ++ "gstreamer-app-0.10", ++ "gstreamer-pbutils-0.10", ++ "gstreamer-interfaces-0.10", ++ "gstreamer-video-0.10", ++ ] ++ } ++} ++ ++config("gstreamer-public") { ++ #cflags = dependent_pkgs ++} ++ ++config("gstreamer-fft") { ++ ldflags = [ "-gstreamer-fft-1.0" ] ++} ++ ++tizen_pkg_config("libgstreamer-fft") { ++ packages = [ "gstreamer-fft-1.0" ] ++} ++ ++config("gstreamer-fft-public") { ++ cflags = [ "-gstreamer-fft-1.0" ] ++} ++ ++config("capi-media-camera") { ++ if (building_for_tizen) { ++ #ldflags = [ "-capi-media-camera" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-media-camera") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "capi-media-camera" ] ++ } ++} ++ ++config("capi-media-camera-public") { ++ if (building_for_tizen) { ++ #cflags = [ "-capi-media-camera" ] ++ } ++} ++ ++config("capi-media-audio-io") { ++ if (building_for_tizen) { ++ ldflags = [ "-lcapi-media-audio-io" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-media-audio-io") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "capi-media-audio-io" ] ++ } ++} ++ ++config("capi-media-audio-io-public") { ++ if (building_for_tizen) { ++ cflags = [ "-capi-media-audio-io" ] ++ } ++} ++ ++config("capi-media-player") { ++ if (building_for_tizen) { ++ #ldflags = [ "-capi-media-player" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-media-player") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "capi-media-player" ] ++ } ++} ++ ++config("capi-media-player-public") { ++ if (building_for_tizen) { ++ cflags = [ "-capi-media-player" ] ++ } ++} ++ ++config("capi-media-tool") { ++ if (building_for_tizen) { ++ ldflags = [ "-lcapi-media-tool" ] ++ } ++} ++ ++tizen_pkg_config("libcapi-media-tool") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "capi-media-tool" ] ++ } ++} ++ ++config("capi-media-tool-public") { ++ if (building_for_tizen) { ++ cflags = [ "-capi-media-tool" ] ++ } ++} ++ ++config("mm-player") { ++ if (building_for_tizen) { ++ ldflags = [ "-lmm-player" ] ++ } ++} ++ ++tizen_pkg_config("libmm-player") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "mm-player" ] ++ } ++} ++ ++config("mm-player-public") { ++ if (building_for_tizen) { ++ cflags = [ "-mm-player" ] ++ } ++} ++ ++config("tts") { ++ if (building_for_tizen) { ++ ldflags = [ "-ltts" ] ++ } ++} ++ ++tizen_pkg_config("libtts") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "tts" ] ++ } ++} ++ ++config("tts-public") { ++ if (building_for_tizen) { ++ cflags = [ "-tts" ] ++ } ++} ++ ++config("vconf") { ++ if (building_for_tizen) { ++ ldflags = [ "-lvconf" ] ++ } ++} ++ ++tizen_pkg_config("libvconf") { ++ packages = [] ++ if (building_for_tizen) { ++ packages = [ "vconf" ] ++ } ++} ++ ++config("vconf-public") { ++ if (building_for_tizen) { ++ #cflags = [ "-vconf" ] ++ } ++} ++ ++config("feedback") { ++ if (building_for_tizen && building_strategy=="ewk") { ++ ldflags = [ "-lfeedback" ] ++ } ++} ++ ++tizen_pkg_config("libfeedback") { ++ packages = [] ++ if (building_for_tizen && building_strategy=="ewk") { ++ packages = [ "feedback" ] ++ } ++} ++ ++config("feedback-public") { ++ if (building_for_tizen && building_strategy=="ewk") { ++ #cflags = [ "-feedback" ] ++ } ++} ++ ++config("tizen_tzplatform_config") { ++ if (chromium_efl_tizen_version >= 30 && is_tizen) { ++ ldflags = [ ++ "-ltzplatform-config-static", ++ "-ltzplatform-config-2.0", ++ ] ++ } ++} ++ ++tizen_pkg_config("libtizen_tzplatform_config") { ++ packages = [] ++ if (chromium_efl_tizen_version >= 30) { ++ #packages = [ "libtzplatform-config" ] ++ } ++} ++ ++config("tizen_tzplatform_config-public") { ++ if (chromium_efl_tizen_version >= 30) { ++ cflags = [ "-libtzplatform-config" ] ++ } ++} +diff --git a/build/build_desktop.sh b/build/build_desktop.sh +index 576a2c6..1e9463f 100755 +--- a/build/build_desktop.sh ++++ b/build/build_desktop.sh +@@ -7,13 +7,20 @@ trap 'error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT + + host_arch=$(getHostArch) + +-if [ -z "$GYP_GENERATOR_OUTPUT" ]; then +- export GYP_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" +-fi +- + parseHostBuildScriptParams desktop $@ + +-JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" ++JHBUILD_STAMPFILE="" ++if [ "$USE_GN" ]; then ++ if [ -z "$GN_GENERATOR_OUTPUT" ]; then ++ export GN_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" ++ fi ++ JHBUILD_STAMPFILE="${GN_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" ++else ++ if [ -z "$GYP_GENERATOR_OUTPUT" ]; then ++ export GYP_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" ++ fi ++ JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" ++fi + + forceJHBuildIfNeeded() { + if [[ $FORCE_JHBUILD == 1 ]]; then +@@ -29,7 +36,12 @@ forceJHBuildIfNeeded() { + + forceJHBuildIfNeeded + +-JHBUILD_DEPS="${GYP_GENERATOR_OUTPUT}/Dependencies/Root" ++JHBUILD_DEPS="" ++if [ "$USE_GN" ]; then ++ JHBUILD_DEPS="${GN_GENERATOR_OUTPUT}/Dependencies/Root" ++else ++ JHBUILD_DEPS="${GYP_GENERATOR_OUTPUT}/Dependencies/Root" ++fi + if [ "${host_arch}" == "x64" ]; then + _LIBDIR=lib64 + elif [ "${host_arch}" == "ia32" ]; then +@@ -47,9 +59,29 @@ fi + + ${SCRIPTDIR}/apply_patches.sh ${SCRIPTDIR}/patches + +-export __GYP_CHROMIUMEFL_TARGET=desktop ++if [ "$USE_GN" ]; then ++ export __GN_CHROMIUMEFL_TARGET=desktop ++else ++ export __GYP_CHROMIUMEFL_TARGET=desktop ++fi + +-hostGypChromiumEfl ++#export BUILD_DEPENDENCIES_LIB_PATH="${JHBUILD_DEPS}/${_LIBDIR}" ++#export BUILD_DEPENDENCIES_INCLUDE_PATH="${JHBUILD_DEPS}/include" ++ ++#deps_include_path="\"${JHBUILD_DEPS}/include " ++#for module in "${JHBUILD_DEPS}/include/*" ++#do ++# deps_include_path="$deps_include_path$module " ++#done ++#deps_include_path="$deps_include_path\"" ++ ++if [ "$USE_GN" ]; then ++ #hostGnChromiumEfl "deps_include_path=$deps_include_path deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" ++ hostGnChromiumEfl "deps_include_path=\"${JHBUILD_DEPS}/include\" deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" ++# deps_efl_pc_path=\"${JHBUILD_DEPS}/Source/efl-1.16.0/pc\" ++else ++ hostGypChromiumEfl ++fi + + export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}:$LD_LIBRARY_PATH" + export PATH="${JHBUILD_DEPS}/bin:$PATH" +diff --git a/build/cmd_execution.py b/build/cmd_execution.py +new file mode 100755 +index 0000000..0159933 +--- /dev/null ++++ b/build/cmd_execution.py +@@ -0,0 +1,17 @@ ++#!/usr/bin/env python ++ ++import sys ++import os ++ ++if __name__ == '__main__': ++ ++ l = len(sys.argv) ++ c = 1; ++ cmd = "" ++ while c < l: ++ cmd += sys.argv[c] + " " ++ c += 1 ++ ++ os.system(cmd) ++ ++ sys.exit(0) +diff --git a/build/common.sh b/build/common.sh +index 63b0867..1f029d4 100755 +--- a/build/common.sh ++++ b/build/common.sh +@@ -78,6 +78,12 @@ function parseHostBuildScriptParams() { + --skip-gyp) + export SKIP_GYP=1 + ;; ++ --use-gn) ++ export USE_GN=1 ++ ;; ++ --skip-gn) ++ export SKIP_GN=1 ++ ;; + --ccache) + echo using ccache + export USE_CCACHE=1 +@@ -137,6 +143,25 @@ function hostGypChromiumEfl() { + fi + } + ++function hostGnChromiumEfl() { ++ if [[ $SKIP_GN != 1 ]]; then ++ local XWALK_ARG="" ++ local COMPONENT_ARG="" ++ if [[ $BUILD_XWALK == 1 ]]; then ++ XWALK_ARG="xwalk=true" ++ fi ++ if [[ $COMPONENT_BUILD == 1 ]]; then ++ COMPONENT_ARG="component=shared_library" ++ fi ++ ${TOPDIR}/tizen_src/build/gn_chromiumefl.sh \ ++ $XWALK_ARG \ ++ $COMPONENT_ARG \ ++ "outdir=\"$TOPDIR/out.$(getHostArch)\"" \ ++ "chromium_efl_tizen_version=30" \ ++ $@ ++ fi ++} ++ + function hostNinja() { + if [[ $SKIP_NINJA == 0 ]]; then + TARGETS="chromium-ewk efl_webprocess efl_webview_app ubrowser" +@@ -149,7 +174,15 @@ function hostNinja() { + if [[ $BUILD_XWALK == 1 ]]; then + TARGETS="$TARGETS xwalk" + fi +- BUILDDIR=${GYP_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} ++ if [[ $BUILD_CHROMEDRIVER == 1 ]]; then ++ TARGETS="$TARGETS chromedriver" ++ fi ++ if [ "$USE_GN" ]; then ++ export BUILD_SUBDIRECTORY="" ++ BUILDDIR=${GN_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} ++ else ++ BUILDDIR=${GYP_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} ++ fi + ninja -C $BUILDDIR ${JOBS} ${TARGETS} + fi + } +@@ -245,6 +278,16 @@ function setupAndExecuteTargetBuild() { + count=$(( $count + 1 )) + ARGS[$count]="_skip_gyp 1" + ;; ++ --use-gn) ++ ARGS[$count]=--define ++ count=$(( $count + 1 )) ++ ARGS[$count]="_use_gn 1" ++ ;; ++ --skip-gn) ++ ARGS[$count]=--define ++ count=$(( $count + 1 )) ++ ARGS[$count]="_skip_gn 1" ++ ;; + --xwalk) + ARGS[$count]=--define + count=$(( $count + 1 )) +diff --git a/build/config/BUILD.gn b/build/config/BUILD.gn +new file mode 100644 +index 0000000..67a787e +--- /dev/null ++++ b/build/config/BUILD.gn +@@ -0,0 +1,131 @@ ++# Copyright (c) 2013 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/features.gni") ++import("//build/config/ui.gni") ++ ++# One common error that happens is that GYP-generated headers within gen/ get ++# included rather than the GN-generated ones within gen/ subdirectories. ++# TODO(agrieve): Remove once GYP is gone (as well as exec_script exception). ++#assert( ++# exec_script("//build/dir_exists.py", [ "obj.host" ], "string") == "False", ++# "GYP artifacts detected in $root_build_dir.$0x0A" + ++# "You must wipe this directory before building with GN.") ++ ++# TODO(brettw) Most of these should be removed. Instead of global feature ++# flags, we should have more modular flags that apply only to a target and its ++# dependents. For example, depending on the "x11" meta-target should define ++# USE_X11 for all dependents so that everything that could use X11 gets the ++# define, but anything that doesn't depend on X11 doesn't see it. ++# ++# For now we define these globally to match the current GYP build. ++config("tizen_feature_flags") { ++ defines = [ ++ # TODO: Check if those defines are still necessary. If they are add an explanation why. ++ "COMPONENT_BUILD", ++ "SKIA_DLL", ++ "BUILDING_V8_SHARED", ++ "V8_SHARED", ++ ] ++ ++ if (use_efl) { ++ defines += [ "USE_EFL" ] ++ } ++ if (tizen_tbm_support) { ++ defines += [ "TIZEN_TBM_SUPPORT" ] ++ } ++ if (ewk_bringup) { ++ defines += [ "EWK_BRINGUP" ] ++ } ++ ++ if (prebuilt_ld_gold_dir != "") { ++ ldflags = [ "-B${prebuilt_ld_gold_dir}" ] ++ ++ if (gcc_version >= 49) { ++ # In GCC 4.9, the linker (either bfd or gold) is called with the -plugin argument ++ # which our current bundled gold linker (in build/prebuild) does not accept. ++ # Since our gold a x64 64bit statically linked binary, even if we rebuild it ++ # with plugin support enabled, the plugin being loaded would be a 32bit ARM binary. ++ # and load would fail. So we disable linker's plugin loadeir (specifically ++ # gcc's liblto_plugin). ++ cflags = [ "-fPIC" ] ++ ldflags += [ "-shared" ] ++ ldflags += [ "-fno-use-linker-plugin" ] ++ } ++ } ++ ++ if (building_for_tizen) { ++ defines += [ ++ "OS_TIZEN", ++ "WTF_OS_TIZEN", ++ ] ++ # Tizen build system has a global option '-Wformat-security'. ++ # So, a cflag '-Wno-format' from chromium-efl needs to be ignored. ++ # Otherwise, following error will happen. ++ # error: -Wformat-security ignored without -Wformat [-Werror=format-security] ++ if (prebuilt_ld_gold_dir == "") { ++ cflags = [ "-Wno-format" ] ++ } ++ ++ defines += [ "NO_UNWIND_TABLES" ] ++ ++ if (chromium_efl_tizen_version == 30) { ++ defines += [ ++ "TIZEN_MAJOR_VERSION=3", ++ "TIZEN_MINOR_VERSION=0", ++ "TIZEN_PATCH_VERSION=0", ++ ] ++ } else if (chromium_efl_tizen_version == 24) { ++ defines += [ ++ "TIZEN_MAJOR_VERSION=2", ++ "TIZEN_MINOR_VERSION=4", ++ "TIZEN_PATCH_VERSION=0", ++ ] ++ } else if (chromium_efl_tizen_version == 23) { ++ defines += [ ++ "TIZEN_MAJOR_VERSION=2", ++ "TIZEN_MINOR_VERSION=3", ++ "TIZEN_PATCH_VERSION=0", ++ ] ++ } ++ ++ if (use_wayland) { ++ defines += [ "USE_WAYLAND" ] ++ } ++ if (tizen_multimedia_support) { ++ defines += [ ++ "TIZEN_MULTIMEDIA_SUPPORT", ++ "TIZEN_MULTIMEDIA_USE_CAPI_AUDIO_IO", ++ ] ++ } ++ ++ # TODO: There are X11 dependencies in following condition. ++ # The files need to be implemented based on Wayland. ++ if (wayland_bringup) { ++ defines += [ "WAYLAND_BRINGUP" ] ++ } ++ } ++ ++ if (building_for_tizen_mobile) { ++ defines += [ ++ "OS_TIZEN_MOBILE", ++ "WTF_OS_TIZEN_MOBILE", ++ "TIZEN_CONTENTS_DETECTION", ++ ] ++ } ++ ++ if (building_for_tizen_tv) { ++ defines += [ ++ "OS_TIZEN_TV", ++ "WTF_OS_TIZEN_TV", ++ ] ++ ++ if (chromium_efl_tizen_version == 24) { ++ cflags -= [ ++ "-march=armv7-a", ++ "-mtune=generic-armv7-a", ++ ] ++ } ++ } ++} +diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn +new file mode 100644 +index 0000000..2e3d330 +--- /dev/null ++++ b/build/config/BUILDCONFIG.gn +@@ -0,0 +1,671 @@ ++# Copyright (c) 2013 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++# ============================================================================= ++# WHAT IS THIS FILE? ++# ============================================================================= ++# ++# This is the master GN build configuration. This file is loaded after the ++# build args (args.gn) for the build directory and after the toplevel ".gn" ++# file (which points to this file as the build configuration). ++# ++# This file will be executed and the resulting context will be used to execute ++# every other file in the build. So variables declared here (that don't start ++# with an underscore) will be implicitly global. ++ ++# ============================================================================= ++# PLATFORM SELECTION ++# ============================================================================= ++# ++# There are two main things to set: "os" and "cpu". The "toolchain" is the name ++# of the GN thing that encodes combinations of these things. ++# ++# Users typically only set the variables "target_os" and "target_cpu" in "gn ++# args", the rest are set up by our build and internal to GN. ++# ++# There are three different types of each of these things: The "host" ++# represents the computer doing the compile and never changes. The "target" ++# represents the main thing we're trying to build. The "current" represents ++# which configuration is currently being defined, which can be either the ++# host, the target, or something completely different (like nacl). GN will ++# run the same build file multiple times for the different required ++# configuration in the same build. ++# ++# This gives the following variables: ++# - host_os, host_cpu, host_toolchain ++# - target_os, target_cpu, default_toolchain ++# - current_os, current_cpu, current_toolchain. ++# ++# Note the default_toolchain isn't symmetrical (you would expect ++# target_toolchain). This is because the "default" toolchain is a GN built-in ++# concept, and "target" is something our build sets up that's symmetrical with ++# its GYP counterpart. Potentially the built-in default_toolchain variable ++# could be renamed in the future. ++# ++# When writing build files, to do something only for the host: ++# if (current_toolchain == host_toolchain) { ... ++ ++if (target_os == "") { ++ target_os = host_os ++} ++ ++if (target_cpu == "") { ++ if (target_os == "tizen") { ++ # If we're building for Tizen, we should assume that we want to ++ # build for ARM by default, not the host_cpu (which is likely x64). ++ # This allows us to not have to specify both target_os and target_cpu ++ # on the command line. ++ target_cpu = "arm" ++ } else { ++ target_cpu = host_cpu ++ } ++} ++ ++if (current_cpu == "") { ++ current_cpu = target_cpu ++} ++if (current_os == "") { ++ current_os = target_os ++} ++ ++# ============================================================================= ++# BUILD FLAGS ++# ============================================================================= ++# ++# This block lists input arguments to the build, along with their default ++# values. ++# ++# If a value is specified on the command line, it will overwrite the defaults ++# given in a declare_args block, otherwise the default will be used. ++# ++# YOU SHOULD ALMOST NEVER NEED TO ADD FLAGS TO THIS FILE. GN allows any file in ++# the build to declare build flags. If you need a flag for a single component, ++# you can just declare it in the corresponding BUILD.gn file. ++# ++# - If your feature is a single target, say //components/foo, you can put ++# a declare_args() block in //components/foo/BUILD.gn and use it there. ++# Nobody else in the build needs to see the flag. ++# ++# - Defines based on build variables should be implemented via the generated ++# build flag header system. See //build/buildflag_header.gni. You can put ++# the buildflag_header target in the same file as the build flag itself. You ++# should almost never set "defines" directly. ++# ++# - If your flag toggles a target on and off or toggles between different ++# versions of similar things, write a "group" target that forwards to the ++# right target (or no target) depending on the value of the build flag. This ++# group can be in the same BUILD.gn file as the build flag, and targets can ++# depend unconditionally on the group rather than duplicating flag checks ++# across many targets. ++# ++# - If a semi-random set of build files REALLY needs to know about a define and ++# the above pattern for isolating the build logic in a forwarding group ++# doesn't work, you can put the argument in a .gni file. This should be put ++# in the lowest level of the build that knows about this feature (which should ++# almost always be outside of the //build directory!). ++# ++# Other flag advice: ++# ++# - Use boolean values when possible. If you need a default value that expands ++# to some complex thing in the default case (like the location of the ++# compiler which would be computed by a script), use a default value of -1 or ++# the empty string. Outside of the declare_args block, conditionally expand ++# the default value as necessary. ++# ++# - Use a name like "use_foo" or "is_foo" (whatever is more appropriate for ++# your feature) rather than just "foo". ++# ++# - Write good comments directly above the declaration with no blank line. ++# These comments will appear as documentation in "gn args --list". ++# ++# - Don't call exec_script inside declare_args. This will execute the script ++# even if the value is overridden, which is wasteful. See first bullet. ++ ++declare_args() { ++ # Set to enable the official build level of optimization. This has nothing ++ # to do with branding, but enables an additional level of optimization above ++ # release (!is_debug). This might be better expressed as a tri-state ++ # (debug, release, official) but for historical reasons there are two ++ # separate flags. ++ is_official_build = false ++ ++ # Debug build. Enabling official builds automatically sets is_debug to false. ++ is_debug = false ++ ++ # Whether we're a traditional desktop unix. ++ is_desktop_linux = current_os == "linux" ++ ++ # Set to true when compiling with the Clang compiler. Typically this is used ++ # to configure warnings. ++ is_clang = current_os == "ios" ++ ++ # Allows the path to a custom target toolchain to be injected as a single ++ # argument, and set as the default toolchain. ++ custom_toolchain = "" ++ ++ # This should not normally be set as a build argument. It's here so that ++ # every toolchain can pass through the "global" value via toolchain_args(). ++ if (current_os == "tizen") { ++ host_toolchain = "//tizen_src/build/toolchain/tizen:$host_cpu" ++ } else { ++ host_toolchain = "" ++ } ++ ++ # DON'T ADD MORE FLAGS HERE. Read the comment above. ++} ++ ++declare_args() { ++ # Component build. Setting to true compiles targets declared as "components" ++ # as shared libraries loaded dynamically. This speeds up development time. ++ # When false, components will be linked statically. ++ # ++ # For more information see ++ # https://chromium.googlesource.com/chromium/src/+/master/docs/component_build.md ++ is_component_build = is_debug && current_os != "ios" ++} ++ ++assert(!(is_debug && is_official_build), "Can't do official debug builds") ++ ++# ============================================================================== ++# TOOLCHAIN SETUP ++# ============================================================================== ++# ++# Here we set the default toolchain, as well as the variable host_toolchain ++# which will identify the toolchain corresponding to the local system when ++# doing cross-compiles. When not cross-compiling, this will be the same as the ++# default toolchain. ++# ++# We do this before anything else to make sure we complain about any ++# unsupported os/cpu combinations as early as possible. ++ ++if (host_toolchain == "") { ++ # This should only happen in the top-level context. ++ # In a specific toolchain context, the toolchain_args() ++ # block should have propagated a value down. ++ # TODO(dpranke): Add some sort of assert here that verifies that ++ # no toolchain omitted host_toolchain from its toolchain_args(). ++ ++ if (host_os == "linux") { ++ if (target_os != "linux") { ++ # TODO(dpranke) - is_clang normally applies only to the target ++ # build, and there is no way to indicate that you want to override ++ # it for both the target build *and* the host build. Do we need to ++ # support this? ++ host_toolchain = "//build/toolchain/linux:clang_$host_cpu" ++ } else if (is_clang) { ++ host_toolchain = "//build/toolchain/linux:clang_$host_cpu" ++ } else { ++ host_toolchain = "//build/toolchain/linux:$host_cpu" ++ } ++ } else if (host_os == "mac") { ++ host_toolchain = "//build/toolchain/mac:clang_$host_cpu" ++ } else if (host_os == "win") { ++ # On Windows always use the target CPU for host builds. On the ++ # configurations we support this will always work and it saves build steps. ++ if (is_clang) { ++ host_toolchain = "//build/toolchain/win:clang_$target_cpu" ++ } else { ++ host_toolchain = "//build/toolchain/win:$target_cpu" ++ } ++ } else { ++ assert(false, "Unsupported host_os: $host_os") ++ } ++} ++ ++_default_toolchain = "" ++ ++if (target_os == "tizen") { ++ assert(host_os == "linux" || host_os == "mac", ++ "Tizen builds are only supported on Linux and Mac hosts.") ++ if (is_clang) { ++ _default_toolchain = "//tizen_src/build/toolchain/tizen_clang_$target_cpu" ++ } else { ++ _default_toolchain = "//tizen_src/build/toolchain/tizen_$target_cpu" ++ } ++} else if (target_os == "chromeos" || target_os == "linux") { ++ # See comments in build/toolchain/cros/BUILD.gn about board compiles. ++ if (is_clang) { ++ _default_toolchain = "//build/toolchain/linux:clang_$target_cpu" ++ } else { ++ _default_toolchain = "//build/toolchain/linux:$target_cpu" ++ } ++} else if (target_os == "ios") { ++ _default_toolchain = "//build/toolchain/mac:ios_clang_$target_cpu" ++} else if (target_os == "mac") { ++ assert(host_os == "mac", "Mac cross-compiles are unsupported.") ++ _default_toolchain = host_toolchain ++} else if (target_os == "win") { ++ # On Windows we use the same toolchain for host and target by default. ++ assert(target_os == host_os, "Win cross-compiles only work on win hosts.") ++ if (is_clang) { ++ _default_toolchain = "//build/toolchain/win:clang_$target_cpu" ++ } else { ++ _default_toolchain = "//build/toolchain/win:$target_cpu" ++ } ++} else if (target_os == "winrt_81" || target_os == "winrt_81_phone" || ++ target_os == "winrt_10") { ++ _default_toolchain = "//build/toolchain/win:winrt_$target_cpu" ++} else { ++ assert(false, "Unsupported target_os: $target_os") ++} ++ ++# If a custom toolchain has been set in the args, set it as default. Otherwise, ++# set the default toolchain for the platform (if any). ++if (custom_toolchain != "") { ++ set_default_toolchain(custom_toolchain) ++} else if (_default_toolchain != "") { ++ set_default_toolchain(_default_toolchain) ++} ++ ++# ============================================================================= ++# OS DEFINITIONS ++# ============================================================================= ++# ++# We set these various is_FOO booleans for convenience in writing OS-based ++# conditions. ++# ++# - is_android, is_chromeos, is_ios, and is_win should be obvious. ++# - is_mac is set only for desktop Mac. It is not set on iOS. ++# - is_posix is true for mac and any Unix-like system (basically everything ++# except Windows). ++# - is_linux is true for desktop Linux and ChromeOS, but not Android (which is ++# generally too different despite being based on the Linux kernel). ++# ++# Do not add more is_* variants here for random lesser-used Unix systems like ++# aix or one of the BSDs. If you need to check these, just check the ++# current_os value directly. ++ ++if (current_os == "win" || current_os == "winrt_81" || ++ current_os == "winrt_81_phone" || current_os == "winrt_10") { ++ is_android = false ++ is_chromeos = false ++ is_ios = false ++ is_linux = false ++ is_mac = false ++ is_nacl = false ++ is_posix = false ++ is_win = true ++ is_tizen = false ++ use_efl = false ++} else if (current_os == "mac") { ++ is_android = false ++ is_chromeos = false ++ is_ios = false ++ is_linux = false ++ is_mac = true ++ is_nacl = false ++ is_posix = true ++ is_win = false ++ is_tizen = false ++ use_efl = false ++} else if (current_os == "tizen") { ++ is_android = false ++ is_chromeos = false ++ is_ios = false ++ is_linux = false ++ is_mac = false ++ is_nacl = false ++ is_posix = true ++ is_win = false ++ is_tizen = true ++ use_efl = true ++ is_official_build = false ++} else if (current_os == "nacl") { ++ # current_os == "nacl" will be passed by the nacl toolchain definition. ++ # It is not set by default or on the command line. We treat is as a ++ # Posix variant. ++ is_android = false ++ is_chromeos = false ++ is_ios = false ++ is_linux = false ++ is_mac = false ++ is_nacl = true ++ is_posix = true ++ is_win = false ++ is_tizen = false ++ use_efl = false ++} else if (current_os == "ios") { ++ is_android = false ++ is_chromeos = false ++ is_ios = true ++ is_linux = false ++ is_mac = false ++ is_nacl = false ++ is_posix = true ++ is_win = false ++ is_tizen = false ++ use_efl = false ++} else if (current_os == "linux") { ++ is_android = false ++ is_chromeos = false ++ is_ios = false ++ is_linux = true ++ is_mac = false ++ is_nacl = false ++ is_posix = true ++ is_win = false ++ is_tizen = false ++ use_efl = true ++ is_official_build = false ++} ++ ++# ============================================================================= ++# SOURCES FILTERS ++# ============================================================================= ++# ++# These patterns filter out platform-specific files when assigning to the ++# sources variable. The magic variable |sources_assignment_filter| is applied ++# to each assignment or appending to the sources variable and matches are ++# automatically removed. ++# ++# Note that the patterns are NOT regular expressions. Only "*" and "\b" (path ++# boundary = end of string or slash) are supported, and the entire string ++# must match the pattern (so you need "*.cc" to match all .cc files, for ++# example). ++ ++# DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call ++# below. ++sources_assignment_filter = [] ++if (!is_posix) { ++ sources_assignment_filter += [ ++ "*_posix.h", ++ "*_posix.cc", ++ "*_posix_unittest.h", ++ "*_posix_unittest.cc", ++ "*\bposix/*", ++ ] ++} ++if (!is_win) { ++ sources_assignment_filter += [ ++ "*_win.cc", ++ "*_win.h", ++ "*_win_unittest.cc", ++ "*\bwin/*", ++ "*.def", ++ "*.rc", ++ ] ++} ++if (!is_mac) { ++ sources_assignment_filter += [ ++ "*_mac.h", ++ "*_mac.cc", ++ "*_mac.mm", ++ "*_mac_unittest.h", ++ "*_mac_unittest.cc", ++ "*_mac_unittest.mm", ++ "*\bmac/*", ++ "*_cocoa.h", ++ "*_cocoa.cc", ++ "*_cocoa.mm", ++ "*_cocoa_unittest.h", ++ "*_cocoa_unittest.cc", ++ "*_cocoa_unittest.mm", ++ "*\bcocoa/*", ++ ] ++} ++if (!is_ios) { ++ sources_assignment_filter += [ ++ "*_ios.h", ++ "*_ios.cc", ++ "*_ios.mm", ++ "*_ios_unittest.h", ++ "*_ios_unittest.cc", ++ "*_ios_unittest.mm", ++ "*\bios/*", ++ ] ++} ++if (!is_mac && !is_ios) { ++ sources_assignment_filter += [ "*.mm" ] ++} ++if (!is_linux) { ++ sources_assignment_filter += [ ++ "*_linux.h", ++ "*_linux.cc", ++ "*_linux_unittest.h", ++ "*_linux_unittest.cc", ++ "*\blinux/*", ++ ] ++} ++if (!is_android) { ++ sources_assignment_filter += [ ++ "*_android.h", ++ "*_android.cc", ++ "*_android_unittest.h", ++ "*_android_unittest.cc", ++ "*\bandroid/*", ++ ] ++} ++if (!is_chromeos) { ++ sources_assignment_filter += [ ++ "*_chromeos.h", ++ "*_chromeos.cc", ++ "*_chromeos_unittest.h", ++ "*_chromeos_unittest.cc", ++ "*\bchromeos/*", ++ ] ++} ++ ++# DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call ++# below. ++ ++# Actually save this list. ++# ++# These patterns are executed for every file in the source tree of every run. ++# Therefore, adding more patterns slows down the build for everybody. We should ++# only add automatic patterns for configurations affecting hundreds of files ++# across many projects in the tree. ++# ++# Therefore, we only add rules to this list corresponding to platforms on the ++# Chromium waterfall. This is not for non-officially-supported platforms ++# (FreeBSD, etc.) toolkits, (X11, GTK, etc.), or features. For these cases, ++# write a conditional in the target to remove the file(s) from the list when ++# your platform/toolkit/feature doesn't apply. ++set_sources_assignment_filter(sources_assignment_filter) ++ ++# ============================================================================= ++# TARGET DEFAULTS ++# ============================================================================= ++# ++# Set up the default configuration for every build target of the given type. ++# The values configured here will be automatically set on the scope of the ++# corresponding target. Target definitions can add or remove to the settings ++# here as needed. ++ ++# Holds all configs used for running the compiler. ++default_compiler_configs = [ ++ "//build/config:feature_flags", ++ "//tizen_src/build/config:tizen_feature_flags", ++ "//build/config/compiler:afdo", ++ "//build/config/compiler:compiler", ++ "//build/config/compiler:clang_stackrealign", ++ "//build/config/compiler:compiler_arm_fpu", ++ "//build/config/compiler:chromium_code", ++ "//build/config/compiler:default_include_dirs", ++ "//tizen_src/build/config/compiler:tizen_default_include_dirs", ++ "//build/config/compiler:default_optimization", ++ "//build/config/compiler:default_stack_frames", ++ "//build/config/compiler:default_symbols", ++ "//build/config/compiler:no_rtti", ++ "//build/config/compiler:runtime_library", ++ "//build/config/sanitizers:default_sanitizer_flags", ++] ++if (!is_tizen) { ++ default_compiler_configs += [ ++ "//tizen_src/build/config/compiler:tizen_default_lib_dirs", ++ ] ++} ++if (is_win) { ++ default_compiler_configs += [ ++ "//build/config/win:default_crt", ++ "//build/config/win:lean_and_mean", ++ "//build/config/win:nominmax", ++ "//build/config/win:unicode", ++ "//build/config/win:winver", ++ "//build/config/win:vs_code_analysis", ++ ] ++} ++if (current_os == "winrt_81" || current_os == "winrt_81_phone" || ++ current_os == "winrt_10") { ++ default_compiler_configs += [ "//build/config/win:target_winrt" ] ++} ++if (is_posix) { ++ default_compiler_configs += [ ++ "//build/config/gcc:no_exceptions", ++ "//build/config/gcc:symbol_visibility_hidden", ++ ] ++} ++ ++if (!use_efl) { ++ default_compiler_configs += ++ [ "//build/config/android:default_cygprofile_instrumentation" ] ++} ++ ++if (is_clang && !is_nacl) { ++ default_compiler_configs += [ ++ "//build/config/clang:find_bad_constructs", ++ "//build/config/clang:extra_warnings", ++ ] ++} ++ ++# Debug/release-related defines. ++if (is_debug) { ++ default_compiler_configs += [ "//build/config:debug" ] ++} else { ++ default_compiler_configs += [ "//build/config:release" ] ++} ++ ++# Static libraries and source sets use only the compiler ones. ++set_defaults("static_library") { ++ configs = default_compiler_configs ++} ++set_defaults("source_set") { ++ configs = default_compiler_configs ++} ++ ++# Compute the set of configs common to all linked targets (shared libraries, ++# loadable modules, executables) to avoid duplication below. ++if (is_win) { ++ # Many targets remove these configs, so they are not contained within ++ # //build/config:executable_config for easy removal. ++ _linker_configs = [ ++ "//build/config/win:default_incremental_linking", ++ ++ # Default to console-mode apps. Most of our targets are tests and such ++ # that shouldn't use the windows subsystem. ++ "//build/config/win:console", ++ ] ++} else if (is_mac || is_ios) { ++ _linker_configs = [ "//build/config/mac:strip_all" ] ++} else { ++ _linker_configs = [] ++} ++ ++# Executable defaults. ++default_executable_configs = default_compiler_configs + [ ++ "//build/config:default_libs", ++ "//build/config:executable_config", ++ ] + _linker_configs ++set_defaults("executable") { ++ configs = default_executable_configs ++} ++ ++# Test defaults. ++set_defaults("test") { ++ configs = default_executable_configs ++} ++ ++# Shared library and loadable module defaults (also for components in component ++# Test defaults.# mode). ++default_shared_library_configs = default_compiler_configs + [ ++ "//build/config:default_libs", ++ "//build/config:shared_library_config", ++ ] + _linker_configs ++if (!use_efl) { ++ # Strip native JNI exports from shared libraries by default. Binaries that ++ # want this can remove this config. ++ default_shared_library_configs += ++ [ "//build/config/android:hide_native_jni_exports" ] ++} ++set_defaults("shared_library") { ++ configs = default_shared_library_configs ++} ++set_defaults("loadable_module") { ++ configs = default_shared_library_configs ++} ++ ++# ============================================================================== ++# COMPONENT SETUP ++# ============================================================================== ++ ++# Defines a component, which equates to a shared_library when ++# is_component_build == true and a static_library otherwise. ++# ++# Use static libraries for the static build rather than source sets because ++# many of of our test binaries link many large dependencies but often don't ++# use large portions of them. The static libraries are much more efficient to ++# link in this situation since only the necessary object files are linked. ++# ++# The invoker can override the type of the target in the non-component-build ++# case by setting static_component_type to either "source_set" or ++# "static_library". If unset, the default will be used. ++template("component") { ++ if (is_component_build) { ++ _component_mode = "shared_library" ++ } else if (defined(invoker.static_component_type)) { ++ assert(invoker.static_component_type == "static_library" || ++ invoker.static_component_type == "source_set") ++ _component_mode = invoker.static_component_type ++ } else if (is_android || !defined(invoker.sources)) { ++ # When there are no sources defined, use a source set to avoid creating ++ # an empty static library (which generally don't work). ++ # ++ # When we changed components to default from source sets to static ++ # libraries, an Android benchmark regressed slightly ++ # (https://crbug.com/619593). We don't have a good theory on why this might ++ # be since theoretically it should be the same. It could be something as ++ # silly as random code locality luck. ++ # ++ # There seems to be no build-time performance hit to using source sets on ++ # Android (the normal reason for defaulting to static libraries), so we ++ # make the default on Android to be source set. ++ # ++ # If it's been a long time since this was added and you're skeptical, ++ # please feel free to remove the Android exception and see if any ++ # benchmarks obviously regress. If not, it would be great to standardize ++ # with the rest of the platforms. ++ _component_mode = "source_set" ++ } else { ++ _component_mode = "static_library" ++ } ++ target(_component_mode, target_name) { ++ # Explicitly forward visibility, implicitly forward everything else. ++ # Forwarding "*" doesn't recurse into nested scopes (to avoid copying all ++ # globals into each template invocation), so won't pick up file-scoped ++ # variables. Normally this isn't too bad, but visibility is commonly ++ # defined at the file scope. Explicitly forwarding visibility and then ++ # excluding it from the "*" set works around this problem. ++ # See http://crbug.com/594610 ++ forward_variables_from(invoker, [ "visibility" ]) ++ forward_variables_from(invoker, "*", [ "visibility" ]) ++ ++ # All shared libraries must have the sanitizer deps to properly link in ++ # asan mode (this target will be empty in other cases). ++ if (!defined(deps)) { ++ deps = [] ++ } ++ deps += [ "//build/config/sanitizers:deps" ] ++ } ++} ++ ++# Component defaults ++set_defaults("component") { ++ if (is_component_build) { ++ configs = default_shared_library_configs ++ if (is_android) { ++ configs -= [ "//build/config/android:hide_native_jni_exports" ] ++ } ++ } else { ++ configs = default_compiler_configs ++ } ++} +diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn +new file mode 100644 +index 0000000..ede97e0 +--- /dev/null ++++ b/build/config/compiler/BUILD.gn +@@ -0,0 +1,131 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++declare_args() { ++ if (is_tizen) { ++ deps_include_path = "/usr/include" ++ deps_lib_path = "/usr/lib" ++ } else { ++ deps_include_path = "" ++ } ++} ++ ++config("tizen_default_lib_dirs") { ++ lib_dirs = [ ++ ] ++} ++ ++config("tizen_default_include_dirs") { ++ include_dirs = [ ++ "//tizen_src", ++ "//tizen_src/chromium_impl", ++ "//tizen_src/ecore_wrapper", ++ ++ "//third_party/blink/renderer", ++ ++ deps_include_path, ++ # find / -name *.h -printf '%h\n' | sort --unique ++ "$deps_include_path/dbus-1.0", ++ "$deps_include_path/ecore-1", ++ "$deps_include_path/ecore-audio-1", ++ "$deps_include_path/ecore-audio-cxx-1", ++ "$deps_include_path/ecore-avahi-1", ++ "$deps_include_path/ecore-con-1", ++ "$deps_include_path/ecore-cxx-1", ++ "$deps_include_path/ecore-evas-1", ++ "$deps_include_path/ecore-file-1", ++ "$deps_include_path/ecore-imf-1", ++ "$deps_include_path/ecore-imf-evas-1", ++ "$deps_include_path/ecore-input-1", ++ "$deps_include_path/ecore-input-evas-1", ++ "$deps_include_path/ecore-ipc-1", ++ "$deps_include_path/ecore-x-1", ++ "$deps_include_path/ector-1", ++ "$deps_include_path/ector-1/cairo", ++ "$deps_include_path/ector-1/generic", ++ "$deps_include_path/ector-1/software", ++ "$deps_include_path/edje-1", ++ "$deps_include_path/eet-1", ++ "$deps_include_path/eet-cxx-1", ++ "$deps_include_path/eet-cxx-1/eet-cxx", ++ "$deps_include_path/eeze-1", ++ "$deps_include_path/efl-1", ++ "$deps_include_path/efl-1/interfaces", ++ "$deps_include_path/efl-cxx-1", ++ "$deps_include_path/efreet-1", ++ "$deps_include_path/eina-1", ++ "$deps_include_path/eina-1/eina", ++ "$deps_include_path/eina-cxx-1", ++ "$deps_include_path/eina-cxx-1/eina-cxx", ++ "$deps_include_path/eio-1", ++ "$deps_include_path/eio-cxx-1", ++ "$deps_include_path/eldbus-1", ++ "$deps_include_path/eldbus_cxx-1", ++ "$deps_include_path/elementary-1", ++ "$deps_include_path/elementary-cxx-1", ++ "$deps_include_path/elocation-1", ++ "$deps_include_path/elua-1", ++ "$deps_include_path/embryo-1", ++ "$deps_include_path/emile-1", ++ "$deps_include_path/emotion-1", ++ "$deps_include_path/eo-1", ++ "$deps_include_path/eo-cxx-1", ++ "$deps_include_path/eolian-1", ++ "$deps_include_path/eolian-cxx-1", ++ "$deps_include_path/eolian-cxx-1/grammar", ++ "$deps_include_path/ethumb-1", ++ "$deps_include_path/ethumb-client-1", ++ "$deps_include_path/evas-1", ++ "$deps_include_path/evas-1/canvas", ++ "$deps_include_path/evas-cxx-1", ++ "$deps_include_path/evas-cxx-1/canvas", ++ "$deps_include_path/gio-unix-2.0", ++ "$deps_include_path/gio-unix-2.0/gio", ++ "$deps_include_path/glib-2.0", ++ "$deps_include_path/glib-2.0/gio", ++ "$deps_include_path/glib-2.0/glib", ++ "$deps_include_path/glib-2.0/glib/deprecated", ++ "$deps_include_path/glib-2.0/gobject", ++ "$deps_include_path/gstreamer-1.0", ++ "$deps_include_path/gstreamer-1.0/gst", ++ "$deps_include_path/gstreamer-1.0/gst/allocators", ++ "$deps_include_path/gstreamer-1.0/gst/app", ++ "$deps_include_path/gstreamer-1.0/gst/audio", ++ "$deps_include_path/gstreamer-1.0/gst/base", ++ "$deps_include_path/gstreamer-1.0/gst/basecamerabinsrc", ++ "$deps_include_path/gstreamer-1.0/gst/check", ++ "$deps_include_path/gstreamer-1.0/gst/codecparsers", ++ "$deps_include_path/gstreamer-1.0/gst/controller", ++ "$deps_include_path/gstreamer-1.0/gst/egl", ++ "$deps_include_path/gstreamer-1.0/gst/fft", ++ "$deps_include_path/gstreamer-1.0/gst/insertbin", ++ "$deps_include_path/gstreamer-1.0/gst/interfaces", ++ "$deps_include_path/gstreamer-1.0/gst/mpegts", ++ "$deps_include_path/gstreamer-1.0/gst/net", ++ "$deps_include_path/gstreamer-1.0/gst/pbutils", ++ "$deps_include_path/gstreamer-1.0/gst/riff", ++ "$deps_include_path/gstreamer-1.0/gst/rtp", ++ "$deps_include_path/gstreamer-1.0/gst/rtsp", ++ "$deps_include_path/gstreamer-1.0/gst/sdp", ++ "$deps_include_path/gstreamer-1.0/gst/tag", ++ "$deps_include_path/gstreamer-1.0/gst/uridownloader", ++ "$deps_include_path/gstreamer-1.0/gst/video", ++ "$deps_include_path/libsoup-2.4", ++ "$deps_include_path/libsoup-2.4/libsoup", ++ "$deps_include_path/orc-0.4", ++ "$deps_include_path/orc-0.4/orc", ++ "$deps_include_path/orc-0.4/orc-test", ++ ] ++ ++ if (is_tizen) { ++ include_dirs += [ ++ "$deps_include_path/appfw", ++ "$deps_include_path/system", ++ ++ "$deps_lib_path/dbus-1.0/include", ++ "$deps_lib_path/gstreamer-1.0/include", ++ "$deps_lib_path/gstreamer-1.0/include/gst", ++ ] ++ } ++} +diff --git a/build/config/linux/pkg_config.gni b/build/config/linux/pkg_config.gni +new file mode 100644 +index 0000000..19f6d5c +--- /dev/null ++++ b/build/config/linux/pkg_config.gni +@@ -0,0 +1,33 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/linux/pkg_config.gni") ++ ++template("tizen_pkg_config") { ++ assert(defined(invoker.packages), ++ "Variable |packages| must be defined to be a list in pkg_config.") ++ ++ if (invoker.packages == []) { ++ config(target_name) { ++ } ++ } else { ++ pkg_config(target_name) { ++ packages = invoker.packages ++ ++ if (defined(invoker.extra_args)) { ++ extra_args = invoker.extra_args ++ } ++ ++ if (defined(invoker.ignore_libs)) { ++ ignore_libs = invoker.ignore_libs ++ } ++ ++ forward_variables_from(invoker, ++ [ ++ "defines", ++ "visibility", ++ ]) ++ } ++ } ++} +diff --git a/build/config/tizen/BUILD.gn b/build/config/tizen/BUILD.gn +new file mode 100644 +index 0000000..4c1430a +--- /dev/null ++++ b/build/config/tizen/BUILD.gn +@@ -0,0 +1,156 @@ ++# Copyright 2014 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/sanitizers/sanitizers.gni") ++import("//build/config/sysroot.gni") ++ ++assert(is_tizen) ++ ++# This is included by reference in the //build/config/compiler config that ++# is applied to all targets. It is here to separate out the logic that is ++# Android-only. ++config("compiler") { ++ cflags = [ ++ "-ffunction-sections", ++ "-fno-short-enums", ++ ] ++ ldflags = [] ++ ++ if (!is_clang) { ++ # Clang doesn't support these flags. ++ cflags += [ "-finline-limit=64" ] ++ } ++ if (is_clang) { ++ rebased_android_toolchain_root = ++ rebase_path(android_toolchain_root, root_build_dir) ++ assert(rebased_android_toolchain_root != "") # Mark as used. ++ if (current_cpu == "mipsel") { ++ cflags += [ ++ # TODO(gordanac) Enable integrated-as. ++ "-no-integrated-as", ++ "-B${rebased_android_toolchain_root}/bin", # Else /usr/bin/as gets picked up. ++ ] ++ } ++ } ++ ++ # Use gold for Android for most CPU architectures. ++ if (current_cpu == "x86" || current_cpu == "x64" || current_cpu == "arm") { ++ if (linux_use_gold_flags == true) { ++ cflags += [ "-Wno-deprecated" ] ++ ldflags += [ "-fuse-ld=gold" ] ++ } ++ if (is_clang) { ++ # Let clang find the ld.gold in the NDK. ++ ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ] ++ } ++ ++ # Use -mstackrealign due to a bug on ia32 Jelly Bean. ++ # See crbug.com/521527 ++ if (current_cpu == "x86") { ++ cflags += [ "-mstackrealign" ] ++ } ++ } ++ ++ if (current_cpu == "mipsel" && is_clang) { ++ # Let clang find the ld.bfd in the NDK. ++ ldflags += [ "--gcc-toolchain=$rebased_android_toolchain_root" ] ++ } ++ ++ ldflags += [ ++ #"-Wl,--build-id=sha1", ++ #"-Wl,--no-undefined", ++ ++ # Don't allow visible symbols from libgcc or libc++ to be ++ # re-exported. ++ "-Wl,--exclude-libs=libgcc.a", ++ "-Wl,--exclude-libs=libc++_static.a", ++ ++ # Don't allow visible symbols from libraries that contain ++ # assembly code with symbols that aren't hidden properly. ++ # http://crbug.com/448386 ++ "-Wl,--exclude-libs=libvpx_assembly_arm.a", ++ ] ++ ++ if (is_clang) { ++ if (current_cpu == "arm") { ++ abi_target = "arm-linux-androideabi" ++ } else if (current_cpu == "x86") { ++ abi_target = "i686-linux-androideabi" ++ } else if (current_cpu == "arm64") { ++ # Place holder for arm64 support, not tested. ++ # TODO: Enable clang support for Android Arm64. http://crbug.com/539781 ++ abi_target = "aarch64-linux-androideabi" ++ } else if (current_cpu == "x64") { ++ # Place holder for x64 support, not tested. ++ # TODO: Enable clang support for Android x64. http://crbug.com/539781 ++ abi_target = "x86_64-linux-androideabi" ++ } else if (current_cpu == "mipsel") { ++ abi_target = "mipsel-linux-android" ++ } else if (current_cpu == "mips64el") { ++ # Place holder for mips64 support, not tested. ++ abi_target = "mips64el-linux-androideabi" ++ } else { ++ assert(false, "Architecture not supported") ++ } ++ cflags += [ ++ "-target", ++ abi_target, ++ ] ++ ldflags += [ ++ "-target", ++ abi_target, ++ ] ++ } ++ ++ # Assign any flags set for the C compiler to asmflags so that they are sent ++ # to the assembler. ++ asmflags = cflags ++} ++ ++config("executable_config") { ++ cflags = [ "-fPIE" ] ++ asmflags = [ "-fPIE" ] ++ ldflags = [ "-pie" ] ++} ++ ++config("hide_native_jni_exports") { ++ ldflags = [ "-Wl,--version-script=" + ++ rebase_path("//build/android/android_no_jni_exports.lst") ] ++} ++ ++# Instrumentation ------------------------------------------------------------- ++# ++# The BUILDCONFIG file sets the "default_cygprofile_instrumentation" config on ++# targets by default. You can override whether the cygprofile instrumentation is ++# used on a per-target basis: ++# ++# configs -= [ "//build/config/android:default_cygprofile_instrumentation" ] ++# configs += [ "//build/config/android:no_cygprofile_instrumentation" ] ++ ++#config("default_cygprofile_instrumentation") { ++# if (use_order_profiling) { ++# configs = [ ":cygprofile_instrumentation" ] ++# } else { ++# configs = [ ":no_cygprofile_instrumentation" ] ++# } ++#} ++ ++config("cygprofile_instrumentation") { ++ defines = [ "CYGPROFILE_INSTRUMENTATION=1" ] ++ cflags = [ "-finstrument-functions" ] ++ ++ if (!is_clang) { ++ cflags += [ ++ # Allow mmx intrinsics to inline, so that the compiler can expand the intrinsics. ++ "-finstrument-functions-exclude-file-list=mmintrin.h", ++ ++ # Avoid errors with current NDK: ++ # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426:3: error: argument must be a constant" ++ "-finstrument-functions-exclude-file-list=arm_neon.h", ++ ] ++ } ++} ++ ++config("no_cygprofile_instrumentation") { ++} +diff --git a/build/config/tizen_features.gni b/build/config/tizen_features.gni +new file mode 100644 +index 0000000..702cd56 +--- /dev/null ++++ b/build/config/tizen_features.gni +@@ -0,0 +1,93 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/ui.gni") ++ ++declare_args() { ++ gcc_version = 49 ++ ++ use_wayland = false ++ ++ linux_use_gold_flags = false # no use of this variable, if removing then revome from gn_chromiumefl.sh also ++ ++ disable_fatal_linker_warnings = true # no use of this variable, if removing then revome from gn_chromiumefl.sh also ++ ++ python_ver = "2.5" # no use of this variable, if removing then revome from gn_chromiumefl.sh also ++ ++ depth = "" # no use of this variable, if removing then revome from gn_chromiumefl.sh also ++ ++ use_cairo = false ++ use_pango = false ++ ++ tizen_multimedia_support = false ++ # declared from BUILDCONFIG.gn ++ #is_clang = false ++ xwalk_link_against_chromium_ewk = false ++ ++ tizen_mobile = false ++ building_for_tizen_tv = false ++ building_for_tizen_mobile = false ++ if (is_tizen && tizen_multimedia_support) { ++ tizen_multimedia_eme_support = true ++ } else { ++ tizen_multimedia_eme_support = false ++ } ++ ++ exe_dir = "/usr/lib/chromium-efl/" ++ edje_dir = "/usr/share/chromium-efl/themes/" ++ data_dir = "/usr/share/chromium-efl/" ++ locale_dir = "/usr/share/chromium-efl/locale/" ++ ++ prebuilt_ld_gold_dir = "" ++ chromium_efl_tizen_version = 24 ++ tizen_tbm_support = false ++ building_for_tizen = false ++} ++ ++werror = false ++ ++# This file should contain gn code that is supposed to be common ++# for all build targets we have in chromium-ewk. Things specific only to one ++# component should go to appropriate gni file included below. ++ ++use_gstreamer_fft = false ++ ++use_aura = false ++ ++# Moved it in //tizen_src/build/config/BUILDCONFIG.gn ++#use_efl = true ++# Declared from the //build/config/ui.gni ++#use_default_render_theme = true ++ ++ewk_bringup = true ++wayland_bringup = use_wayland ++ ++building_strategy = "ewk" # 'ewk', 'libs' and 'crosswalk-bin' ++ ++compile_suid_client = true ++compile_credentials = true ++# Declared from the //build/config/features.gni ++#enable_web_speech = false ++# Declare from //third_party/webrtc/build/webrtc.gni ++#rtc_use_h264 = false # override value in third_party/webrtc/build/common.gypi ++ ++edje_compiler = "edje_cc" ++ ++grit_additional_defines = "-Duse_aura" ++ ++if (use_ozone) { ++ # Declared from the //build/config/ui.gni ++ #use_glib = true ++ external_ozone_platforms = [ "efl" ] ++} ++ ++if (xwalk_link_against_chromium_ewk) { ++ import("//tizen_src/ewk/efl_integration/link_xwalk_against_chromium_efl.gni") ++} ++ ++is_official_build = false ++ ++treat_warnings_as_errors=werror ++ ++use_x11=false +diff --git a/build/gbs.conf b/build/gbs.conf +index fbeb934..c90e0be 100755 +--- a/build/gbs.conf ++++ b/build/gbs.conf +@@ -115,7 +115,7 @@ url = https://api.tizen.org + [profile.tztv_v3.0_arm-wayland] + obs = obs.tizen_v3.0 + repos = repo.public_3.0_base_arm, repo.tztv_v3.0_arm-wayland +-buildroot = ~/GBS-ROOT-3.0-TV-ARM-WAYLAND ++buildroot = ~/GBS-ROOT-3.0-TV-ARM-WAYLAND_M51 + + [repo.public_3.0_base_arm] + url = http://download.tizen.org/snapshots/tizen/base/latest/repos/arm/packages/ +@@ -164,7 +164,7 @@ url = http://download.tizen.org/snapshots/tizen/tv/latest/repos/emulator32-wayla + [profile.tzmb_v3.0_arm-wayland] + obs = obs.tizen_v3.0 + repos = repo.public_3.0_base_arm, repo.tzmb_v3.0_arm-wayland +-buildroot = ~/GBS-ROOT-3.0-MOBILE-ARM-WAYLAND ++buildroot = ~/GBS-ROOT-3.0-MOBILE-ARM-WAYLAND_M51 + + [repo.public_3.0_base_arm] + url = http://download.tizen.org/snapshots/tizen/base/latest/repos/arm/packages/ +@@ -198,7 +198,7 @@ passwdx = QlpoOTFBWSZTWd0JOhUAAACBAABgIAAhAIIjF3JFOFCQ3Qk6FQ== + [profile.tzmb_v3.0_arm64-wayland] + obs = obs.tizen_v3.0 + repos = repo.public_3.0_base_arm64, repo.tzmb_v3.0_arm64-wayland +-buildroot = ~/GBS-ROOT-3.0-MOBILE-ARM64-WAYLAND ++buildroot = ~/GBS-ROOT-3.0-MOBILE-ARM64-WAYLAND_M51 + + [repo.public_3.0_base_arm64] + url = http://download.tizen.org/snapshots/tizen/base/latest/repos/arm64/packages/ +@@ -247,7 +247,7 @@ url = http://download.tizen.org/snapshots/tizen/mobile/latest/repos/emulator32-w + [profile.tzmb_v3.0_TM1] + obs = obs.tizen_v3.0 + repos = repo.public_3.0_base_arm, repo.tzmb_v3.0_TM1 +-buildroot = ~/GBS-ROOT-3.0-MOBILE-TM1 ++buildroot = ~/GBS-ROOT-3.0-MOBILE-TM1_M51 + + [repo.public_3.0_base_arm] + url = http://download.tizen.org/snapshots/tizen/base/latest/repos/arm/packages/ +@@ -262,7 +262,7 @@ url = http://download.tizen.org/snapshots/tizen/mobile/latest/repos/target-TM1/p + [profile.tzmb_v3.0_TM1_mirror] + obs = obs.tizen_v3.0 + repos = repo.public_3.0_base_arm_mirror, repo.tzmb_v3.0_TM1_mirror +-buildroot = ~/GBS-ROOT-3.0-MOBILE-TM1 ++buildroot = ~/GBS-ROOT-3.0-MOBILE-TM1-M53-GN + + [repo.public_3.0_base_arm_mirror] + url = http://165.213.149.200/download/public_mirror/tizen/base/latest/repos/arm/packages/ +diff --git a/build/gn_chromiumefl b/build/gn_chromiumefl +new file mode 100755 +index 0000000..52d6101 +--- /dev/null ++++ b/build/gn_chromiumefl +@@ -0,0 +1,164 @@ ++#!/usr/bin/env python ++ ++import argparse ++import glob ++import os ++import shlex ++import subprocess ++import sys ++ ++top_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '..')) ++if '--xwalk' in sys.argv: ++ xwalk_dir = os.path.join(top_dir, '..', 'xwalk') ++ sys.argv.remove('--xwalk') ++else: ++ xwalk_dir = None ++chrome_src = os.environ.get('CHROME_SRC') ++if chrome_src: ++ chrome_src = os.path.abspath(chrome_src) ++if not chrome_src or not os.path.isdir(chrome_src): ++ chrome_src = os.path.join(top_dir, '..') ++ print 'CHROME_SRC not set, falling back to ' + chrome_src ++ ++script_dir = os.path.abspath(os.path.join(chrome_src, 'build')) ++if not os.path.isdir(script_dir): ++ print script_dir + " is not a valid directory" ++ sys.exit(1) ++ ++sys.path.insert(0, script_dir) ++import gn_helpers ++ ++ ++# Add paths so that pymod_do_main(...) can import files. ++sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers')) ++sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit')) ++ ++# Remove the above and keep the line below once we require a newer specific ++# Chromium revision. ++sys.path.insert(1, os.path.join(chrome_src, 'third_party', 'WebKit', ++ 'Source', 'build', 'scripts')) ++sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build')) ++sys.path.insert(1, os.path.join(chrome_src, 'native_client', 'build')) ++ ++def GetOutputDirectory(): ++ """Returns the output directory that GN will use.""" ++ ++ # Handle command line generator flags. ++ parser = argparse.ArgumentParser() ++ parser.add_argument('-G', dest='genflags', default=[], action='append') ++ genflags = parser.parse_known_args()[0].genflags ++ ++ # Handle generator flags from the environment. ++ genflags += shlex.split(os.environ.get('GN_GENERATOR_FLAGS', '')) ++ ++ needle = 'output_dir=' ++ for item in genflags: ++ if item.startswith(needle): ++ return item[len(needle):] ++ ++ return 'out' ++ ++ ++if __name__ == '__main__': ++ arg = 0 ++ args = [] ++ for i in range(len(sys.argv)): ++ if arg > 0: ++ args[arg] += " " + sys.argv[i]; ++ continue ++ if sys.argv[i] in ("--args="): ++ args.append(sys.argv[i]) ++ arg=i ++ else: ++ args.append(sys.argv[i]) ++ ++ # On Mac we want to override CXX and CC that is provided with ++ # the Chromium GYP environment. ++ if sys.platform.startswith('darwin'): ++ os.environ['CXX'] = 'clang++' ++ os.environ['CC'] = 'clang' ++ ++ #gyp_helper.apply_chromium_gyp_env() ++ ++# args.extend(['-I' + i for i in additional_include_files(args)]) ++ ++ # On Mac we want to build in x64 mode. And we want to use libc++. ++ # Even though we are not on linux, it seems we specifically have to disable linux_use_tcmalloc. ++ if sys.platform in ('darwin',): ++ args[arg] += " host_arch=\"x64\" use_libcpp=true linux_use_tcmalloc=false" ++ ++ # There shouldn't be a circular dependency relationship between .gyp files, ++ # but in Chromium's .gyp files, on non-Mac platforms, circular relationships ++ # currently exist. The check for circular dependencies is currently ++ # bypassed on other platforms, but is left enabled on the Mac, where a ++ # violation of the rule causes Xcode to misbehave badly. ++ # TODO(mark): Find and kill remaining circular dependencies, and remove this ++ # option. http://crbug.com/35878. ++ # TODO(tc): Fix circular dependencies in ChromiumOS then add linux2 to the ++ # list. ++ #if sys.platform not in ('darwin',): ++ # args[arg] += " no_circular_check=true" ++ ++ # the top_level source directory is the first common ancestor of our module and the chromium source tree for the build to be sane. ++ # commonprefix works on a character basis, so it might return a phony common prefix (not the common parent directory we expect), ++ toplevel= os.path.commonprefix([top_dir, chrome_src]) ++ ++ if not os.path.exists(toplevel): ++ toplevel = os.path.join(toplevel, os.pardir) ++ #args[arg] += " toplevel-dir=\"" + toplevel + "\"" ++ # Tweak the output location. ++ #args[arg] += "generator-output=\"" + os.path.abspath(GetOutputDirectory()) + "\"" ++ #args[arg] += " Goutput_dir=\"" + os.path.abspath(GetOutputDirectory()) + "\"" ++ #args[arg] += " check=true" ++ ++ # gyp on gbs fails with multiprocessing.SemLock() not implemented ++ # disabling parallel gyp for gbs ++ gbs_build = os.environ.get('BUILDING_WITH_GBS') ++ #if gbs_build: ++ #args[arg] += " no-parallel=true" ++ ++ os.environ["CHROMIUM_BUILDTOOLS_PATH"]=os.path.join(chrome_src, "buildtools") ++ ++ #notifications -> enable_notifications in build/config/features.gni ++ #args[arg] += " ewk_bringup=false xwalk_link_against_chromium_ewk=false notifications=false" ++ args[arg] += " xwalk_link_against_chromium_ewk=false" ++ ++ args[arg] += " gcc_version=49" # It should be in condition for arm target ++ ++ args.append("--defines=USE_EFL") ++ args.append("-v") ++ ++ buildtools_path = os.environ.get('CHROMIUM_BUILDTOOLS_PATH') ++ host_arch = os.environ.get('HOST_ARCH') ++ if not buildtools_path: ++ print "build tool path is empty" ++ sys.exit(1) ++ else: ++ if sys.platform.startswith(('cygwin', 'win')): ++ subdir = 'win' ++ elif sys.platform == 'darwin': ++ subdir = 'mac' ++ elif host_arch.startswith('arm'): ++ buildtools_path = os.path.join(buildtools_path, "../tizen_src/buildtools/") ++ subdir = 'arm' ++ elif sys.platform.startswith('linux'): ++ subdir = 'linux64' ++ else: ++ raise Error('Unknown platform: ' + sys.platform) ++ ++ bin_path = os.path.join(buildtools_path, subdir) ++ ++ exeSuffix = '' ++ if sys.platform.startswith(('cygwin', 'win')): ++ exeSuffix = '.exe' ++ elif host_arch.startswith('arm'): ++ exeSuffix = '.arm' ++ ++ gn_path = os.path.join(bin_path, 'gn' + exeSuffix) ++ if not os.path.exists(gn_path): ++ print 'Could not find gn executable at: %s' % gn_path ++ sys.exit(2) ++ else: ++ print 'Updating projects from gn files...' ++ sys.exit(subprocess.call([gn_path] + args[1:])) ++ +diff --git a/build/gn_chromiumefl.sh b/build/gn_chromiumefl.sh +new file mode 100755 +index 0000000..2e9344f +--- /dev/null ++++ b/build/gn_chromiumefl.sh +@@ -0,0 +1,310 @@ ++#!/bin/bash ++ ++source $(dirname $0)/common.sh ++trap 'error_report $0 $LINENO' ERR SIGINT SIGTERM SIGQUIT ++host_arch=$(getHostArch) ++export HOST_ARCH=$host_arch ++ ++supported_targets=("mobile" "tv" "desktop") ++ ++if [ -z "$GN_GENERATOR_OUTPUT" ]; then ++ GN_GENERATOR_OUTPUT="out.${host_arch}" ++fi ++ ++echo ${host_arch} ++echo $GN_GENERATOR_OUTPUT ++ ++if [ -z "$GN_GENERATOR_FLAG" ]; then ++ export GN_GENERATOR_FLAG=$GN_GENERATOR_OUTPUT ++fi ++ ++EXTRA_GN_ARGS="$@" ++ ++# __GN_CHROMIUMEFL_TARGET is defined when we are called from build_desktop.sh. ++# Otherwise we are called by gbs whch already passes the correct building_for_* flag. ++if [ "$__GN_CHROMIUMEFL_TARGET" == "desktop" ]; then ++ target=desktop ++fi ++ ++while [[ $# > 0 ]]; do ++ case "$1" in ++ building_for_tizen_*=true) ++ buildType="gbs" ++ target=$(echo $1 | sed -e 's/building_for_tizen_\(.*\)=true/\1/') ++ target_arch="arm" ++ ;; ++ chromium_efl_tizen_version=*) ++ tizen_version=$(echo $1 | sed -e 's#chromium_efl_tizen_version\=\([0-9.]*\)#\1#') ++ ;; ++ tizen_emulator_support=1) ++ tizen_emulator_support=1 ++ ;; ++ #use_wayland=true) ++ # use_wayland=true ++ # ;; ++ --xwalk) ++ building_xwalk=1 ++ ;; ++ building_crosswalk_bin=*) ++ building_xwalk_for_development=1 ++ ;; ++ esac ++ shift; ++done ++ ++findElementInArray "$target" "${supported_targets[@]}" ++if [[ $? == 1 ]]; then ++ echo "Unsupported target: $target" ++ exit 1 ++fi ++ ++if [ "$__GN_CHROMIUMEFL_TARGET" == "crosscompile" ]; then ++ buildType=crosscompile ++ EXTRA_GN_ARGS+=" edje_compiler=${TOPDIR}/out.${host_arch}/Dependencies/Root/bin/edje_cc" ++fi ++ ++ORIGINAL_GN_DEFINES="$GN_DEFINES" ++export GN_DEFINES=$(echo "$GN_DEFINES" | sed -e 's/component\s*=\s*shared_library//g') ++if [ "$ORIGINAL_GN_DEFINES" != "$GN_DEFINES" ]; then ++ echo "WARNING: component build is not supported." ++ echo "Removing component=shared_library from GN_DEFINES." ++fi ++ ++COMMON_GN_PARAMETERS=" ++ use_libjpeg_turbo=true ++ proprietary_codecs=true ++ use_alsa=false ++ use_aura=false ++ use_gconf=false ++ use_kerberos=false ++ use_ozone=true ++ ozone_auto_platforms=false ++ ozone_platform_wayland=false ++ is_desktop_linux=false ++ use_pango=false ++ use_cairo=false ++ enable_plugins=true ++ enable_extensions=true ++ use_cups=false ++ use_allocator=\"none\" ++ disable_fatal_linker_warnings=true ++ depth=\"${TOPDIR}\" ++ use_libpci=false ++ " ++ # Moved it in //tizen_src/build/config/BUILDCONFIG.gn ++ # use_efl=true ++ # declared also from build config ++ # is_desktop_linux=false ++ # declared also from //build/config/features.gni ++ # proprietary_codecs=true ++ # use_gconf=false ++ # enable_plugins=true ++ ++if [ "$building_xwalk" == "1" ] && [ "$building_xwalk_for_development" != "1" ]; then ++ COMMON_GN_PARAMETERS+=" ++ xwalk_link_against_chromium_ewk=true ++ " ++fi ++ ++add_desktop_flags() { ++ clang="true" ++ if [ "$USECLANG" == "0" ]; then ++ clang="false" ++ fi ++ ADDITIONAL_GN_PARAMETERS+="building_for_tizen=false ++ building_for_tizen_mobile=false ++ building_for_tizen_tv=false ++ clang=${clang} ++ werror=false ++ use_sysroot=false ++ use_wayland=false ++ target_os="\"linux\"" ++ target_cpu=\"${host_arch}\" ++ " ++} ++ ++add_arm_flags() { ++ ADDITIONAL_GN_PARAMETERS+="armv7=true ++ arm_thumb=true ++ arm_use_neon=true ++ " ++} ++ ++add_tizen_flags() { ++ ADDITIONAL_GN_PARAMETERS+="building_for_tizen=true ++ python_ver=\"$(getPythonVersion)\" ++ enable_basic_printing=true ++ enable_print_preview=true ++ is_clang=false ++ linux_use_bundled_binutils=false ++ enable_nacl=false ++ tizen_multimedia_eme_support=false ++ target_os="\"tizen\"" ++ " ++ # We do not need it ++ # tizen=true ++ # not used any place ++ # linux_use_bundled_gold=false ++ # declared also from //build/config/features.gni ++ #enable_basic_printing=true ++ #enable_print_preview=true ++ #It is defined from //build/toolchain/gcc_toolchain.gni ++ #is_clang=false ++ ++ # TODO(youngsoo): Once binutils-gold issue on tizen v3.0 ARM 64bit is fixed, ++ # make the latest tizen version unconditional. ++ if [ "$tizen_version" == "30" ] && [ "$host_arch" == "arm" ]; then ++ # [M48_2564] Temporary disabling the flag for switching to new chromium ++ # FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15383 ++ ADDITIONAL_GN_PARAMETERS+="linux_use_gold_flags=true ++ " ++ #prebuilt_ld_gold_dir=\"${TOPDIR}/tizen_src/build/prebuild\" ++ #" ++ elif [ "$tizen_version" == "24" -a "$target" == "tv" ]; then ++ ADDITIONAL_GN_PARAMETERS+="linux_use_gold_flags=false ++ prebuilt_ld_gold_dir=\"${TOPDIR}/tizen_src/build/prebuild/tizen_v2.4_tv\" ++ " ++ else ++ ADDITIONAL_GN_PARAMETERS+="linux_use_gold_flags=false ++ prebuilt_ld_gold_dir=\"${TOPDIR}/tizen_src/build/prebuild\" ++ " ++ fi ++ ++ if [ "$tizen_version" == "30" ]; then ++ # [M49_2623] Temporary disabling the flag. ++ # FIXME: http://165.213.149.170/jira/browse/TWF-610 ++ ADDITIONAL_GN_PARAMETERS+="tizen_multimedia_support=false ++ tizen_tbm_support=false ++ " ++ else ++ ADDITIONAL_GN_PARAMETERS+="tizen_multimedia_support=false ++ werror=false ++ " ++ fi ++ ++ # use_wayland come from spec file and based on that wayland_bringup sets in tizen_features.gni ++ #add_wayland_flags ++} ++ ++add_wayland_flags() { ++ if [ "$use_wayland" == "true" ]; then ++ ADDITIONAL_GN_PARAMETERS+="use_wayland=true ++ wayland_bringup=true ++ " ++ else ++ ADDITIONAL_GN_PARAMETERS+="use_wayland=false ++ wayland_bringup=false ++ " ++ fi ++} ++ ++add_gbs_flags() { ++ # target_arch changed to target_cpu but not changed because it seems that ++ # it is used for gbs and added target_cpu also. ++ ADDITIONAL_GN_PARAMETERS+="target_cpu=\"${host_arch}\" ++ " ++ # sysroot="" ++ #" ++ #no-parallel=true ++ #" ++ # TODO(b.kelemen): ideally crosscompile should also support system libs. ++ # Unfortunately the gbs root doesn't contain everything chromium needs. ++# SYSTEM_DEPS="-Duse_system_expat=true ++# -Duse_system_libjpeg=false ++# -Duse_system_libpng=true ++# -Duse_system_libusb=true ++# -Duse_system_libxml=true ++# -Duse_system_libxslt=true ++# -Duse_system_re2=true ++# -Duse_system_zlib=true ++# " ++ SYSTEM_DEPS="" #"--system-libraries ++ #libxml ++ #" ++ ++ # [M50_2661] Temporary using the icu of internal chformium instead of system. ++ # The icu of system doesn't support utrie2.h ++ # FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-967 ++# SYSTEM_DEPS+="-Duse_system_icu=false ++# " ++ ++ if [ "$target" == "mobile" ]; then ++# SYSTEM_DEPS+="-Duse_system_bzip2=true ++# -Duse_system_libexif=true ++# -Duse_system_nspr=true ++# " ++ SYSTEM_DEPS+=" ++ " ++ fi ++} ++ ++add_cross_flags() { ++ # target_arch changed to target_cpu but not changed because it seems that ++ # it is used for gbs and added target_cpu also. ++ ADDITIONAL_GN_PARAMETERS+="target_cpu=\"arm\" ++ sysroot=\"$SYSROOTDIR\" ++ arm_tune=\"arm7\" ++ " ++ ++ # Compiling yasm with crosscompile + icecc leads to some strange errors (one file is built for target instead of host). ++ # Yasm is an assembler used only by the build (not at runtime) and it is generally available in Linux distros so let's just ++ # use it from the system. ++ ADDITIONAL_GN_PARAMETERS+="use_system_yasm=true" ++} ++ ++if [ "$target" == "desktop" ]; then ++ add_desktop_flags ++else ++ add_tizen_flags ++ if [ "$target" == "mobile" -o "$target" == "tv" ]; then ++ if [ "$target_arch" == "arm" ]; then ++ add_arm_flags ++ fi ++ if [ "$buildType" == "gbs" ]; then ++ add_gbs_flags ++ elif [ "$buildType" == "crosscompile" ]; then ++ add_cross_flags ++ fi ++ fi ++ if [ "$SYSTEM_DEPS" != "" ]; then ++ #replacing original files with correct ones according to $SYSTEM_DEPS ++ $TOPDIR/build/linux/unbundle/replace_gn_files.py $SYSTEM_DEPS ++ fi ++fi ++ ++_GN_ARGS=" ++ gen ++ $GN_GENERATOR_FLAG ++ --root=${TOPDIR} ++ --dotfile=${TOPDIR}/tizen_src/.gn ++ --args= ++ $COMMON_GN_PARAMETERS ++ $SYSTEM_DEPS ++ $ADDITIONAL_GN_PARAMETERS ++ $EXTRA_GN_ARGS ++ " ++printf "GN_ARGUMENTS:\n" ++for arg in $_GN_ARGS; do ++ printf " * ${arg##-D}\n" ++done ++ ++if [ -f "${TOPDIR}/BUILD_.gn" ]; then ++ rm "${TOPDIR}/BUILD.gn" ++else ++ mv "${TOPDIR}/BUILD.gn" "${TOPDIR}/BUILD_.gn" ++fi ++ln -s "${TOPDIR}/tizen_src/BUILD.gn" "${TOPDIR}/BUILD.gn" ++ ++${TOPDIR}/tizen_src/build/gn_chromiumefl \ ++ ${_GN_ARGS} ++ ++ret=$? ++ ++mv ${TOPDIR}/BUILD_.gn ${TOPDIR}/BUILD.gn ++ ++if [ "$SYSTEM_DEPS" != "" ]; then ++ # Restore gn files to their original states not to mess up the tree permanently. ++ $TOPDIR/build/linux/unbundle/replace_gn_files.py --undo $SYSTEM_DEPS ++fi ++ ++exit $ret +diff --git a/build/jhbuild/jhbuildrc b/build/jhbuild/jhbuildrc +index 6ae610c..8a90c1b 100644 +--- a/build/jhbuild/jhbuildrc ++++ b/build/jhbuild/jhbuildrc +@@ -30,7 +30,10 @@ moduleset = [ __moduleset_file_uri, ] + __extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",") + modules = [ 'chromeefl-dependencies', ] + +-outdir = os.environ.get('GYP_GENERATOR_OUTPUT', 'out') ++if os.environ['USE_GN']: ++ outdir = os.environ.get('GN_GENERATOR_OUTPUT', 'out') ++else: ++ outdir = os.environ.get('GYP_GENERATOR_OUTPUT', 'out') + + checkoutroot = os.path.abspath(os.path.join(outdir,'Dependencies', 'Source')) + prefix = os.path.abspath(os.path.join(outdir,'Dependencies', 'Root')) +diff --git a/build/patches/gn_build_is_tizen_on_ffmpeg.diff b/build/patches/gn_build_is_tizen_on_ffmpeg.diff +new file mode 100644 +index 0000000..342adbf +--- /dev/null ++++ b/build/patches/gn_build_is_tizen_on_ffmpeg.diff +@@ -0,0 +1,100 @@ ++diff --git a/third_party/ffmpeg/ffmpeg_generated.gni b/third_party/ffmpeg/ffmpeg_generated.gni ++index e952679..d0208c7 100644 ++--- a/third_party/ffmpeg/ffmpeg_generated.gni +++++ b/third_party/ffmpeg/ffmpeg_generated.gni ++@@ -12,7 +12,7 @@ ffmpeg_c_sources = [] ++ ffmpeg_gas_sources = [] ++ ffmpeg_yasm_sources = [] ++ ++-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) { +++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium") || is_tizen) { ++ ffmpeg_c_sources += [ ++ "libavcodec/allcodecs.c", ++ "libavcodec/autorename_libavcodec_utils.c", ++@@ -146,7 +146,7 @@ if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "C ++ ] ++ } ++ ++-if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium")) { +++if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromiumOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chromium") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chromium") || is_tizen) { ++ ffmpeg_c_sources += [ ++ "libavcodec/h264pred.c", ++ "libavcodec/hpeldsp.c", ++@@ -167,7 +167,7 @@ if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "C ++ ] ++ } ++ ++-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome")) { +++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mips64el" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "mipsel" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x64" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "x86" && ffmpeg_branding == "ChromeOS") || (is_mac && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_win && current_cpu == "x86" && ffmpeg_branding == "Chrome") || is_tizen) { ++ ffmpeg_c_sources += [ ++ "libavcodec/aac_ac3_parser.c", ++ "libavcodec/aac_parser.c", ++@@ -255,7 +255,7 @@ if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chr ++ ] ++ } ++ ++-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) { +++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || is_tizen) { ++ ffmpeg_c_sources += [ ++ "libavcodec/arm/fft_fixed_init_arm.c", ++ "libavcodec/arm/fft_init_arm.c", ++@@ -282,7 +282,7 @@ if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chr ++ ] ++ } ++ ++-if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS")) { +++if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromiumOS") || is_tizen) { ++ ffmpeg_c_sources += [ ++ "libavcodec/arm/h264pred_init_arm.c", ++ "libavcodec/arm/hpeldsp_init_arm.c", ++@@ -302,7 +302,7 @@ if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chr ++ ] ++ } ++ ++-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) { +++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_tizen && arm_use_neon)) { ++ ffmpeg_c_sources += [ ++ "libavutil/arm/float_dsp_init_neon.c", ++ ] ++@@ -361,7 +361,7 @@ if ((is_android && current_cpu == "x64" && ffmpeg_branding == "Chrome") || (is_l ++ ] ++ } ++ ++-if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS")) { +++if ((is_android && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_android && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && ffmpeg_branding == "ChromeOS") || is_tizen) { ++ ffmpeg_c_sources += [ ++ "libavcodec/arm/aacpsdsp_init_arm.c", ++ "libavcodec/arm/mpegaudiodsp_init_arm.c", ++@@ -483,7 +483,7 @@ if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chr ++ ] ++ } ++ ++-if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS")) { +++if ((is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chrome") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromeOS") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "Chromium") || (is_linux && current_cpu == "arm" && arm_use_neon && ffmpeg_branding == "ChromiumOS") || (is_tizen && arm_use_neon)) { ++ ffmpeg_c_sources += [ ++ "libavcodec/arm/hpeldsp_init_neon.c", ++ "libavcodec/arm/vp8dsp_init_neon.c", ++diff --git a/third_party/ffmpeg/ffmpeg_options.gni b/third_party/ffmpeg/ffmpeg_options.gni ++index 6bb719a..44735d6 100644 ++--- a/third_party/ffmpeg/ffmpeg_options.gni +++++ b/third_party/ffmpeg/ffmpeg_options.gni ++@@ -47,8 +47,10 @@ assert(ffmpeg_branding == "Chromium" || ++ ++ if (current_cpu == "x86") { ++ ffmpeg_arch = "ia32" ++-} else if (current_cpu == "arm" && arm_version >= 7 && arm_use_neon) { +++} else if ((current_cpu == "arm" || is_tizen) && arm_version >= 7 && arm_use_neon) { ++ ffmpeg_arch = "arm-neon" +++} else if (is_tizen) { +++ ffmpeg_arch = "arm" ++ } else { ++ ffmpeg_arch = current_cpu ++ } ++@@ -61,6 +63,6 @@ os_config = current_os ++ if ((is_linux || is_chromeos) && is_msan) { ++ os_config = "linux-noasm" ++ disable_ffmpeg_asm = true ++-} else if (is_chromeos) { +++} else if (is_chromeos || is_tizen) { ++ os_config = "linux" ++ } +diff --git a/build/toolchain/tizen/BUILD.gn b/build/toolchain/tizen/BUILD.gn +new file mode 100644 +index 0000000..af68b41 +--- /dev/null ++++ b/build/toolchain/tizen/BUILD.gn +@@ -0,0 +1,70 @@ ++# Copyright 2013 The Chromium Authors. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/sysroot.gni") # Imports android/config.gni. ++import("//build/toolchain/gcc_toolchain.gni") ++ ++template("tizen_gcc_toolchain") { ++ gcc_toolchain(target_name) { ++ ++ is_clang = invoker.is_clang ++ if (is_clang) { ++ prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin", ++ root_build_dir) ++ cc = "$prefix/clang" ++ cxx = "$prefix/clang++" ++ } else { ++ cc = "gcc" ++ cxx = "g++" ++ } ++ ar = cc + "-ar" ++ ld = cxx ++ readelf = "readelf" ++ nm = "nm" ++ #strip = "strip" ++ ++ # Don't use .cr.so for loadable_modules since they are always loaded via ++ # absolute path. ++ loadable_module_extension = ".so" ++ ++ toolchain_os = "tizen" ++ toolchain_cpu = invoker.toolchain_cpu ++ use_goma = false ++ } ++} ++ ++template("tizen_gcc_toolchains_helper") { ++ tizen_gcc_toolchain(target_name) { ++ toolchain_cpu = invoker.toolchain_cpu ++ } ++ ++ tizen_gcc_toolchain("clang_$target_name") { ++ toolchain_cpu = invoker.toolchain_cpu ++ is_clang = true ++ } ++} ++ ++tizen_gcc_toolchains_helper("x86") { ++ toolchain_cpu = "x86" ++} ++ ++tizen_gcc_toolchains_helper("arm") { ++ toolchain_cpu = "arm" ++} ++ ++tizen_gcc_toolchains_helper("mipsel") { ++ toolchain_cpu = "mipsel" ++} ++ ++tizen_gcc_toolchains_helper("x64") { ++ toolchain_cpu = "x86_64" ++} ++ ++tizen_gcc_toolchains_helper("arm64") { ++ toolchain_cpu = "aarch64" ++} ++ ++tizen_gcc_toolchains_helper("mips64el") { ++ toolchain_cpu = "mipsel64el" ++} +diff --git a/buildtools/arm/gn.arm b/buildtools/arm/gn.arm +new file mode 100755 +index 0000000..58ce3c5 +Binary files /dev/null and b/buildtools/arm/gn.arm differ +diff --git a/chromium_impl/base/base_efl.gni b/chromium_impl/base/base_efl.gni +new file mode 100644 +index 0000000..10ce612 +--- /dev/null ++++ b/chromium_impl/base/base_efl.gni +@@ -0,0 +1,18 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/ui.gni") ++ ++external_base_configs = [ ++ "//tizen_src/build:ecore", ++ "//tizen_src/build:libecore", ++] ++external_base_sources = [ ++ "//tizen_src/chromium_impl/base/message_loop/message_pump_ecore.cc", ++ "//tizen_src/chromium_impl/base/message_loop/message_pump_ecore.h", ++] ++ ++if (use_glib) { ++ external_base_sources += [ "//base/message_loop/message_pump_glib.cc" ] ++} +diff --git a/chromium_impl/chrome/chrome_tests_efl.gni b/chromium_impl/chrome/chrome_tests_efl.gni +new file mode 100644 +index 0000000..d411852 +--- /dev/null ++++ b/chromium_impl/chrome/chrome_tests_efl.gni +@@ -0,0 +1,12 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++# For //chrome/test/chromedriver:lib target ++# It seems that keycode_text_conversion_win.cc is not used in gn files so no need to exclude it. ++external_exclude_chrome_test_driver_sources = [] #[ "test/chromedriver/keycode_text_conversion_win.cc" ] ++if (use_wayland) { ++ #external_exclude_chrome_test_driver_sources += [ "test/chromedriver/keycode_text_conversion_x.cc" ] ++} +diff --git a/chromium_impl/components/components.gni b/chromium_impl/components/components.gni +new file mode 100644 +index 0000000..31b5917 +--- /dev/null ++++ b/chromium_impl/components/components.gni +@@ -0,0 +1,9 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++declare_args() { ++ chromium_code = 1 ++} ++ ++js_dialog_efl_deps = [ "//tizen_src/chromium_impl/components/js_dialogs_efl" ] +diff --git a/chromium_impl/components/js_dialogs_efl/BUILD.gn b/chromium_impl/components/js_dialogs_efl/BUILD.gn +new file mode 100644 +index 0000000..21aa662 +--- /dev/null ++++ b/chromium_impl/components/js_dialogs_efl/BUILD.gn +@@ -0,0 +1,23 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++static_library("js_dialogs_efl") { ++ configs += [ ++ "//tizen_src/build:elementary", ++ "//tizen_src/build:libelementary", ++ "//tizen_src/build:efl-extension", ++ "//tizen_src/build:libefl-extension", ++ ] ++ deps = [ ++ "//base", ++ "//skia", ++ ] ++ include_dirs = [ ".." ] ++ sources = [ ++ "javascript_dialog_manager_efl.cc", ++ "javascript_dialog_manager_efl.h", ++ "javascript_modal_dialog_efl.cc", ++ "javascript_modal_dialog_efl.h", ++ ] ++} +diff --git a/chromium_impl/content/BUILD.gn b/chromium_impl/content/BUILD.gn +new file mode 100644 +index 0000000..58c8979 +--- /dev/null ++++ b/chromium_impl/content/BUILD.gn +@@ -0,0 +1,24 @@ ++# copyright (c) 2015 samsung electronics. all rights reserved. ++# use of this source code is governed by a bsd-style license that can be ++# found in the license file. ++ ++static_library("android_content_detection") { ++ set_sources_assignment_filter([]) ++ sources = [ ++ "//content/renderer/android/renderer_date_time_picker.h", ++ "//content/renderer/android/renderer_date_time_picker.cc", ++ "//content/renderer/android/content_detector.h", ++ "//content/renderer/android/content_detector.cc", ++ "//content/renderer/android/email_detector.h", ++ "//content/renderer/android/email_detector.cc", ++ "//content/renderer/android/phone_number_detector.h", ++ "//content/renderer/android/phone_number_detector.cc", ++ ] ++ ++ deps = [ ++ "//third_party/libphonenumber:libphonenumber", ++ "//third_party/icu:icui18n", ++ "//third_party/blink/public:blink", ++ "//mojo/public/cpp/bindings:bindings", ++ ] ++} +diff --git a/chromium_impl/content/browser/browser_efl.gni b/chromium_impl/content/browser/browser_efl.gni +new file mode 100644 +index 0000000..c966874 +--- /dev/null ++++ b/chromium_impl/content/browser/browser_efl.gni +@@ -0,0 +1,82 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/features.gni") ++ ++external_content_browser_efl_sources = [ ++ "//tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h", ++ "//tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.h", ++ "//tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h", ++ "//tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h", ++ "//tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h", ++ "//tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/tracing/tracing_controller_efl.h", ++ "//tizen_src/chromium_impl/content/browser/tracing/tracing_controller_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/disambiguation_popup_efl.h", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/disambiguation_popup_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.h", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.cc", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/im_context_efl.h", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/im_context_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/native_web_keyboard_event_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.h", ++ "//tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/screen_orientation/screen_orientation_delegate_efl.h", ++ "//tizen_src/chromium_impl/content/browser/screen_orientation/screen_orientation_delegate_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/selection/selection_box_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/selection/selection_box_efl.h", ++ "//tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h", ++ "//tizen_src/chromium_impl/content/browser/selection/selection_handle_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/selection/selection_handle_efl.h", ++ "//tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.h", ++ "//tizen_src/chromium_impl/content/browser/public/browser/web_contents_efl_delegate.h", ++ "//tizen_src/chromium_impl/content/browser/public/browser/web_contents_view_efl_delegate.h", ++] ++ ++external_content_browser_efl_sources += [ ++ "//content/browser/renderer_host/ui_events_helper.cc", ++ "//content/browser/renderer_host/ui_events_helper.h", ++] ++ ++if (building_for_tizen) { ++ external_content_browser_efl_sources += [ ++ "//tizen_src/chromium_impl/content/browser/speech/tts_message_filter_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/speech/tts_message_filter_efl.h", ++ "//tizen_src/chromium_impl/content/browser/speech/tts_tizen.cc", ++ "//tizen_src/chromium_impl/content/browser/speech/tts_tizen.h", ++ ] ++} ++if (building_for_tizen_mobile) { ++ external_exclude_content_browser_efl_sources = [ "device_sensors/data_fetcher_shared_memory_default.cc" ] ++ external_content_browser_efl_sources += [ ++ "//tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.cc", ++ "//tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.h", ++ "//tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_shared_memory_tizen.cc", ++ ] ++} ++if (tizen_multimedia_support) { ++ external_content_browser_efl_sources += [ ++ "//tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.h", ++ "//tizen_src/chromium_impl/content/browser/media/efl/browser_demuxer_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/media/efl/browser_demuxer_efl.h", ++ "//tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.cc", ++ "//tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.h", ++ ] ++} ++if (tizen_tbm_support) { ++ external_content_browser_efl_sources += [ ++ "//tizen_src/chromium_impl/content/browser/media/browser_mediapacket_manager.cc", ++ "//tizen_src/chromium_impl/content/browser/media/browser_mediapacket_manager.h", ++ ] ++} +diff --git a/chromium_impl/content/common/BUILD.gn b/chromium_impl/content/common/BUILD.gn +new file mode 100644 +index 0000000..da16d38 +--- /dev/null ++++ b/chromium_impl/content/common/BUILD.gn +@@ -0,0 +1,36 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++config("content_common_efl") { ++ visibility = [ "//tizen_src/chromium_impl/content/common/common_efl.gni" ] ++ ++ defines = [ ++ "DATA_DIR=\"$data_dir\"", ++ "EXE_DIR=\"$exe_dir\"", ++ ] ++ ++ if (building_for_tizen) { ++ defines += [ ++ "EDJE_DIR=\"$edje_dir\"", ++ "LOCALE_DIR=\"$locale_dir\"", ++ ] ++ } else { ++ # TODO ++ # Release ++ # [TODO] This code should be removed. ++ outdir = "/home/ychul.kang/blink/src/ct-chromium-efl-dev-m56/src/out.x64" ++ defines += [ ++ "EDJE_DIR=\"$outdir/Release/resources\"", ++ "LOCALE_DIR=\"$outdir/Release/locale\"", ++ ] ++ # Debug ++# defines += [ ++# "EDJE_DIR=\"$outdir/Debug/resources\"", ++# "LOCALE_DIR=\"$outdir/Debug/locale\"", ++# ] ++ } ++} ++ +diff --git a/chromium_impl/content/common/common_efl.gni b/chromium_impl/content/common/common_efl.gni +new file mode 100644 +index 0000000..21a7133 +--- /dev/null ++++ b/chromium_impl/content/common/common_efl.gni +@@ -0,0 +1,57 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++external_content_common_efl_configs = [ "//tizen_src/chromium_impl/content/common:content_common_efl" ] ++ ++external_exclude_content_common_efl_sources = [] ++ ++external_content_common_efl_sources = [ ++ "//tizen_src/chromium_impl/content/common/content_client_export.cc", ++ "//tizen_src/chromium_impl/content/common/content_client_export.h", ++ "//tizen_src/chromium_impl/content/common/message_generator_efl.cc", ++ "//tizen_src/chromium_impl/content/common/message_generator_efl.h", ++ "//tizen_src/chromium_impl/content/common/paths_efl.h", ++ "//tizen_src/chromium_impl/content/common/paths_efl.cc", ++ "//tizen_src/chromium_impl/content/common/render_messages_efl.h", ++ "//tizen_src/chromium_impl/content/common/cursors/webcursor_efl.cc", ++ "//tizen_src/chromium_impl/content/common/cursors/webcursor_efl.h", ++ "//tizen_src/chromium_impl/content/common/wrt/wrt_url_parse.h", ++] ++ ++if (building_for_tizen) { ++ external_content_common_efl_sources += [ ++ "//tizen_src/chromium_impl/content/common/tts_messages_efl.h", ++ "//tizen_src/chromium_impl/content/common/tts_utterance_request_efl.cc", ++ "//tizen_src/chromium_impl/content/common/tts_utterance_request_efl.h", ++ ] ++} ++ ++if (building_for_tizen && !ewk_bringup) { ++ external_content_common_efl_sources += [ ++ "//tizen_src/chromium_impl/content/common/gpu/client/gpu_memory_buffer_impl_efl.cc", ++ "//tizen_src/chromium_impl/content/common/gpu/gpu_memory_buffer_factory_efl.cc", ++ ] ++ ++ if (!wayland_bringup) { ++ external_content_common_efl_sources += [ ++ "//tizen_src/chromium_impl/content/common/gpu/client/gpu_memory_buffer_impl_efl_pixmap.cc", ++ "//tizen_src/chromium_impl/content/common/gpu/client/gpu_memory_buffer_impl_efl_pixmap.h", ++ "//tizen_src/chromium_impl/content/common/gpu/gpu_memory_buffer_factory_efl_pixmap.cc", ++ "//tizen_src/chromium_impl/content/common/gpu/gpu_memory_buffer_factory_efl_pixmap.h", ++ ] ++ } ++} ++ ++if (tizen_multimedia_support) { ++ external_content_common_efl_sources += [ ++ "//tizen_src/chromium_impl/content/common/media/efl/media_player_messages_enums_efl.h", ++ "//tizen_src/chromium_impl/content/common/media/efl/media_player_messages_efl.h", ++ "//tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_decode_accelerator.h", ++ "//tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_decode_accelerator.cc", ++ "//tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_encode_accelerator.h", ++ "//tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_encode_accelerator.cc", ++ ] ++} +diff --git a/chromium_impl/content/common/paths_efl.cc b/chromium_impl/content/common/paths_efl.cc +index bbea3d7..5ccf641 100644 +--- a/chromium_impl/content/common/paths_efl.cc ++++ b/chromium_impl/content/common/paths_efl.cc +@@ -15,7 +15,7 @@ + #include "build/tizen_version.h" + + #if defined(OS_TIZEN) +-#include ++#include + #if TIZEN_VERSION_AT_LEAST(3,0,0) + #include + #endif +diff --git a/chromium_impl/content/content_efl.gni b/chromium_impl/content/content_efl.gni +new file mode 100644 +index 0000000..7e95a98 +--- /dev/null ++++ b/chromium_impl/content/content_efl.gni +@@ -0,0 +1,109 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++import("//tizen_src/chromium_impl/components/components.gni") ++ ++external_content_common_configs = [ ++ "//tizen_src/build:capi-appfw-application", ++ "//tizen_src/build:libcapi-appfw-application", ++ "//tizen_src/build:tizen_tzplatform_config", ++ "//tizen_src/build:libtizen_tzplatform_config", ++ "//tizen_src/build:tts", ++ "//tizen_src/build:libtts", ++] ++ ++external_content_common_deps = [ "//build/linux:fontconfig" ] ++ ++external_content_browser_configs = [ ++ "//tizen_src/build:capi-media-player", ++ "//tizen_src/build:libcapi-media-player", ++ "//tizen_src/build:capi-media-tool", ++ "//tizen_src/build:libcapi-media-tool", ++ "//tizen_src/build:capi-system-sensor", ++ "//tizen_src/build:libcapi-system-sensor", ++ "//tizen_src/build:ecore", ++ "//tizen_src/build:libecore", ++ "//tizen_src/build:ecore-imf-evas", ++ "//tizen_src/build:libecore-imf-evas", ++ "//tizen_src/build:ecore-evas", ++ "//tizen_src/build:libecore-evas", ++ "//tizen_src/build:elementary", ++ "//tizen_src/build:libelementary", ++ "//tizen_src/build:efl-extension", ++ "//tizen_src/build:libefl-extension", ++] ++ ++external_content_browser_extra_configs = [ ++ "//tizen_src/build:tts", ++ "//tizen_src/build:libtts", ++] ++ ++external_content_browser_deps = [ ++ "//tizen_src/chromium_impl/efl:window-factory", ++ "//tizen_src/chromium_impl/edje_resources:edje_resources_efl", ++ "//ui/gl:gl", ++] ++ ++external_content_renderer_extra_configs = [ ++ "//tizen_src/build:tts", ++ "//tizen_src/build:libtts", ++] ++ ++external_content_renderer_deps = [ ++ "//tizen_src/chromium_impl/content:android_content_detection", ++] ++ ++external_content_gpu_configs = [ ++ "//tizen_src/build:evas", ++ "//tizen_src/build:libevas", ++] ++ ++external_content_shell_configs = [ ++ "//tizen_src/build:evas", ++ "//tizen_src/build:libevas", ++ "//tizen_src/build:ecore-evas", ++ "//tizen_src/build:libecore-evas", ++ "//tizen_src/build:elementary", ++ "//tizen_src/build:libelementary", ++] ++ ++external_content_shell_deps = [ ++ "//tizen_src/chromium_impl/efl:efl-init", ++] ++external_content_shell_deps += js_dialog_efl_deps ++ ++if (building_for_tizen) { ++ external_content_browser_configs += [ ++ "//tizen_src/build:vconf", ++ "//tizen_src/build:libvconf", ++ ] ++} ++ ++if (!use_wayland) { ++ external_content_common_configs += [ "//tizen_src/build:ecore-x" ] ++ external_content_common_configs += [ "//tizen_src/build:libecore-x" ] ++ external_content_browser_configs += [ "//tizen_src/build:x11" ] ++ external_content_browser_configs += [ "//tizen_src/build:libx11" ] ++ external_content_browser_extra_configs += [ "//tizen_src/build:ecore-x" ] ++ external_content_browser_extra_configs += [ "//tizen_src/build:libecore-x" ] ++ external_content_shell_configs += [ "//tizen_src/build:ecore-x" ] ++ external_content_shell_configs += [ "//tizen_src/build:libecore-x" ] ++} else { ++ external_content_common_configs += [ "//tizen_src/build:ecore-wayland" ] ++ external_content_common_configs += [ "//tizen_src/build:libecore-wayland" ] ++ external_content_shell_configs += [ "//tizen_src/build:ecore-wayland" ] ++ external_content_shell_configs += [ "//tizen_src/build:libecore-wayland" ] ++} ++ ++if (tizen_multimedia_support) { ++ external_content_browser_configs += [ ++ "//tizen_src/build:capi-media-player", ++ "//tizen_src/build:libcapi-media-player", ++ "//tizen_src/build:capi-media-tool", ++ "//tizen_src/build:libcapi-media-tool", ++ ] ++ external_content_common_configs += ["//tizen_src/build:gstreamer"] ++ external_content_common_configs += ["//tizen_src/build:libgstreamer"] ++} +diff --git a/chromium_impl/content/gpu/gpu_efl.gni b/chromium_impl/content/gpu/gpu_efl.gni +new file mode 100644 +index 0000000..97a5235 +--- /dev/null ++++ b/chromium_impl/content/gpu/gpu_efl.gni +@@ -0,0 +1,12 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++external_content_gpu_efl_sources = [ ++ "//tizen_src/chromium_impl/content/gpu/gpu_thread_override_efl.cc", ++ "//tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc", ++ "//tizen_src/chromium_impl/content/gpu/shared_mailbox_manager.h", ++ "//tizen_src/chromium_impl/content/gpu/shared_mailbox_manager.cc", ++] ++ ++external_exclude_content_gpu_efl_sources = [ "in_process_gpu_thread.cc" ] +diff --git a/chromium_impl/content/renderer/renderer_efl.gni b/chromium_impl/content/renderer/renderer_efl.gni +new file mode 100644 +index 0000000..ba3f05d +--- /dev/null ++++ b/chromium_impl/content/renderer/renderer_efl.gni +@@ -0,0 +1,34 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++external_exclude_content_renderer_efl_sources = [] ++ ++if (building_for_tizen) { ++ external_content_renderer_efl_sources = [ ++ "//tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.cc", ++ "//tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.h", ++ ] ++} ++ ++if (tizen_multimedia_support) { ++ external_exclude_content_renderer_efl_sources = [ ++ "//content/renderer/media/audio_decoder.cc", ++ "//content/renderer/media/audio_decoder.h", ++ ] ++ ++ external_content_renderer_efl_sources += [ ++ "media/efl/audio_decoder_efl.h", ++ "media/efl/media_source_delegate_efl.cc", ++ "media/efl/media_source_delegate_efl.h", ++ "media/efl/renderer_demuxer_efl.cc", ++ "media/efl/renderer_demuxer_efl.h", ++ "media/efl/renderer_media_player_manager_efl.cc", ++ "media/efl/renderer_media_player_manager_efl.h", ++ "media/efl/webmediaplayer_efl.cc", ++ "media/efl/webmediaplayer_efl.h", ++ "media/tizen/audio_decoder_capi.cc", ++ ] ++} +diff --git a/chromium_impl/content/shell/shell_efl.gni b/chromium_impl/content/shell/shell_efl.gni +new file mode 100644 +index 0000000..7e051e6 +--- /dev/null ++++ b/chromium_impl/content/shell/shell_efl.gni +@@ -0,0 +1,12 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++external_content_shell_lib_efl_sources = [ ++ "//tizen_src/chromium_impl/content/shell/browser/shell_efl.cc", ++ "//tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc" ++] ++ ++external_content_shell_efl_sources = [ "//tizen_src/chromium_impl/content/shell/browser/shell_main_efl.cc" ] ++ ++external_exclude_content_shell_efl_sources = [ "app/shell_main.cc" ] +diff --git a/chromium_impl/device/battery/battery_status_manager_tizen.cc b/chromium_impl/device/battery/battery_status_manager_tizen.cc +index 23deb1d..615c4db 100644 +--- a/chromium_impl/device/battery/battery_status_manager_tizen.cc ++++ b/chromium_impl/device/battery/battery_status_manager_tizen.cc +@@ -6,6 +6,7 @@ + + #include + #include ++#include + + namespace device { + +@@ -220,6 +221,7 @@ int BatteryStatusManagerTizen::GetRemainingTimeUntilDischarged( + } + + bool BatteryStatusManagerTizen::StartListeningBatteryChange() { ++#if !defined(EWK_BRINGUP) + if (vconf_notify_key_changed( + VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, OnChargingStatusChanged, this) || + device_battery_set_cb(OnLevelChanged, this) != DEVICE_ERROR_NONE || +@@ -230,6 +232,7 @@ bool BatteryStatusManagerTizen::StartListeningBatteryChange() { + StopListeningBatteryChange(); + return false; + } ++#endif + + int charging = 0; + if (vconf_get_int(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, &charging) < 0) +@@ -256,7 +259,9 @@ void BatteryStatusManagerTizen::StopListeningBatteryChange() { + UnsetRemainingTimeUntilDischargedCb(); + vconf_ignore_key_changed(VCONFKEY_SYSMAN_BATTERY_CHARGE_NOW, + OnChargingStatusChanged); ++#if !defined(EWK_BRINGUP) + device_battery_unset_cb(); ++#endif + } + + } // namespace device +diff --git a/chromium_impl/device/battery_tizen.gni b/chromium_impl/device/battery_tizen.gni +new file mode 100644 +index 0000000..0e5ee98 +--- /dev/null ++++ b/chromium_impl/device/battery_tizen.gni +@@ -0,0 +1,15 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++external_device_battery_configs = [ ++ "//tizen_src/build:capi-system-device", ++ "//tizen_src/build:libcapi-system-device", ++ "//tizen_src/build:vconf", ++ "//tizen_src/build:libvconf", ++] ++ ++external_device_battery_sources = [ ++ "//tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc", ++ "//tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.h", ++] +diff --git a/chromium_impl/device/vibration/vibration_efl.gni b/chromium_impl/device/vibration/vibration_efl.gni +new file mode 100644 +index 0000000..d0869ec +--- /dev/null ++++ b/chromium_impl/device/vibration/vibration_efl.gni +@@ -0,0 +1,11 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++external_device_vibration_efl_sources = [ ++ "//tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.cc", ++ "//tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.h", ++ "//tizen_src/chromium_impl/device/vibration/vibration_provider_client.h", ++] ++ ++external_exclude_device_vibration_efl_sources = [ "vibration_manager_impl_default.cc" ] +diff --git a/chromium_impl/device/vibration/vibration_manager_impl_efl.cc b/chromium_impl/device/vibration/vibration_manager_impl_efl.cc +index 3057af7..92ec0c5 100644 +--- a/chromium_impl/device/vibration/vibration_manager_impl_efl.cc ++++ b/chromium_impl/device/vibration/vibration_manager_impl_efl.cc +@@ -8,6 +8,14 @@ + + namespace device { + ++VibrationManagerImplEfl::VibrationManagerImplEfl( ++ mojo::InterfaceRequest request) ++ : binding_(this, std::move(request)) { ++} ++ ++VibrationManagerImplEfl::~VibrationManagerImplEfl() { ++} ++ + std::unique_ptr VibrationManagerImplEfl::provider_client_ = std::unique_ptr(); + + void VibrationManagerImplEfl::Vibrate(int64_t milliseconds, const VibrateCallback& callback) { +diff --git a/chromium_impl/device/vibration/vibration_manager_impl_efl.h b/chromium_impl/device/vibration/vibration_manager_impl_efl.h +index 3afd983..56664b9 100644 +--- a/chromium_impl/device/vibration/vibration_manager_impl_efl.h ++++ b/chromium_impl/device/vibration/vibration_manager_impl_efl.h +@@ -15,10 +15,12 @@ namespace device { + + class DEVICE_VIBRATION_EXPORT VibrationManagerImplEfl : public VibrationManager { + public: ++ // Moved ctor and dtor definitions in implementation file because of : ++ // error: [chromium-style] Complex constructor has an inlined body. ++ // error: [chromium-style] Complex destructor has an inline body. + explicit VibrationManagerImplEfl( +- mojo::InterfaceRequest request) +- : binding_(this, std::move(request)) {} +- ~VibrationManagerImplEfl() override {} ++ mojo::InterfaceRequest request); ++ ~VibrationManagerImplEfl() override; + + void Vibrate(int64_t milliseconds, const VibrateCallback& callback) override; + void Cancel(const CancelCallback& callback) override; +diff --git a/chromium_impl/edje_resources/BUILD.gn b/chromium_impl/edje_resources/BUILD.gn +new file mode 100644 +index 0000000..b43c08f +--- /dev/null ++++ b/chromium_impl/edje_resources/BUILD.gn +@@ -0,0 +1,34 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++template("edje_res_efl") { ++ edje_target_name = "${target_name}_generate" ++ action_foreach(edje_target_name) { ++ script = "//tizen_src/build/cmd_execution.py" ++ sources = invoker.sources ++ outputs = [ "$root_out_dir/resources/{{source_name_part}}.edj" ] ++ args = [ ++ "$edje_compiler", ++ "-id", ++ rebase_path("images/"), ++ rebase_path("{{source_file_part}}"), ++ rebase_path("$root_out_dir/resources/{{source_name_part}}.edj"), ++ ] ++ } ++ ++ source_set(target_name) { ++ deps = [ ":$edje_target_name" ] ++ } ++} ++ ++edje_res_efl("edje_resources_efl") { ++ sources = [ ++ "SelectionHandles.edc", ++ "Magnifier.edc", ++ "DisambiguationPopup.edc", ++ "Edge.edc", ++ ] ++} +diff --git a/chromium_impl/efl/BUILD.gn b/chromium_impl/efl/BUILD.gn +new file mode 100644 +index 0000000..e44699f +--- /dev/null ++++ b/chromium_impl/efl/BUILD.gn +@@ -0,0 +1,47 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++static_library("window-factory") { ++ configs += [ "//tizen_src/build:evas" ] ++ configs += [ "//tizen_src/build:libevas" ] ++ configs += [ "//tizen_src/build:elementary" ] ++ configs += [ "//tizen_src/build:libelementary" ] ++ public_configs = [ "//tizen_src/build:elementary-public" ] ++ ++ sources = [ ++ "window_factory.h", ++ "window_factory.cc", ++ ] ++} ++ ++static_library("efl-init") { ++ configs += [ "//tizen_src/build:evas" ] ++ configs += [ "//tizen_src/build:libevas" ] ++ configs += [ "//tizen_src/build:elementary" ] ++ configs += [ "//tizen_src/build:libelementary" ] ++ public_configs = [ "//tizen_src/build:elementary-public" ] ++ ++ deps = [ "//ui/compositor:compositor" ] ++ ++ sources = [ ++ "efl_export.h", ++ "init.h", ++ "init.cc", ++ ] ++ ++ if (use_ozone) { ++ deps += [ "//ui/ozone:ozone" ] ++ } ++ if (use_wayland) { ++ configs += [ "//tizen_src/build:ecore-wayland" ] ++ configs += [ "//tizen_src/build:libecore-wayland" ] ++ public_configs += [ "//tizen_src/build:ecore-wayland-public" ] ++ } else { ++ configs += [ "//tizen_src/build:ecore-x" ] ++ configs += [ "//tizen_src/build:libecore-x" ] ++ public_configs += [ "//tizen_src/build:ecore-x-public" ] ++ } ++} +diff --git a/chromium_impl/gpu/gpu_efl.gni b/chromium_impl/gpu/gpu_efl.gni +new file mode 100644 +index 0000000..87c6ab9 +--- /dev/null ++++ b/chromium_impl/gpu/gpu_efl.gni +@@ -0,0 +1,23 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++external_exclude_gpu_efl_sources = [ ++ "gpu_driver_bug_list_json.cc", ++ "gpu_info_collector_x11.cc", ++ "software_rendering_list_json.cc", ++] ++ ++if (!is_tizen) { ++ external_exclude_gpu_efl_sources += [ ++ "gpu_info_collector_linux.cc", ++ ] ++} ++ ++external_gpu_efl_sources = [ ++ "//tizen_src/chromium_impl/gpu/config/gpu_driver_bug_list_json_efl.cc", ++ "//tizen_src/chromium_impl/gpu/config/gpu_info_collector_efl.cc", ++ "//tizen_src/chromium_impl/gpu/config/software_rendering_list_json_efl.cc", ++ "//tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.cc", ++ "//tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.h" ++] +diff --git a/chromium_impl/media/BUILD.gn b/chromium_impl/media/BUILD.gn +new file mode 100644 +index 0000000..5d9a968 +--- /dev/null ++++ b/chromium_impl/media/BUILD.gn +@@ -0,0 +1,23 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++if (tizen_multimedia_support) { ++ config("media_efl_config") { ++ defines = [ ++ "TIZEN_VIDEO_CAPTURE_SUPPORT", ++ "TIZEN_MULTIMEDIA_ZEROCOPY_SUPPORT", ++ ] ++ ++ include_dirs = [ ++ "//third_party/WebKit", ++ "//third_party/libyuv/include", ++ "//third_party/mojo/src", ++ "//v8/include", ++ ] ++ ++ defines += [ "TIZEN_MULTIMEDIA_EME_SUPPORT = 1" ] ++ } ++} +diff --git a/chromium_impl/media/media_efl.gni b/chromium_impl/media/media_efl.gni +new file mode 100644 +index 0000000..04747a0 +--- /dev/null ++++ b/chromium_impl/media/media_efl.gni +@@ -0,0 +1,86 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++external_media_efl_deps = [] ++external_media_efl_sources = [] ++external_exclude_media_efl_sources = [] ++external_media_efl_config = [] ++ ++if (use_ozone) { ++ external_media_efl_deps += [ "//tizen_src/chromium_impl/ui/ozone:ozone_efl" ] ++} ++ ++if (tizen_multimedia_support) { ++ external_media_efl_deps += [ ++ "//tizen_src/build:capi-media-audio-io", ++ "//tizen_src/build:libcapi-media-audio-io", ++ "//tizen_src/build:capi-media-camera", ++ "//tizen_src/build:libcapi-media-camera", ++ "//tizen_src/build:capi-media-player", ++ "//tizen_src/build:libcapi-media-player", ++ "//tizen_src/build:ecore", ++ "//tizen_src/build:libecore", ++ "//tizen_src/build:mm_player", ++ ] ++ ++ if (!use_wayland) { ++ external_media_efl_deps += [ ++ "//tizen_src/build:ecore-x", ++ "//tizen_src/build:libecore-x", ++ "//ui/gl:gl", ++ ] ++ } else { ++ external_media_efl_deps += [ "//tizen_src/build:ecore-wayland" ] ++ external_media_efl_deps += [ "//tizen_src/build:libecore-wayland" ] ++ } ++ ++ if (building_for_tizen_mobile) { ++ external_media_efl_deps += [ "//tizen_src/build:capi-system-device" ] ++ external_media_efl_deps += [ "//tizen_src/build:libcapi-system-device" ] ++ } ++ ++ external_media_efl_sources += [ ++ "audio/tizen/audio_manager_capi.cc", ++ "audio/tizen/audio_manager_capi.h", ++ "audio/tizen/audio_manager_tizen.cc", ++ "audio/tizen/capi_audio_input.cc", ++ "audio/tizen/capi_audio_input.h", ++ "audio/tizen/capi_audio_output.cc", ++ "audio/tizen/capi_audio_output.h", ++ "audio/tizen/capi_util.cc", ++ "audio/tizen/capi_util.h", ++ "base/efl/demuxer_efl.h", ++ "base/efl/demuxer_stream_player_params_efl.cc", ++ "base/efl/demuxer_stream_player_params_efl.h", ++ "base/efl/media_player_efl.cc", ++ "base/efl/media_player_efl.h", ++ "base/efl/media_player_manager_efl.h", ++ "base/efl/media_player_util_efl.cc", ++ "base/efl/media_player_util_efl.h", ++ "base/efl/webaudio_decoder_efl.h", ++ "base/efl/webaudio_media_codec_info_efl.h", ++ "base/tizen/media_player_bridge_capi.cc", ++ "base/tizen/media_player_bridge_capi.h", ++ "base/tizen/media_source_player_capi.cc", ++ "base/tizen/media_source_player_capi.h", ++ "base/tizen/webaudio_decoder_browser_capi.cc", ++ "base/tizen/webaudio_decoder_browser_capi.h", ++ "capture/video/tizen/video_capture_device_factory_tizen.cc", ++ "capture/video/tizen/video_capture_device_factory_tizen.h", ++ "capture/video/tizen/video_capture_device_tizen.cc", ++ "capture/video/tizen/video_capture_device_tizen.h", ++ ] ++ ++ external_exclude_media_efl_sources += [ ++ "audio/linux/audio_manager_linux.cc", ++ "capture/video/linux/video_capture_device_factory_linux.cc", ++ "capture/video/linux/video_capture_device_factory_linux.h", ++ "capture/video/linux/video_capture_device_linux.cc", ++ "capture/video/linux/video_capture_device_linux.h", ++ ] ++ ++ external_media_efl_config += [ ":media_efl_config" ] ++} +diff --git a/chromium_impl/third_party/blink/renderer/core/BUILD.gn b/chromium_impl/third_party/blink/renderer/core/BUILD.gn +new file mode 100644 +index 0000000..d436269 +--- /dev/null ++++ b/chromium_impl/third_party/blink/renderer/core/BUILD.gn +@@ -0,0 +1,32 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++source_set("webkit_core_generated") { ++ sources = [ ++ "$root_gen_dir/TizenUserAgentStyleSheets.h", ++ "$root_gen_dir/TizenUserAgentStyleSheetsData.cpp", ++ ] ++ ++ deps = [ ":TizenUserAgentStyleSheets" ] ++} ++ ++action("TizenUserAgentStyleSheets") { ++ script = "make-file-arrays.py" ++ stylesheet = "rendering/themeChromiumTizen.css" ++ inputs = [ ++ stylesheet, ++ ] ++ outputs = [ ++ "$root_gen_dir/TizenUserAgentStyleSheets.h", ++ "$root_gen_dir/TizenUserAgentStyleSheetsData.cpp", ++ ] ++ out_h = rebase_path("$root_gen_dir/TizenUserAgentStyleSheets.h", root_build_dir) ++ out_cpp = rebase_path("$root_gen_dir/TizenUserAgentStyleSheetsData.cpp", root_build_dir) ++ args = [ ++ "--namespace", ++ "blink", ++ "--out-h=$out_h", ++ "--out-cpp=$out_cpp", ++ ] + rebase_path(inputs, root_build_dir) ++} +diff --git a/chromium_impl/third_party/blink/renderer/core/core_efl.gni b/chromium_impl/third_party/blink/renderer/core/core_efl.gni +new file mode 100644 +index 0000000..e473da9 +--- /dev/null ++++ b/chromium_impl/third_party/blink/renderer/core/core_efl.gni +@@ -0,0 +1,26 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++# For //third_party/blink/renderer/core:rendering target ++# Temporary kept in the //third_party/blink/renderer/core:remaining target ++if (is_tizen) { ++ # Already excluded using !linux in //third_party/blink/renderer/core/BUILD.gn ++ external_exclude_webkit_core_rendering_sources = [] ++} else { ++# [TODO] This code should be fixed. ++# external_exclude_webkit_core_rendering_sources = [ "layout/LayoutThemeLinux.cpp" ] ++ external_exclude_webkit_core_rendering_sources = [] ++} ++external_webkit_core_rendering_sources = [ ++ "//tizen_src/chromium_impl/third_party/blink/renderer/core/rendering/RenderThemeChromiumTizen.cpp", ++ "//tizen_src/chromium_impl/third_party/blink/renderer/core/rendering/RenderThemeChromiumTizen.h", ++] ++ ++# For //third_party/blink/renderer/core:core_generated target ++external_webkit_core_generated_deps = [ ++ "//tizen_src/chromium_impl/third_party/blink/renderer/core:webkit_core_generated", ++] ++ ++# For //third_party/blink/renderer/core:make_core_generated target ++external_webkit_core_make_generated_deps = [ "//tizen_src/chromium_impl/third_party/blink/renderer/core:TizenUserAgentStyleSheets" ] +diff --git a/chromium_impl/third_party/blink/renderer/core/make-file-arrays.py b/chromium_impl/third_party/blink/renderer/core/make-file-arrays.py +index 0bedc2d..c7f1a6d 100755 +--- a/chromium_impl/third_party/blink/renderer/core/make-file-arrays.py ++++ b/chromium_impl/third_party/blink/renderer/core/make-file-arrays.py +@@ -109,7 +109,8 @@ def write_header_file(header_file_name, flag, names_and_contents, namespace): + + def write_cpp_file(cpp_file_name, flag, names_and_contents, header_file_name, namespace): + with open(cpp_file_name, 'w') as cpp_file: +- cpp_file.write('#include "config.h"\n') ++ # TODO : commented for gn build. ++ #cpp_file.write('#include "config.h"\n') + cpp_file.write('#include "%s"\n' % os.path.basename(header_file_name)) + if flag: + cpp_file.write('#if ' + flag + '\n') +diff --git a/chromium_impl/third_party/blink/renderer/modules/modules_efl.gni b/chromium_impl/third_party/blink/renderer/modules/modules_efl.gni +new file mode 100644 +index 0000000..fb84a85 +--- /dev/null ++++ b/chromium_impl/third_party/blink/renderer/modules/modules_efl.gni +@@ -0,0 +1,10 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++if (use_gstreamer_fft) { ++ external_webkit_modules_configs = [ "//tizen_src/build:gstreamer-fft" ] ++ external_webkit_modules_configs += [ "//tizen_src/build:libgstreamer-fft" ] ++} +diff --git a/chromium_impl/third_party/blink/renderer/platform/blink_platform_efl.gni b/chromium_impl/third_party/blink/renderer/platform/blink_platform_efl.gni +new file mode 100644 +index 0000000..fea7652 +--- /dev/null ++++ b/chromium_impl/third_party/blink/renderer/platform/blink_platform_efl.gni +@@ -0,0 +1,5 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++external_webkit_platform_files = [ "//tizen_src/chromium_impl/third_party/blink/renderer/platform/audio/gstreamer/FFTFrameGStreamer.cpp" ] +diff --git a/chromium_impl/ui/BUILD.gn b/chromium_impl/ui/BUILD.gn +new file mode 100644 +index 0000000..9132e91 +--- /dev/null ++++ b/chromium_impl/ui/BUILD.gn +@@ -0,0 +1,32 @@ ++# copyright (c) 2015 samsung electronics. all rights reserved. ++# use of this source code is governed by a bsd-style license that can be ++# found in the license file. ++ ++static_library("ui_events_source_inject") { ++ sources = [ ++ # Indirectly includes ui/events/gestures/gesture_recognizer_impl_efl.cc/h. ++ "events/gestures/gesture_recognizer_impl_override.cc", ++ "events/gestures/gesture_recognizer_impl_efl.cc", ++ "events/gestures/gesture_recognizer_impl_efl.h", ++ "//ui/events/gestures/gesture_provider_aura.cc", ++ "//ui/events/gestures/gesture_provider_aura.h", ++ "//ui/events/gestures/motion_event_aura.cc", ++ "//ui/events/gestures/motion_event_aura.h", ++ ] ++} ++ ++static_library("ui_native_theme_inject") { ++ sources = [ ++ "//ui/native_theme/native_theme_aura.h", ++ "//ui/native_theme/native_theme_aura.cc", ++ ] ++ deps = [ "//skia" ] ++} ++ ++static_library("ui_base_inject") { ++ sources = [ ++ #"//ui/base/cursor/cursors_aura.h", ++ #"//ui/base/cursor/cursors_aura.cc", ++ ] ++ deps = [ "//skia" ] ++} +diff --git a/chromium_impl/ui/gl/gl_image_efl_pixmap.h b/chromium_impl/ui/gl/gl_image_efl_pixmap.h +index d4272e4..8f85bb3 100644 +--- a/chromium_impl/ui/gl/gl_image_efl_pixmap.h ++++ b/chromium_impl/ui/gl/gl_image_efl_pixmap.h +@@ -22,7 +22,6 @@ class GL_EXPORT GLImageEflPixmap : public GLImage { + virtual void Destroy(bool have_context) override; + virtual gfx::Size GetSize() override; + virtual bool BindTexImage(unsigned target) override; +- virtual void ReleaseTexImage(unsigned target) override; + virtual bool CopyTexSubImage(unsigned target, + const gfx::Point& offset, + const gfx::Rect& rect) override; +diff --git a/chromium_impl/ui/ozone/BUILD.gn b/chromium_impl/ui/ozone/BUILD.gn +new file mode 100644 +index 0000000..21822ea +--- /dev/null ++++ b/chromium_impl/ui/ozone/BUILD.gn +@@ -0,0 +1,26 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++static_library("ozone_efl") { ++ deps = [ "//ui/ozone/common" ] ++ ++ if (!use_wayland) { ++ configs += [ "//tizen_src/build:ecore-x" ] ++ configs += [ "//tizen_src/build:libecore-x" ] ++ } else { ++ configs += [ "//tizen_src/build:ecore-wayland" ] ++ configs += [ "//tizen_src/build:libecore-wayland" ] ++ } ++ ++ sources = [ ++ "client_native_pixmap_factory_efl.h", ++ "client_native_pixmap_factory_efl.cc", ++ "ozone_platform_efl.h", ++ "ozone_platform_efl.cc", ++ "surface_factory_efl.h", ++ "surface_factory_efl.cc", ++ ] ++} +diff --git a/chromium_impl/ui/ui_efl.gni b/chromium_impl/ui/ui_efl.gni +new file mode 100644 +index 0000000..6d86b21 +--- /dev/null ++++ b/chromium_impl/ui/ui_efl.gni +@@ -0,0 +1,136 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("ui_efl_injections.gni") ++import("//tizen_src/build/config/tizen_features.gni") ++ ++external_ui_base_configs = [ ++ "//tizen_src/build:elementary", ++ "//tizen_src/build:libelementary", ++] ++ ++external_ui_gl_configs = [ ++ "//tizen_src/build:evas", ++ "//tizen_src/build:libevas", ++ "//tizen_src/build:ecore-evas", ++ "//tizen_src/build:libecore-evas", ++ "//tizen_src/build:libdrm", ++ "//tizen_src/build:liblibdrm", ++ "//tizen_src/build:libtbm", ++ "//tizen_src/build:liblibtbm", ++] ++ ++external_ui_gfx_x11_configs = [] ++external_ui_gfx_configs = [] ++external_ozone_platform_deps = [] ++ ++if (!use_wayland) { ++ external_ui_base_configs += [ ++ "//tizen_src/build:ecore-x", ++ "//tizen_src/build:libecore-x", ++ "//tizen_src/build:x11", ++ "//tizen_src/build:libx11", ++ ] ++ external_ui_gl_configs += [ "//tizen_src/build:libdri2" ] ++ external_ui_gl_configs += [ "//tizen_src/build:liblibdri2" ] ++ external_ui_gfx_x11_configs += [ "//tizen_src/build:ecore-x" ] ++ external_ui_gfx_x11_configs += [ "//tizen_src/build:libecore-x" ] ++ external_ui_gfx_configs += [ "//tizen_src/build:ecore-x" ] ++ external_ui_gfx_configs += [ "//tizen_src/build:libecore-x" ] ++ ++ if (building_for_tizen) { ++ # needed for efl_pixmap.cc/h ++ external_ui_gl_configs += [ "//tizen_src/build:x11" ] ++ external_ui_gl_configs += [ "//tizen_src/build:libx11" ] ++ } ++} else { ++ external_ui_gfx_configs += [ "//tizen_src/build:ecore-wayland" ] ++ external_ui_gfx_configs += [ "//tizen_src/build:libecore-wayland" ] ++} ++ ++if (use_ozone) { ++ external_ozone_platform_deps += [ ++ "//tizen_src/chromium_impl/ui/ozone:ozone_efl", ++ "//ui/events/devices:devices", ++ ] ++} ++ ++# For //ui/gfx target ++external_ui_gfx_sources = [ ++ "//ui/gfx/nine_image_painter.cc", ++ "//ui/gfx/nine_image_painter.h", ++ "//tizen_src/chromium_impl/ui/display/device_display_info_efl.cc", ++ "//tizen_src/chromium_impl/ui/display/device_display_info_efl.h", ++ "//tizen_src/chromium_impl/ui/display/screen_efl.h", ++ "//tizen_src/chromium_impl/ui/display/screen_efl.cc", ++] ++ ++# For //ui/gfx/x target ++external_ui_gfx_x11_sources = [ "//tizen_src/chromium_impl/ui/gfx/x/x11_types_override.cc" ] ++external_exclude_ui_gfx_x11_sources = [ "x11_types.cc" ] ++if (wayland_bringup) { ++ external_exclude_ui_gfx_x11_sources += [ "gfx/x11_types_override.cc" ] ++} ++ ++external_exclude_ui_gl_sources = [] ++# For //ui/gl target ++external_exclude_ui_gl_sources += [ "gl_context_egl.cc" ] ++external_ui_gl_sources = [ ++ "//tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.h", ++ "//tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc", ++ "//tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc", ++ "//tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc", ++] ++if (building_for_tizen) { ++ external_ui_gl_sources += [ ++ "//tizen_src/chromium_impl/ui/gl/gl_image_efl_pixmap.cc", ++ "//tizen_src/chromium_impl/ui/gl/gl_image_efl_pixmap.h", ++ ] ++ if (!wayland_bringup) { ++ external_ui_gl_sources += [ ++ "//tizen_src/chromium_impl/ui/gl/efl_pixmap.cc", ++ "//tizen_src/chromium_impl/ui/gl/efl_pixmap.h", ++ ] ++ } ++} ++ ++# For //ui/events/platform/x11 target ++external_exclude_ui_x11_event_sources = [] ++if (wayland_bringup) { ++ external_exclude_ui_x11_event_sources = [ ++ "gfx/x11_event_source_efl.h", ++ "gfx/x11_event_source_efl.cc", ++ ] ++} ++ ++# For //ui/base target ++external_ui_base_includes = [ "//third_party/mojo/src/" ] ++external_ui_base_sources = [ ++ "//ui/base/cursor/cursor.h", ++ "//ui/base/cursor/cursor.cc", ++ "//ui/base/nine_image_painter_factory.h", ++ "//tizen_src/chromium_impl/ui/base/resource/resource_bundle_efl.cc", ++ "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_efl.cc", ++ "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_efl.h", ++ "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl.cc", ++ "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl.h", ++] ++if (use_x11) { ++ if (!wayland_bringup) { ++ external_ui_base_sources += [ ++ "//ui/base/cursor/cursor_x11.cc", ++ "//ui/base/cursor/cursor_x11.h", ++ "//ui/base/cursor/cursor_loader_x11.h", ++ "//ui/base/cursor/cursor_loader_x11.cc", ++ ] ++ } ++} ++external_exclude_ui_base_sources = [] ++ ++# For //ui/snapshot target ++external_ui_snapshot_sources = [ "//tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc" ] ++ ++# For //ui/events:gesture_detection target ++external_exclude_ui_gesture_detection_sources = [ "gesture_detection/gesture_configuration_default.cc"] ++external_ui_gesture_detection_sources = [ "//tizen_src/chromium_impl/ui/events/gesture_detection/gesture_configuration_efl.cc" ] +diff --git a/chromium_impl/ui/ui_efl_injections.gni b/chromium_impl/ui/ui_efl_injections.gni +new file mode 100644 +index 0000000..6209c0a +--- /dev/null ++++ b/chromium_impl/ui/ui_efl_injections.gni +@@ -0,0 +1,37 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++# In static mode, we build some sources that is needed ++# by efl-port as injectable static library. ++# However, in component mode, we build each of ui modules ++# as single DLL. So we include needed sources directly. ++ ++external_ui_base_static_lib_deps = [ "//tizen_src/chromium_impl/ui:ui_base_inject" ] ++ ++external_ui_events_static_lib_deps = [ "//tizen_src/chromium_impl/ui:ui_events_source_inject" ] ++ ++external_native_theme_static_lib_deps = [ "//tizen_src/chromium_impl/ui:ui_native_theme_inject" ] ++ ++# For //ui/base target ++external_ui_base_shared_lib_sources = [ ++ "cursor/cursors_aura.cc", ++ "cursor/cursors_aura.h", ++] ++ ++# For //ui/events target ++external_ui_events_shared_lib_sources = [ ++ "events/gestures/gesture_recognizer_impl_override.cc", ++ "events/gestures/gesture_recognizer_impl_efl.cc", ++ "events/gestures/gesture_recognizer_impl_efl.h", ++ "gestures/gesture_provider_aura.cc", ++ "gestures/gesture_provider_aura.h", ++ "gestures/motion_event_aura.cc", ++ "gestures/motion_event_aura.h", ++] ++ ++# For //ui/native_theme target ++external_ui_native_theme_shared_lib_sources = [ ++ "native_theme_aura.cc", ++ "native_theme_aura.h", ++] +diff --git a/ewk/BUILD.gn b/ewk/BUILD.gn +new file mode 100644 +index 0000000..0770d10 +--- /dev/null ++++ b/ewk/BUILD.gn +@@ -0,0 +1,12 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++group("chromium_efl_all") { ++ testonly = true ++ deps = [ ++# "//tizen_src/ewk/unittest:ewk_unittests", ++ "//tizen_src/ewk/ubrowser:ubrowser", ++ "//tizen_src/ewk/efl_webview_app:efl_webview_app", ++ ] ++} +diff --git a/ewk/efl_integration/BUILD.gn b/ewk/efl_integration/BUILD.gn +new file mode 100644 +index 0000000..082d2a7 +--- /dev/null ++++ b/ewk/efl_integration/BUILD.gn +@@ -0,0 +1,549 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//build/config/allocator.gni") ++import("//build/config/features.gni") ++ ++# [M48_2564] Temporary disabling the flag for switching to new chromium ++# FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15382 ++tizen_autofill_support = false ++ ++# Components used to auto generate CHROMIUM_VERSION preprocessor define. ++#TODO : below uncomment ++#version_file = "//chrome/VERSION" ++#version_script = "//build/util/version.py" ++#version_pattern = "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" ++ ++shared_library("chromium-ewk") { ++ include_dirs = [ ++ ".", ++ "//tizen_src/ewk/efl_integration/public", ++ "//third_party/skia/include/core", ++ "//v8/include", ++ "$root_gen_dir/blink", ++ ] ++ configs += [ "//tizen_src/build:ecore" ] ++ configs += [ "//tizen_src/build:libecore" ] ++ configs += [ "//tizen_src/build:evas" ] ++ configs += [ "//tizen_src/build:libevas" ] ++ configs += [ "//tizen_src/build:ecore-evas" ] ++ configs += [ "//tizen_src/build:libecore-evas" ] ++ public_configs = [ "//tizen_src/build:ecore-evas-public" ] ++ configs += [ "//tizen_src/build:elementary" ] ++ configs += [ "//tizen_src/build:libelementary" ] ++ public_configs += [ "//tizen_src/build:elementary-public" ] ++ configs += [ "//tizen_src/build:gstreamer" ] ++ configs += [ "//tizen_src/build:libgstreamer" ] ++ public_configs += [ "//tizen_src/build:gstreamer-public" ] ++ configs += [ "//tizen_src/build:vconf" ] ++ configs += [ "//tizen_src/build:libvconf" ] ++ public_configs += [ "//tizen_src/build:vconf-public" ] ++ configs += [ "//tizen_src/build:capi-location-manager" ] ++ configs += [ "//tizen_src/build:libcapi-location-manager" ] ++ public_configs += [ "//tizen_src/build:capi-location-manager-public" ] ++ configs += [ "//tizen_src/build:capi-system-info" ] ++ configs += [ "//tizen_src/build:libcapi-system-info" ] ++ public_configs += [ "//tizen_src/build:capi-system-info-public" ] ++ configs += [ "//tizen_src/build:capi-media-camera" ] ++ configs += [ "//tizen_src/build:libcapi-media-camera" ] ++ public_configs += [ "//tizen_src/build:capi-media-camera-public" ] ++ configs += [ "//tizen_src/build:feedback" ] ++ configs += [ "//tizen_src/build:libfeedback" ] ++ public_configs += [ "//tizen_src/build:feedback-public" ] ++ configs += [ "//tizen_src/build:efl-extension" ] ++ configs += [ "//tizen_src/build:libefl-extension" ] ++ public_configs += [ "//tizen_src/build:efl-extension-public" ] ++ configs += [ "//tizen_src/build:ui-gadget" ] ++ configs += [ "//tizen_src/build:libui-gadget" ] ++ public_configs += [ "//tizen_src/build:ui-gadget-public" ] ++ deps = [ ++ "//tizen_src/ewk/po_tizen:locale_efl", ++ "//tizen_src/chromium_impl/efl:efl-init", ++ ++ "//base/:base_static", ++ "//chrome/browser/media/router:mojo_bindings", ++ "//chrome:packed_resources", ++ "//content/public/browser", ++ "//content/shell:resources", ++ "//content/shell:pak", ++ "//components/visitedlink/browser", ++ "//components/visitedlink/renderer", ++ "//components/sessions", ++ "//components/autofill/content/renderer", ++ "//components/autofill/content/browser", ++ "//components/network_session_configurator", ++ "//components/password_manager/content/browser", ++ "//components/password_manager/core/common", ++ "//components/password_manager/core/browser", ++ "//components/plugins/renderer", ++ "//components/variations", ++ "//device/vibration", ++ "//extensions:shell_and_test_pak", ++ "//printing", ++ "//skia", ++ "//storage/browser", ++ "//third_party/leveldatabase", ++ "//third_party/sqlite", ++ "//third_party/blink/renderer/wtf", ++ "//ui/compositor", ++ "//ui/events", ++ "//ui/events:events_base", ++ "//ui/gl", ++ "//v8", ++ ] ++ ++ # TODO : needs to check for generating this macro define ++ defines = [ "CHROMIUM_VERSION=\" form_to_save, ++ std::unique_ptr form_to_save, + CredentialSourceType type, + bool update_password) override; + +@@ -48,7 +48,7 @@ public: + void NotifyUserAutoSignin( + ScopedVector local_forms) override; + void AutomaticPasswordSave( +- scoped_ptr saved_form_manager) override; ++ std::unique_ptr saved_form_manager) override; + + const PasswordManager* GetPasswordManager() const override; + const CredentialsFilter* GetStoreResultFilter() const override; +diff --git a/ewk/efl_integration/common/version_info.cc b/ewk/efl_integration/common/version_info.cc +index b1f427d..43db755 100644 +--- a/ewk/efl_integration/common/version_info.cc ++++ b/ewk/efl_integration/common/version_info.cc +@@ -124,7 +124,8 @@ std::string VersionInfo::ProductNameAndVersionForUserAgent() const { + // if the browser supports the WebRTC feature. + // TODO(max koo): Do we need to open our real version number + // or just use Chrome/aa.bb.cc.dd as Chromium/Chrome do? +- return std::string("Chrome/") + CHROMIUM_VERSION; ++ // TODO(suchit): Need to fix for chromium version in gn file ++ return std::string("Chrome/") /*+ CHROMIUM_VERSION*/; + } + + std::string VersionInfo::DefaultUserAgent() const { +diff --git a/ewk/efl_integration/launch_exec.sh b/ewk/efl_integration/launch_exec.sh +index 16f4d90..18e80b4 100755 +--- a/ewk/efl_integration/launch_exec.sh ++++ b/ewk/efl_integration/launch_exec.sh +@@ -27,7 +27,7 @@ else + fi + + CHROMIUM_EFL_LIBDIR=$(readlink -e $SCRIPTDIR/lib) +-CHROMIUM_EFL_DEPENDENCIES_LIBDIR=$(readlink -e $SCRIPTDIR/../Dependencies/Root/$_LIBDIR) ++CHROMIUM_EFL_DEPENDENCIES_LIBDIR=$(readlink -e $SCRIPTDIR/Dependencies/Root/$_LIBDIR) + + export LD_LIBRARY_PATH=$CHROMIUM_EFL_DEPENDENCIES_LIBDIR:$CHROMIUM_EFL_LIBDIR:${LD_LIBRARY_PATH} + echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}" +diff --git a/ewk/efl_integration/resource/BUILD.gn b/ewk/efl_integration/resource/BUILD.gn +new file mode 100644 +index 0000000..fa6f35f +--- /dev/null ++++ b/ewk/efl_integration/resource/BUILD.gn +@@ -0,0 +1,33 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++template("edje_res_ewk") { ++ edje_target_name = "${target_name}_generate" ++ action_foreach(edje_target_name) { ++ script = "//tizen_src/build/cmd_execution.py" ++ sources = invoker.sources ++ outputs = [ "$root_out_dir/resources/{{source_name_part}}.edj" ] ++ args = [ ++ "$edje_compiler", ++ "-id", ++ rebase_path("../images/"), ++ rebase_path("{{source_file_part}}"), ++ rebase_path("$root_out_dir/resources/{{source_name_part}}.edj"), ++ ] ++ } ++ ++ source_set(target_name) { ++ data = [ ":$edje_target_name" ] ++ } ++} ++ ++edje_res_ewk("edje_resources_ewk") { ++ sources = [ ++ "AutofillPopup.edc", ++ "JavaScriptPopup.edc", ++ "control.edc", ++ ] ++} +diff --git a/ewk/efl_webview_app/BUILD.gn b/ewk/efl_webview_app/BUILD.gn +new file mode 100644 +index 0000000..7b413ac +--- /dev/null ++++ b/ewk/efl_webview_app/BUILD.gn +@@ -0,0 +1,117 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++copy("efl_webview_app_script") { ++ sources = [ "efl_webview_app.sh" ] ++ outputs = [ "$root_out_dir/{{source_file_part}}" ] ++} ++ ++executable("efl_webview_app") { ++ deps = [ ++ ":efl_webview_app_script", ++ ] ++ configs += [ "//tizen_src/build:capi-system-device" ] ++ configs += [ "//tizen_src/build:libcapi-system-device" ] ++ public_configs = [ "//tizen_src/build:capi-system-device-public" ] ++ configs += [ "//tizen_src/build:evas" ] ++ configs += [ "//tizen_src/build:libevas" ] ++ configs += [ "//tizen_src/build:ecore" ] ++ configs += [ "//tizen_src/build:libecore" ] ++ configs += [ "//tizen_src/build:ecore-evas" ] ++ configs += [ "//tizen_src/build:libecore-evas" ] ++ public_configs += [ "//tizen_src/build:ecore-evas-public" ] ++ configs += [ "//tizen_src/build:elementary" ] ++ configs += [ "//tizen_src/build:libelementary" ] ++ public_configs += [ "//tizen_src/build:elementary-public" ] ++ deps += [ ++ "//tizen_src/ewk/efl_integration:chromium-ewk", ++ "//tizen_src/ewk/efl_integration:launch_exec", ++ ] ++ import("../tizen_version_defines_for_apps.gni") ++ cflags = [ ++ # Treat warning as error for this target. ++ # It needs to be included by means of pattern list because '-Werror' cflag ++ # will be excluded in chromium side (src/build/common.gypi), and GYP ++ # processes pattern lists after exclusion lists. ++ # (ref: https://gyp.gsrc.io/docs/InputFormatReference.md#Processing-Order) ++ "-Werror" ++ ] ++ if (!use_wayland) { ++ configs += [ "//tizen_src/build:ecore-x" ] ++ configs += [ "//tizen_src/build:libecore-x" ] ++ public_configs += [ "//tizen_src/build:ecore-x-public" ] ++ } else { ++ configs += [ "//tizen_src/build:ecore-wayland" ] ++ configs += [ "//tizen_src/build:libecore-wayland" ] ++ public_configs += [ "//tizen_src/build:ecore-wayland-public" ] ++ } ++ include_dirs = [ "../efl_integration" ] ++ sources = [ "app.c" ] ++ ldflags = [ "-Llib" ] ++ #libs = [ "libchromium-ewk" ] ++} ++ ++executable("mini_browser") { ++ cflags = [ ++ # Treat warning as error for this target. ++ # It needs to be included by means of pattern list because '-Werror' cflag ++ # will be excluded in chromium side (src/build/common.gypi), and GYP ++ # processes pattern lists after exclusion lists. ++ # (ref: https://gyp.gsrc.io/docs/InputFormatReference.md#Processing-Order) ++ "-Werror" ++ ] ++ sources = [] ++ include_dirs = [] ++ ldflags = [] ++ libs = [] ++ deps = [] ++ if (building_for_tizen) { # FIXME: mini_browser shouldn't depend on dlog and appcore-efl without OS(TIZEN) checks ++ sources += [ ++ "mini_browser.c", ++ "browser-object.h", ++ "browser-string.h", ++ ] ++ include_dirs += [ "../efl_integration" ] ++ configs += [ "//tizen_src/build:capi-system-device" ] ++ configs += [ "//tizen_src/build:libcapi-system-device" ] ++ public_configs = [ "//tizen_src/build:capi-system-device-public" ] ++ configs += [ "//tizen_src/build:capi-appfw-application" ] ++ configs += [ "//tizen_src/build:libcapi-appfw-application" ] ++ public_configs += [ "//tizen_src/build:capi-appfw-application-public" ] ++ configs += [ "//tizen_src/build:evas" ] ++ configs += [ "//tizen_src/build:libevas" ] ++ configs += [ "//tizen_src/build:ecore" ] ++ configs += [ "//tizen_src/build:libecore" ] ++ configs += [ "//tizen_src/build:ecore-evas" ] ++ configs += [ "//tizen_src/build:libecore-evas" ] ++ public_configs += [ "//tizen_src/build:ecore-evas-public" ] ++ configs += [ "//tizen_src/build:efl-extension" ] ++ configs += [ "//tizen_src/build:libefl-extension" ] ++ public_configs += [ "//tizen_src/build:efl-extension-public" ] ++ configs += [ "//tizen_src/build:elementary" ] ++ configs += [ "//tizen_src/build:libelementary" ] ++ public_configs += [ "//tizen_src/build:elementary-public" ] ++ deps += [ ++ "//tizen_src/ewk/efl_integration:chromium-ewk", ++ #"//build/linux:glib", removed from the chromium ++ ] ++ configs += [ "//build/config/linux:glib" ] ++ import("../tizen_version_defines_for_apps.gni") ++ if (!use_wayland) { ++ configs += [ "//tizen_src/build:ecore-x" ] ++ configs += [ "//tizen_src/build:libecore-x" ] ++ public_configs += [ "//tizen_src/build:ecore-x-public" ] ++ } else { ++ configs += [ "//tizen_src/build:ecore-wayland" ] ++ configs += [ "//tizen_src/build:libecore-wayland" ] ++ public_configs += [ "//tizen_src/build:ecore-wayland-public" ] ++ } ++ ldflags += [ "-ldlog" ] ++ ldflags += [ "-ldbus-glib-1" ] ++ libs += [ "dlog" ] ++ libs += [ "dbus-glib-1" ] ++ } ++} +diff --git a/ewk/efl_webview_app/app.c b/ewk/efl_webview_app/app.c +index fcdd83d..7349697 100644 +--- a/ewk/efl_webview_app/app.c ++++ b/ewk/efl_webview_app/app.c +@@ -1034,7 +1034,7 @@ void __customize_context_menu_cb(void* data, Evas_Object *obj, void *event_info) + + static void get_app_cache_usage_cb(int64_t usage, void* user_data) + { +- static int count_usage_callback = 0; ++ static unsigned int count_usage_callback = 0; + Ewk_Security_Origin* origin = (Ewk_Security_Origin*)user_data; + printf("AppCache usage for %s is %ld\n", ewk_security_origin_host_get(origin), (long int)usage); + ewk_context_application_cache_delete(ewk_context_default_get(), origin); +@@ -1075,7 +1075,7 @@ static void get_origins_for_webDB_cb(Eina_List* origins, void* user_data) + Eina_List* list_iterator = NULL; + void* data = NULL; + web_database_origins = origins; +- static int flag = 0; ++ static unsigned int flag = 0; + EINA_LIST_FOREACH(origins, list_iterator, data) { + Ewk_Security_Origin* origin = (Ewk_Security_Origin*)(data); + printf("Web Database origin : %s\n", ewk_security_origin_host_get(origin)); +diff --git a/ewk/efl_webview_app/mini_browser.c b/ewk/efl_webview_app/mini_browser.c +index 32423c2..e2844a9 100644 +--- a/ewk/efl_webview_app/mini_browser.c ++++ b/ewk/efl_webview_app/mini_browser.c +@@ -2,7 +2,7 @@ + // Use of this source code is governed by a BSD-style license that can be + // found in the LICENSE file. + +-#include ++#include + #include + #include + #include +diff --git a/ewk/po_tizen/BUILD.gn b/ewk/po_tizen/BUILD.gn +new file mode 100644 +index 0000000..a1c4940 +--- /dev/null ++++ b/ewk/po_tizen/BUILD.gn +@@ -0,0 +1,90 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++declare_args() { ++ msgfmt = "/usr/bin/msgfmt" ++} ++ ++template("po_translations") { ++ po_target_name = "${target_name}_generate" ++ action_foreach(po_target_name) { ++ script = "//tizen_src/build/cmd_execution.py" ++ sources = invoker.sources ++ outputs = [ "$root_out_dir/locale/{{source_name_part}}/LC_MESSAGES/WebKit.mo" ] ++ args = [ ++ "$msgfmt", ++ "-o", ++ rebase_path("$root_out_dir/locale/{{source_name_part}}/LC_MESSAGES/WebKit.mo"), ++ rebase_path("{{source_file_part}}"), ++ ] ++ } ++ ++ source_set(target_name) { ++ deps = [ ":$po_target_name" ] ++ } ++} ++ ++po_translations("locale_efl") { ++ sources = [ ++ "ar.po", ++ "az.po", ++ "bg.po", ++ "bn.po", ++ "ca.po", ++ "cs.po", ++ "da.po", ++ "de_DE.po", ++ "el_GR.po", ++ "en_PH.po", ++ "en.po", ++ "en_US.po", ++ "es_ES.po", ++ "es_MX.po", ++ "et.po", ++ "eu.po", ++ "fi.po", ++ "fr_CA.po", ++ "fr_FR.po", ++ "ga.po", ++ "gl.po", ++ "gu.po", ++ "hi.po", ++ "hr.po", ++ "hu.po", ++ "hy.po", ++ "is.po", ++ "it_IT.po", ++ "ja_JP.po", ++ "ka.po", ++ "kk.po", ++ "kn.po", ++ "ko_KR.po", ++ "lt.po", ++ "lv.po", ++ "mk.po", ++ "nb.po", ++ "nl_NL.po", ++ "ml.po", ++ "pl.po", ++ "pt_BR.po", ++ "pt_PT.po", ++ "ro.po", ++ "ru_RU.po", ++ "si.po", ++ "sk.po", ++ "sl.po", ++ "sr.po", ++ "sv.po", ++ "ta.po", ++ "te.po", ++ "tr_TR.po", ++ "uk.po", ++ "ur.po", ++ "uz.po", ++ "zh_CN.po", ++ "zh_HK.po", ++ "zh_SG.po", ++ "zh_TW.po", ++ ] ++} +diff --git a/ewk/tizen_version_defines_for_apps.gni b/ewk/tizen_version_defines_for_apps.gni +new file mode 100644 +index 0000000..650e1b9 +--- /dev/null ++++ b/ewk/tizen_version_defines_for_apps.gni +@@ -0,0 +1,19 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++defines = [] ++ ++if (building_for_tizen) { ++ if (chromium_efl_tizen_version == 30) { ++ defines += ["TIZEN_V_3_0=true"] ++ } ++ if (chromium_efl_tizen_version == 24) { ++ defines += ["TIZEN_V_2_4=true"] ++ } ++ if (chromium_efl_tizen_version == 23) { ++ defines += ["TIZEN_V_2_3=true"] ++ } ++} +diff --git a/ewk/ubrowser/BUILD.gn b/ewk/ubrowser/BUILD.gn +new file mode 100644 +index 0000000..25b2108 +--- /dev/null ++++ b/ewk/ubrowser/BUILD.gn +@@ -0,0 +1,68 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//tizen_src/build/config/tizen_features.gni") ++ ++copy("ubrowser_script") { ++ sources = [ "ubrowser.sh" ] ++ outputs = [ "$root_out_dir/{{source_file_part}}" ] ++} ++ ++executable("ubrowser") { ++ configs += [ "//tizen_src/build:capi-system-device" ] ++ configs += [ "//tizen_src/build:libcapi-system-device" ] ++ public_configs = [ "//tizen_src/build:capi-system-device-public" ] ++ configs += [ "//tizen_src/build:evas" ] ++ configs += [ "//tizen_src/build:libevas" ] ++ configs += [ "//tizen_src/build:ecore" ] ++ configs += [ "//tizen_src/build:libecore" ] ++ configs += [ "//tizen_src/build:ecore-evas" ] ++ configs += [ "//tizen_src/build:libecore-evas" ] ++ public_configs += [ "//tizen_src/build:ecore-evas-public" ] ++ configs += [ "//tizen_src/build:elementary" ] ++ configs += [ "//tizen_src/build:libelementary" ] ++ public_configs += [ "//tizen_src/build:elementary-public" ] ++ deps = [ ++ "//tizen_src/ewk/efl_integration:chromium-ewk", ++ "//tizen_src/ewk/efl_integration:launch_exec", ++ ] ++ configs += [ "//tizen_src/build:efl-extension" ] ++ configs += [ "//tizen_src/build:libefl-extension" ] ++ public_configs += [ "//tizen_src/build:efl-extension-public" ] ++ defines = [ ++ # Uncomment once uBrowser replaces mini_browser and it's xml ++ # manifest is shipped in the rpm package ++ #"TIZEN_APP=true" ++ ] ++ include_dirs = [ ++ ".", ++ "../efl_integration/public", ++ ] ++ sources = [ ++ "browser.cc", ++ "browser.h", ++ "logger.cc", ++ "logger.h", ++ "main.cc", ++ "window.cc", ++ "window.h", ++ "window_ui.h", ++ "window_ui.cc", ++ ] ++ deps += [ ":ubrowser_script" ] ++ cflags = [ ++ # Treat warning as error for this target. ++ # It needs to be included by means of pattern list because '-Werror' cflag ++ # will be excluded in chromium side (src/build/common.gypi), and GYP ++ # processes pattern lists after exclusion lists. ++ # (ref: https://gyp.gsrc.io/docs/InputFormatReference.md#Processing-Order) ++ "-Werror" ++ ] ++ ldflags = [] ++ libs = [] ++ if (building_for_tizen) { ++ configs += [ "//tizen_src/build:capi-appfw-application" ] ++ configs += [ "//tizen_src/build:libcapi-appfw-application" ] ++ } ++} +diff --git a/ewk/ubrowser/main.cc b/ewk/ubrowser/main.cc +index 0b16a04..7b9c973 100644 +--- a/ewk/ubrowser/main.cc ++++ b/ewk/ubrowser/main.cc +@@ -9,7 +9,7 @@ + #include + #include + #if defined(OS_TIZEN) +-#include ++#include + #endif // OS_TIZEN + + #include "browser.h" +diff --git a/ewk/unittest/BUILD.gn b/ewk/unittest/BUILD.gn +new file mode 100644 +index 0000000..bd92e7b +--- /dev/null ++++ b/ewk/unittest/BUILD.gn +@@ -0,0 +1,395 @@ ++# Copyright (c) 2015 Samsung Electronics. All rights reserved. ++# Use of this source code is governed by a BSD-style license that can be ++# found in the LICENSE file. ++ ++import("//testing/test.gni") ++import("//tizen_src/build/config/tizen_features.gni") ++ ++shared_library("bundle_sample") { ++ sources = [ "resources/ewk_context/injected_bundle/chromium/bundle_sample.cc" ] ++ deps = [ "//v8:v8" ] ++ include_dirs = [ ++ ".", ++ "//v8/include/", ++ ] ++} ++ ++#copy("libbundle") { ++# sources = [ "$root_out_dir/lib/libbundle_sample.so" ] ++# outputs = [ "$root_out_dir/resources/ewk_context/injected_bundle/chromium/{{source_file_part}}" ] ++#} ++ ++test("ewk_unittests") { ++ testonly = true ++ configs += [ "//tizen_src/build:ecore-evas" ] ++ configs += [ "//tizen_src/build:libecore-evas" ] ++ public_configs = [ "//tizen_src/build:ecore-evas-public" ] ++ configs += [ "//tizen_src/build:ecore-x" ] ++ configs += [ "//tizen_src/build:libecore-x" ] ++ public_configs += [ "//tizen_src/build:ecore-x-public" ] ++ configs += [ "//tizen_src/build:edje" ] ++ configs += [ "//tizen_src/build:libedje" ] ++ public_configs += [ "//tizen_src/build:edje-public" ] ++ configs += [ "//tizen_src/build:elementary" ] ++ configs += [ "//tizen_src/build:libelementary" ] ++ public_configs += [ "//tizen_src/build:elementary-public" ] ++ deps = [ ++ "//tizen_src/ewk/efl_integration:chromium-ewk", ++ "//testing/gtest", ++ ":bundle_sample", ++ ] ++ include_dirs = [ ++ "../efl_integration/public", ++ ] ++ sources = [ ++ "execute_utc_blink.cpp", ++ "utc_blink_cb_contextmenu_allowed.cpp", ++ "utc_blink_cb_contextmenu_willshow.cpp", ++ "utc_blink_cb_editorclient_candidate_closed.cpp", ++ "utc_blink_cb_editorclient_candidate_opened.cpp", ++ "utc_blink_cb_editorclient_ime_closed.cpp", ++ "utc_blink_cb_editorclient_ime_opened.cpp", ++ "utc_blink_cb_form_submit.cpp", ++ "utc_blink_cb_fullscreen_enterfullscreen.cpp", ++ "utc_blink_cb_fullscreen_exitfullscreen.cpp", ++ "utc_blink_cb_geolocation_valid.cpp", ++ "utc_blink_cb_icon_received.cpp", ++ "utc_blink_cb_inputmethod_changed.cpp", ++ "utc_blink_cb_load_finished.cpp", ++ "utc_blink_cb_load_progress.cpp", ++ "utc_blink_cb_load_progress_finished.cpp", ++ "utc_blink_cb_load_progress_started.cpp", ++ "utc_blink_cb_load_started.cpp", ++ "utc_blink_cb_magnifier_hide.cpp", ++ "utc_blink_cb_magnifier_show.cpp", ++ "utc_blink_cb_popup_blocked.cpp", ++ "utc_blink_cb_protocolhandler_isregistered.cpp", ++ "utc_blink_cb_protocolhandler_registration_requested.cpp", ++ "utc_blink_cb_protocolhandler_unregistration_requested.cpp", ++ "utc_blink_cb_redo_size.cpp", ++ "utc_blink_cb_textselection_mode.cpp", ++ "utc_blink_cb_title_changed.cpp", ++ "utc_blink_cb_undo_size.cpp", ++ "utc_blink_cb_unfocus_direction.cpp", ++ "utc_blink_cb_uri_changed.cpp", ++ "utc_blink_cb_url_changed.cpp", ++ "utc_blink_ewk_auth_challenge_credential_cancel_func.cpp", ++ "utc_blink_ewk_auth_challenge_credential_use_func.cpp", ++ "utc_blink_ewk_auth_challenge_realm_get_func.cpp", ++ "utc_blink_ewk_auth_challenge_suspend_func.cpp", ++ "utc_blink_ewk_autofill_profile_data_get_func.cpp", ++ "utc_blink_ewk_autofill_profile_data_set_func.cpp", ++ "utc_blink_ewk_autofill_profile_delete_func.cpp", ++ "utc_blink_ewk_autofill_profile_id_get_func.cpp", ++ "utc_blink_ewk_autofill_profile_new_func.cpp", ++ "utc_blink_ewk_back_forward_list_count_func.cpp", ++ "utc_blink_ewk_back_forward_list_current_item_get_func.cpp", ++ "utc_blink_ewk_back_forward_list_item_at_index_get_func.cpp", ++ "utc_blink_ewk_back_forward_list_item_original_url_get_func.cpp", ++ "utc_blink_ewk_back_forward_list_item_ref_func.cpp", ++ "utc_blink_ewk_back_forward_list_item_title_get_func.cpp", ++ "utc_blink_ewk_back_forward_list_item_unref_func.cpp", ++ "utc_blink_ewk_back_forward_list_item_url_get_func.cpp", ++ "utc_blink_ewk_back_forward_list_n_back_items_copy_func.cpp", ++ "utc_blink_ewk_back_forward_list_n_forward_items_copy_func.cpp", ++ "utc_blink_ewk_back_forward_list_next_item_get_func.cpp", ++ "utc_blink_ewk_back_forward_list_previous_item_get_func.cpp", ++ "utc_blink_ewk_base.cpp", ++ "utc_blink_ewk_base.h", ++ "utc_blink_ewk_certificate_policy_decision_allowed_set_func.cpp", ++ "utc_blink_ewk_certificate_policy_decision_certificate_pem_get_func.cpp", ++ "utc_blink_ewk_certificate_policy_decision_suspend_func.cpp", ++ "utc_blink_ewk_certificate_policy_decision_url_get_func.cpp", ++ "utc_blink_ewk_console_message_level_get_func.cpp", ++ "utc_blink_ewk_console_message_line_get_func.cpp", ++ "utc_blink_ewk_console_message_source_get_func.cpp", ++ "utc_blink_ewk_console_message_text_get_func.cpp", ++ "utc_blink_ewk_context_additional_plugin_path_set_func.cpp", ++ "utc_blink_ewk_context_application_cache_delete_all_func.cpp", ++ "utc_blink_ewk_context_application_cache_delete_func.cpp", ++ "utc_blink_ewk_context_application_cache_origins_get_func.cpp", ++ "utc_blink_ewk_context_cache_clear_func.cpp", ++ "utc_blink_ewk_context_cache_disabled_set_func.cpp", ++ "utc_blink_ewk_context_cache_model_get_func.cpp", ++ "utc_blink_ewk_context_cache_model_set_func.cpp", ++ "utc_blink_ewk_context_certificate_file_get_func.cpp", ++ "utc_blink_ewk_context_certificate_file_set_func.cpp", ++ "utc_blink_ewk_context_cookie_manager_get_func.cpp", ++ "utc_blink_ewk_context_default_get_func.cpp", ++ "utc_blink_ewk_context_delete_func.cpp", ++ "utc_blink_ewk_context_did_start_download_callback_set_func.cpp", ++ "utc_blink_ewk_context_form_autofill_profile_add_func.cpp", ++ "utc_blink_ewk_context_form_autofill_profile_get_all_func.cpp", ++ "utc_blink_ewk_context_form_autofill_profile_get_func.cpp", ++ "utc_blink_ewk_context_form_autofill_profile_remove_func.cpp", ++ "utc_blink_ewk_context_form_autofill_profile_set_func.cpp", ++ "utc_blink_ewk_context_form_autofill_profile_utils.cpp", ++ "utc_blink_ewk_context_form_autofill_profile_utils.h", ++ "utc_blink_ewk_context_form_candidate_data_delete_all_func.cpp", ++ "utc_blink_ewk_context_form_password_data_delete_all_func.cpp", ++ "utc_blink_ewk_context_icon_database_icon_object_add_func.cpp", ++ "utc_blink_ewk_context_icon_database_path_set_func.cpp", ++ "utc_blink_ewk_context_inspector_server_start_func.cpp", ++ "utc_blink_ewk_context_inspector_server_stop_func.cpp", ++ "utc_blink_ewk_context_local_file_system_all_delete_func.cpp", ++ "utc_blink_ewk_context_local_file_system_delete_func.cpp", ++ "utc_blink_ewk_context_menu.h", ++ "utc_blink_ewk_context_menu_item_append_as_action_func.cpp", ++ "utc_blink_ewk_context_menu_item_append_func.cpp", ++ "utc_blink_ewk_context_menu_item_count_func.cpp", ++ "utc_blink_ewk_context_menu_item_image_url_get_func.cpp", ++ "utc_blink_ewk_context_menu_item_link_url_get_func.cpp", ++ "utc_blink_ewk_context_menu_item_remove_func.cpp", ++ "utc_blink_ewk_context_menu_item_tag_get_func.cpp", ++ "utc_blink_ewk_context_menu_nth_item_get_func.cpp", ++ "utc_blink_ewk_context_new_func.cpp", ++ "utc_blink_ewk_context_new_with_injected_bundle_path_func.cc", ++ "utc_blink_ewk_context_notify_low_memory_func.cpp", ++ "utc_blink_ewk_context_pixmap_set_func.cpp", ++ "utc_blink_ewk_context_preferred_languages_set_func.cpp", ++ "utc_blink_ewk_context_proxy_uri_get_func.cpp", ++ "utc_blink_ewk_context_proxy_uri_set_func.cpp", ++ "utc_blink_ewk_context_vibration_client_callbacks_set_func.cpp", ++ "utc_blink_ewk_context_web_database_delete_all_func.cpp", ++ "utc_blink_ewk_context_web_database_delete_func.cpp", ++ "utc_blink_ewk_context_web_database_origins_get_func.cpp", ++ "utc_blink_ewk_context_web_indexed_database_delete_all_func.cpp", ++ "utc_blink_ewk_context_web_storage_delete_all_func.cpp", ++ "utc_blink_ewk_context_web_storage_origin_delete_func.cpp", ++ "utc_blink_ewk_context_web_storage_origins_get_func.cpp", ++ "utc_blink_ewk_cookie_manager_accept_policy_async_get_func.cpp", ++ "utc_blink_ewk_cookie_manager_accept_policy_set_func.cpp", ++ "utc_blink_ewk_cookie_manager_cookies_clear_func.cpp", ++ "utc_blink_ewk_custom_handlers_data_base_url_get_func.cpp", ++ "utc_blink_ewk_custom_handlers_data_result_set_func.cpp", ++ "utc_blink_ewk_custom_handlers_data_target_get_func.cpp", ++ "utc_blink_ewk_custom_handlers_data_title_get_func.cpp", ++ "utc_blink_ewk_custom_handlers_data_url_get_func.cpp", ++ "utc_blink_ewk_error_code_get_func.cpp", ++ "utc_blink_ewk_error_description_get_func.cpp", ++ "utc_blink_ewk_error_type_get_func.cpp", ++ "utc_blink_ewk_error_url_get_func.cpp", ++ "utc_blink_ewk_frame_is_main_frame_func.cpp", ++ "utc_blink_ewk_geolocation_permission_reply_func.cpp", ++ "utc_blink_ewk_geolocation_permission_request_origin_get_func.cpp", ++ "utc_blink_ewk_geolocation_permission_request_set_func.cpp", ++ "utc_blink_ewk_geolocation_permission_request_suspend_func.cpp", ++ "utc_blink_ewk_history_back_list_length_get_func.cpp", ++ "utc_blink_ewk_history_forward_list_length_get.cpp", ++ "utc_blink_ewk_history_free_func.cpp", ++ "utc_blink_ewk_history_item_title_get_func.cpp", ++ "utc_blink_ewk_history_item_uri_get_func.cpp", ++ "utc_blink_ewk_history_nth_item_get.cpp", ++ "utc_blink_ewk_hit_test_attribute_hash_get_func.cpp", ++ "utc_blink_ewk_hit_test_free_func.cpp", ++ "utc_blink_ewk_hit_test_image_file_name_extension_get_func.cpp", ++ "utc_blink_ewk_hit_test_image_uri_get_func.cpp", ++ "utc_blink_ewk_hit_test_link_label_get_func.cpp", ++ "utc_blink_ewk_hit_test_link_title_get_func.cpp", ++ "utc_blink_ewk_hit_test_link_uri_get_func.cpp", ++ "utc_blink_ewk_hit_test_media_uri_get_func.cpp", ++ "utc_blink_ewk_hit_test_node_value_get_func.cpp", ++ "utc_blink_ewk_hit_test_result_context_get_func.cpp", ++ "utc_blink_ewk_hit_test_tag_name_get_func.cpp", ++ "utc_blink_ewk_home_directory_get_func.cpp", ++ "utc_blink_ewk_home_directory_set_func.cpp", ++ "utc_blink_ewk_notification_body_get_func.cpp", ++ "utc_blink_ewk_notification_callbacks_reset_func.cpp", ++ "utc_blink_ewk_notification_callbacks_set_func.cpp", ++ "utc_blink_ewk_notification_clicked_func.cpp", ++ "utc_blink_ewk_notification_closed_func.cpp", ++ "utc_blink_ewk_notification_icon_get_func.cpp", ++ "utc_blink_ewk_notification_icon_save_as_png_func.cpp", ++ "utc_blink_ewk_notification_id_get_func.cpp", ++ "utc_blink_ewk_notification_permission_reply_func.cpp", ++ "utc_blink_ewk_notification_permission_request_origin_get_func.cpp", ++ "utc_blink_ewk_notification_permission_request_set_func.cpp", ++ "utc_blink_ewk_notification_permission_request_suspend_func.cpp", ++ "utc_blink_ewk_notification_policies_removed_func.cpp", ++ "utc_blink_ewk_notification_security_origin_get_func.cpp", ++ "utc_blink_ewk_notification_showed_func.cpp", ++ "utc_blink_ewk_notification_silent_get_func.cpp", ++ "utc_blink_ewk_notification_title_get_func.cpp", ++ "utc_blink_ewk_policy_decision_cookie_get_func.cpp", ++ "utc_blink_ewk_policy_decision_frame_get_func.cpp", ++ "utc_blink_ewk_policy_decision_host_get_func.cpp", ++ "utc_blink_ewk_policy_decision_http_method_get_func.cpp", ++ "utc_blink_ewk_policy_decision_ignore_func.cpp", ++ "utc_blink_ewk_policy_decision_navigation_type_get_func.cpp", ++ "utc_blink_ewk_policy_decision_password_get_func.cpp", ++ "utc_blink_ewk_policy_decision_response_headers_get_func.cpp", ++ "utc_blink_ewk_policy_decision_response_mime_get_func.cpp", ++ "utc_blink_ewk_policy_decision_response_status_code_get_func.cpp", ++ "utc_blink_ewk_policy_decision_scheme_get_func.cpp", ++ "utc_blink_ewk_policy_decision_suspend_func.cpp", ++ "utc_blink_ewk_policy_decision_type_get_func.cpp", ++ "utc_blink_ewk_policy_decision_url_get_func.cpp", ++ "utc_blink_ewk_policy_decision_use_func.cpp", ++ "utc_blink_ewk_policy_decision_userid_get_func.cpp", ++ "utc_blink_ewk_quota_permission_request_is_persistent_get_func.cpp", ++ "utc_blink_ewk_quota_permission_request_origin_host_get_func.cpp", ++ "utc_blink_ewk_quota_permission_request_origin_port_get_func.cpp", ++ "utc_blink_ewk_quota_permission_request_origin_protocol_get_func.cpp", ++ "utc_blink_ewk_quota_permission_request_quota_get_func.cpp", ++ "utc_blink_ewk_security_origin_host_get_func.cpp", ++ "utc_blink_ewk_security_origin_port_get_func.cpp", ++ "utc_blink_ewk_security_origin_protocol_get_func.cpp", ++ "utc_blink_ewk_settings_autofill_password_form_enabled_get_func.cpp", ++ "utc_blink_ewk_settings_autofill_password_form_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_auto_fitting_get_func.cpp", ++ "utc_blink_ewk_settings_auto_fitting_set_func.cpp", ++ "utc_blink_ewk_settings_clear_text_selection_automatically_set_func.cpp", ++ "utc_blink_ewk_settings_current_legacy_font_size_mode_set_func.cpp", ++ "utc_blink_ewk_settings_default_encoding_set_func.cpp", ++ "utc_blink_ewk_settings_default_keypad_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_detect_contents_automatically_set_func.cpp", ++ "utc_blink_ewk_settings_edge_effect_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_editable_link_behavior_set_func.cpp", ++ "utc_blink_ewk_settings_extra_feature_set_func.cpp", ++ "utc_blink_ewk_settings_font_default_size_get_func.cpp", ++ "utc_blink_ewk_settings_font_default_size_set_func.cpp", ++ "utc_blink_ewk_settings_force_zoom_set_func.cpp", ++ "utc_blink_ewk_settings_form_candidate_data_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_form_profile_data_enabled_get_func.cpp", ++ "utc_blink_ewk_settings_form_profile_data_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_initial_list_style_position_get_func.cpp", ++ "utc_blink_ewk_settings_initial_list_style_position_set_func.cpp", ++ "utc_blink_ewk_settings_is_encoding_valid_func.cpp", ++ "utc_blink_ewk_settings_javascript_enabled_get_func.cpp", ++ "utc_blink_ewk_settings_javascript_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_link_effect_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_link_magnifier_enabled_get_func.cpp", ++ "utc_blink_ewk_settings_link_magnifier_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_private_browsing_enabled_get_func.cpp", ++ "utc_blink_ewk_settings_private_browsing_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_load_remote_images_set_func.cpp", ++ "utc_blink_ewk_settings_loads_images_automatically_set_func.cpp", ++ "utc_blink_ewk_settings_paste_image_uri_mode_set_func.cpp", ++ "utc_blink_ewk_settings_plugins_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_scripts_can_open_windows_get_func.cpp", ++ "utc_blink_ewk_settings_scripts_can_open_windows_set_func.cpp", ++ "utc_blink_ewk_settings_scripts_window_open_get_func.cpp", ++ "utc_blink_ewk_settings_scripts_window_open_set_func.cpp", ++ "utc_blink_ewk_settings_select_word_automatically_set_func.cpp", ++ "utc_blink_ewk_settings_spdy_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_text_autosizing_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_text_autosizing_font_scale_factor_set_func.cpp", ++ "utc_blink_ewk_settings_text_selection_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_text_style_state_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_text_zoom_enabled_set_func.cpp", ++ "utc_blink_ewk_settings_uses_encoding_detector_set_func.cpp", ++ "utc_blink_ewk_settings_uses_keypad_without_user_action_set_func.cpp", ++ "utc_blink_ewk_text_style_align_center_get_func.cpp", ++ "utc_blink_ewk_text_style_align_full_get_func.cpp", ++ "utc_blink_ewk_text_style_align_left_get_func.cpp", ++ "utc_blink_ewk_text_style_align_right_get_func.cpp", ++ "utc_blink_ewk_text_style_bg_color_get_func.cpp", ++ "utc_blink_ewk_text_style_bold_get_func.cpp", ++ "utc_blink_ewk_text_style_color_get_func.cpp", ++ "utc_blink_ewk_text_style_font_size_get_func.cpp", ++ "utc_blink_ewk_text_style_has_composition_get_func.cpp", ++ "utc_blink_ewk_text_style_italic_get_func.cpp", ++ "utc_blink_ewk_text_style_ordered_list_get_func.cpp", ++ "utc_blink_ewk_text_style_position_get_func.cpp", ++ "utc_blink_ewk_text_style_underline_get_func.cpp", ++ "utc_blink_ewk_text_style_unordered_list_get_func.cpp", ++ "utc_blink_ewk_user_media_permission_request_set_func.cpp", ++ "utc_blink_ewk_user_media_permission_request_suspend_func.cpp", ++ "utc_blink_ewk_view_add_func.cpp", ++ "utc_blink_ewk_view_add_in_incognito_mode_func.cpp", ++ "utc_blink_ewk_view_add_with_context_func.cpp", ++ "utc_blink_ewk_view_add_with_session_data_func.cpp", ++ "utc_blink_ewk_view_application_name_for_user_agent_get_func.cpp", ++ "utc_blink_ewk_view_application_name_for_user_agent_set_func.cpp", ++ "utc_blink_ewk_view_back_forward_list_clear_func.cpp", ++ "utc_blink_ewk_view_back_forward_list_get_func.cpp", ++ "utc_blink_ewk_view_back_func.cpp", ++ "utc_blink_ewk_view_back_possible_func.cpp", ++ "utc_blink_ewk_view_browser_font_set_func.cpp", ++ "utc_blink_ewk_view_command_execute_func.cpp", ++ "utc_blink_ewk_view_content_security_policy_set_func.cpp", ++ "utc_blink_ewk_view_contents_pdf_get_func.cpp", ++ "utc_blink_ewk_view_contents_set_func.cpp", ++ "utc_blink_ewk_view_contents_size_get_func.cpp", ++ "utc_blink_ewk_view_context_get_func.cpp", ++ "utc_blink_ewk_view_custom_header_add_func.cpp", ++ "utc_blink_ewk_view_custom_header_remove_func.cpp", ++ "utc_blink_ewk_view_draws_transparent_background_set_func.cpp", ++ "utc_blink_ewk_view_encoding_custom_set_func.cpp", ++ "utc_blink_ewk_view_forward_func.cpp", ++ "utc_blink_ewk_view_forward_possible_func.cpp", ++ "utc_blink_ewk_view_fullscreen_exit_func.cpp", ++ "utc_blink_ewk_view_geolocation_permission_callback_set_func.cpp", ++ "utc_blink_ewk_view_get_cookies_for_url_func.cpp", ++ "utc_blink_ewk_view_history_get_func.cpp", ++ "utc_blink_ewk_view_hit_test_new_func.cpp", ++ "utc_blink_ewk_view_hit_test_request_func.cpp", ++ "utc_blink_ewk_view_html_contents_set_func.cpp", ++ "utc_blink_ewk_view_html_string_load_func.cpp", ++ "utc_blink_ewk_view_inspector_server_stop_func.cpp", ++ "utc_blink_ewk_view_javascript_confirm_reply_func.cpp", ++ "utc_blink_ewk_view_load_progress_get_func.cpp", ++ "utc_blink_ewk_view_main_frame_get_func.cpp", ++ "utc_blink_ewk_view_mhtml_data_get_func.cpp", ++ "utc_blink_ewk_view_notification_permission_callback_set_func.cpp", ++ "utc_blink_ewk_view_orientation_lock_callback_set_func.cpp", ++ "utc_blink_ewk_view_orientation_send_func.cpp", ++ "utc_blink_ewk_view_page_visibility_state_set_func.cpp", ++ "utc_blink_ewk_view_plain_text_get_func.cpp", ++ "utc_blink_ewk_view_quota_permission_request_callback_set_func.cpp", ++ "utc_blink_ewk_view_quota_permission_request_cancel_func.cpp", ++ "utc_blink_ewk_view_quota_permission_request_reply_func.cpp", ++ "utc_blink_ewk_view_reload_func.cpp", ++ "utc_blink_ewk_view_resume_func.cpp", ++ "utc_blink_ewk_view_scale_get_func.cpp", ++ "utc_blink_ewk_view_scale_range_get_func.cpp", ++ "utc_blink_ewk_view_scale_set_func.cpp", ++ "utc_blink_ewk_view_screenshot_contents_get_func.cpp", ++ "utc_blink_ewk_view_script_execute_func.cpp", ++ "utc_blink_ewk_view_scroll_pos_get_func.cpp", ++ "utc_blink_ewk_view_scroll_set_func.cpp", ++ "utc_blink_ewk_view_scroll_size_get_func.cpp", ++ "utc_blink_ewk_view_session_data_get_func.cpp", ++ "utc_blink_ewk_view_settings_get_func.cpp", ++ "utc_blink_ewk_view_stop_func.cpp", ++ "utc_blink_ewk_view_suspend_func.cpp", ++ "utc_blink_ewk_view_text_find_func.cpp", ++ "utc_blink_ewk_view_text_find_highlight_clear_func.cpp", ++ "utc_blink_ewk_view_text_selection_clear_func.cpp", ++ "utc_blink_ewk_view_text_selection_text_get_func.cpp", ++ "utc_blink_ewk_view_text_zoom_get_func.cpp", ++ "utc_blink_ewk_view_text_zoom_set_func.cpp", ++ "utc_blink_ewk_view_title_get_func.cpp", ++ "utc_blink_ewk_view_touch_events_enabled_set_func.cpp", ++ "utc_blink_ewk_view_url_get_func.cpp", ++ "utc_blink_ewk_view_url_request_set_func.cpp", ++ "utc_blink_ewk_view_url_set_func.cpp", ++ "utc_blink_ewk_view_user_agent_get_func.cpp", ++ "utc_blink_ewk_view_user_agent_set_func.cpp", ++ "utc_blink_ewk_view_use_settings_font_func.cpp", ++ "utc_blink_ewk_view_visibility_set_func.cpp", ++ "utc_blink_ewk_view_web_application_capable_get_func.cpp", ++ "utc_blink_ewk_view_web_application_icon_url_get_func.cpp", ++ "utc_blink_ewk_view_web_application_icon_urls_get_func.cpp", ++ "utc_blink_ewk_web_application_icon_data_url_get_func.cpp", ++ ] ++ cflags = [ "-glib-2.0" ] ++ ldflags = [ "-glib-2.0" ] ++ libs = [ "glib-2.0" ] ++ #TODO : Uncomment it. ++ #deps += [ ":libbundle" ] ++ if (building_for_tizen && building_strategy=="ewk") { ++ cflags += [ "-scim" ] ++ ldflags += [ "-scim" ] ++ libs += [ "scim" ] ++ } ++ defines = [] ++ if (ewk_bringup) { ++ defines += [ "EWK_BRINGUP=true" ] ++ sources -= [ ++ #XXX: enable *local_file_system* once we find a way to set --allow-file-access-from-files flag at runtime ++ "utc_blink_ewk_context_local_file_system_all_delete_func.cpp", ++ "utc_blink_ewk_context_local_file_system_delete_func.cpp", ++ ] ++ } ++} +diff --git a/packaging/chromium-efl.spec b/packaging/chromium-efl.spec +index a64108c..2cc95e1 100644 +--- a/packaging/chromium-efl.spec ++++ b/packaging/chromium-efl.spec +@@ -39,12 +39,15 @@ Source1: content_shell.in + # 2) The value '2.0' of '%{tizen}' should be '2.3'. + %if "%{tizen}" == "3.0" + %define chromium_efl_tizen_version 3.0 ++%define gn_chromium_efl_tizen_version 30 + %endif + %if "%{tizen}" == "2.3" || "%{tizen}" == "2.4" + %define chromium_efl_tizen_version 2.4 ++%define gn_chromium_efl_tizen_version 24 + %endif + %if "%{tizen}" == "2.0" + %define chromium_efl_tizen_version 2.3 ++%define gn_chromium_efl_tizen_version 23 + %endif + + %if %{!?TIZEN_PROFILE_TV:0}%{?TIZEN_PROFILE_TV:1} || "%{!?profile:0}%{?profile}" == "tv" +@@ -117,6 +120,7 @@ BuildRequires: pkgconfig(zlib) + %if "%{chromium_efl_tizen_version}" == "3.0" + %ifarch armv7l + BuildRequires: python-accel-armv7l-cross-arm ++BuildRequires: binutils-gold + %endif + %ifarch aarch64 + BuildRequires: python-accel-aarch64-cross-aarch64 +@@ -142,7 +146,7 @@ BuildRequires: pkgconfig(xtst) + + # TODO(youngsoo): The binutils-gold crashes mini_browser on the Tizen v3.0 ARM 64 bit images. + # Once fixed, use binutils-gold for all targets on Tizen v3.0. +-%ifnarch aarch64 %{arm} # [M48_2564] Temporary excluding arm architecture for fixing memory issue ++%ifnarch aarch64 #%{arm} # [M48_2564] Temporary excluding arm architecture for fixing memory issue + # FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15383 + %if "%{chromium_efl_tizen_version}" == "3.0" + BuildRequires: binutils-gold +@@ -277,7 +281,7 @@ trap 'tizen_src/build/apply_patches.sh -r' EXIT + # architecture related configuration + neon temporary workaround + %if %{?_skip_ninja:0}%{!?_skip_ninja:1} + %ifarch %{arm} aarch64 +- export ADDITION_OPTION=" -finline-limit=64 -foptimize-sibling-calls -fno-unwind-tables -fno-exceptions -Os " ++ export ADDITION_OPTION=" -finline-limit=64 -foptimize-sibling-calls -fno-unwind-tables -fno-exceptions -O2 " + + export CFLAGS="$CFLAGS $ADDITION_OPTION" + export CXXFLAGS="$CXXFLAGS $ADDITION_OPTION" +@@ -305,13 +309,21 @@ trap 'tizen_src/build/apply_patches.sh -r' EXIT + # The variable chromium-efl_tizen_version and _repository are essentially needed for build. + # Therefore, if the variable is not defined, it explicitly raises exception here. + %define OUTPUT_BASE_FOLDER out.tz_v%{chromium_efl_tizen_version}.%{OUTPUT_BUILD_PROFILE_TARGET}.%{_repository} +-export GYP_GENERATOR_OUTPUT=$PWD/%{OUTPUT_BASE_FOLDER} ++%if 0%{?_use_gn:1} ++ export GN_GENERATOR_OUTPUT=$PWD/%{OUTPUT_BASE_FOLDER} ++%else ++ export GYP_GENERATOR_OUTPUT=$PWD/%{OUTPUT_BASE_FOLDER} ++%endif + + #set build mode +-%if 0%{?_debug_mode} +- %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Debug ++%if 0%{?_use_gn:1} ++ %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER} + %else +- %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Release ++ %if 0%{?_debug_mode} ++ %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Debug ++ %else ++ %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Release ++ %endif + %endif + %global XWALK_GEN %{OUTPUT_FOLDER}/xwalk_gen + +@@ -329,8 +341,38 @@ fi + cp -a LICENSE "%{XWALK_GEN}"/LICENSE.chromium + %endif + ++#gn generate ++%if 0%{?_use_gn:1} ++#run standard gn_chromiumefl wrapper ++ ./tizen_src/build/gn_chromiumefl.sh \ ++ "exe_dir=\"%{CHROMIUM_EXE_DIR}\"" \ ++ "data_dir=\"%{CHROMIUM_DATA_DIR}\"" \ ++ "edje_dir=\"%{CHROMIUM_DATA_DIR}/themes\"" \ ++ "locale_dir=\"%{CHROMIUM_LOCALE_DIR}\"" \ ++%if 0%{?_remove_webcore_debug_symbols:1} ++ "remove_webcore_debug_symbols=true" \ ++%endif ++%if 0%{?chromium_efl_tizen_version:1} ++ "chromium_efl_tizen_version=%{gn_chromium_efl_tizen_version}" \ ++%endif ++%if "%{?_with_wayland}" == "1" ++ "use_wayland=true" \ ++%endif ++%if "%{?_repository}" == "emulator" || "%{?_repository}" == "emulator32-x11" ++ "tizen_emulator_support=true" \ ++%endif ++%if 0%{?build_xwalk} ++ --xwalk \ ++%endif ++%if 0%{?component_build} ++ "component=\"shared_library\"" \ ++%endif ++ "tizen_%{OUTPUT_BUILD_PROFILE_TARGET}=true" \ ++ "building_for_tizen_%{OUTPUT_BUILD_PROFILE_TARGET}=true" ++%endif ++ + #gyp generate +-%if %{?_skip_gyp:0}%{!?_skip_gyp:1} ++%if %{?_skip_gyp:0}%{!?_skip_gyp:1} && 0%{!?_use_gn:1} + #run standard gyp_chromiumefl wrapper + ./tizen_src/build/gyp_chromiumefl.sh \ + -Dexe_dir="%{CHROMIUM_EXE_DIR}" \ +@@ -447,7 +489,11 @@ cp -r "%{OUTPUT_FOLDER}/locale" "%{buildroot}/%{CHROMIUM_LOCALE_DIR}" + + install -m 0755 "%{OUTPUT_FOLDER}"/locales/*.pak "%{buildroot}%{CHROMIUM_EXE_DIR}"/locales + +-install -m 0755 "%{OUTPUT_FOLDER}"/lib/libchromium-ewk.so "%{buildroot}"%{_libdir} ++%if 0%{?_use_gn:1} ++ install -m 0755 "%{OUTPUT_FOLDER}"/libchromium-ewk.so "%{buildroot}"%{_libdir} ++%else ++ install -m 0755 "%{OUTPUT_FOLDER}"/lib/libchromium-ewk.so "%{buildroot}"%{_libdir} ++%endif + + install -m 0755 "%{OUTPUT_FOLDER}"/efl_webprocess "%{buildroot}%{CHROMIUM_EXE_DIR}" + install -m 0755 "%{OUTPUT_FOLDER}"/icudtl.dat "%{buildroot}%{CHROMIUM_EXE_DIR}" diff --git a/tizen_src/chromium_impl/base/base_efl.gni b/tizen_src/chromium_impl/base/base_efl.gni new file mode 100644 index 0000000..10ce612 --- /dev/null +++ b/tizen_src/chromium_impl/base/base_efl.gni @@ -0,0 +1,18 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/ui.gni") + +external_base_configs = [ + "//tizen_src/build:ecore", + "//tizen_src/build:libecore", +] +external_base_sources = [ + "//tizen_src/chromium_impl/base/message_loop/message_pump_ecore.cc", + "//tizen_src/chromium_impl/base/message_loop/message_pump_ecore.h", +] + +if (use_glib) { + external_base_sources += [ "//base/message_loop/message_pump_glib.cc" ] +} diff --git a/tizen_src/chromium_impl/chrome/chrome_tests_efl.gni b/tizen_src/chromium_impl/chrome/chrome_tests_efl.gni new file mode 100644 index 0000000..d411852 --- /dev/null +++ b/tizen_src/chromium_impl/chrome/chrome_tests_efl.gni @@ -0,0 +1,12 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +# For //chrome/test/chromedriver:lib target +# It seems that keycode_text_conversion_win.cc is not used in gn files so no need to exclude it. +external_exclude_chrome_test_driver_sources = [] #[ "test/chromedriver/keycode_text_conversion_win.cc" ] +if (use_wayland) { + #external_exclude_chrome_test_driver_sources += [ "test/chromedriver/keycode_text_conversion_x.cc" ] +} diff --git a/tizen_src/chromium_impl/chromium_impl.gypi b/tizen_src/chromium_impl/chromium_impl.gypi index 8d31658..3e4c6e2 100644 --- a/tizen_src/chromium_impl/chromium_impl.gypi +++ b/tizen_src/chromium_impl/chromium_impl.gypi @@ -10,9 +10,9 @@ 'gpu/gpu_efl.gypi', 'media/media_efl.gypi', 'ui/ui_efl.gypi', - 'third_party/WebKit/Source/core/core_efl.gypi', - 'third_party/WebKit/Source/modules/modules_efl.gypi', - 'third_party/WebKit/Source/platform/blink_platform_efl.gypi', + 'third_party/blink/renderer/core/core_efl.gypi', + 'third_party/blink/renderer/modules/modules_efl.gypi', + 'third_party/blink/renderer/platform/blink_platform_efl.gypi', ], # [M53_2785] Temporary disabling the codes for switching to new chromium diff --git a/tizen_src/chromium_impl/components/components.gni b/tizen_src/chromium_impl/components/components.gni new file mode 100644 index 0000000..31b5917 --- /dev/null +++ b/tizen_src/chromium_impl/components/components.gni @@ -0,0 +1,9 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +declare_args() { + chromium_code = 1 +} + +js_dialog_efl_deps = [ "//tizen_src/chromium_impl/components/js_dialogs_efl" ] diff --git a/tizen_src/chromium_impl/components/js_dialogs_efl/BUILD.gn b/tizen_src/chromium_impl/components/js_dialogs_efl/BUILD.gn new file mode 100644 index 0000000..21aa662 --- /dev/null +++ b/tizen_src/chromium_impl/components/js_dialogs_efl/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +static_library("js_dialogs_efl") { + configs += [ + "//tizen_src/build:elementary", + "//tizen_src/build:libelementary", + "//tizen_src/build:efl-extension", + "//tizen_src/build:libefl-extension", + ] + deps = [ + "//base", + "//skia", + ] + include_dirs = [ ".." ] + sources = [ + "javascript_dialog_manager_efl.cc", + "javascript_dialog_manager_efl.h", + "javascript_modal_dialog_efl.cc", + "javascript_modal_dialog_efl.h", + ] +} diff --git a/tizen_src/chromium_impl/content/BUILD.gn b/tizen_src/chromium_impl/content/BUILD.gn new file mode 100644 index 0000000..37e17f9 --- /dev/null +++ b/tizen_src/chromium_impl/content/BUILD.gn @@ -0,0 +1,18 @@ +# copyright (c) 2015 samsung electronics. all rights reserved. +# use of this source code is governed by a bsd-style license that can be +# found in the license file. + +static_library("android_content_detection") { + set_sources_assignment_filter([]) + sources = [ + "//content/renderer/android/renderer_date_time_picker.h", + "//content/renderer/android/renderer_date_time_picker.cc", + ] + + deps = [ + "//third_party/libphonenumber:libphonenumber", + "//third_party/icu:icui18n", + "//third_party/blink/public:blink", + "//mojo/public/cpp/bindings:bindings", + ] +} diff --git a/tizen_src/chromium_impl/content/browser/browser_efl.gni b/tizen_src/chromium_impl/content/browser/browser_efl.gni new file mode 100644 index 0000000..c966874 --- /dev/null +++ b/tizen_src/chromium_impl/content/browser/browser_efl.gni @@ -0,0 +1,82 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/features.gni") + +external_content_browser_efl_sources = [ + "//tizen_src/chromium_impl/content/browser/compositor/context_factory_efl.cc", + "//tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.cc", + "//tizen_src/chromium_impl/content/browser/compositor/mailbox_output_surface_efl.h", + "//tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.h", + "//tizen_src/chromium_impl/content/browser/web_contents/web_contents_view_efl.cc", + "//tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.h", + "//tizen_src/chromium_impl/content/browser/web_contents/web_contents_impl_efl.cc", + "//tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.h", + "//tizen_src/chromium_impl/content/browser/web_contents/web_drag_dest_efl.cc", + "//tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.h", + "//tizen_src/chromium_impl/content/browser/web_contents/web_drag_source_efl.cc", + "//tizen_src/chromium_impl/content/browser/tracing/tracing_controller_efl.h", + "//tizen_src/chromium_impl/content/browser/tracing/tracing_controller_efl.cc", + "//tizen_src/chromium_impl/content/browser/renderer_host/disambiguation_popup_efl.h", + "//tizen_src/chromium_impl/content/browser/renderer_host/disambiguation_popup_efl.cc", + "//tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.h", + "//tizen_src/chromium_impl/content/browser/renderer_host/edge_effect.cc", + "//tizen_src/chromium_impl/content/browser/renderer_host/im_context_efl.h", + "//tizen_src/chromium_impl/content/browser/renderer_host/im_context_efl.cc", + "//tizen_src/chromium_impl/content/browser/renderer_host/native_web_keyboard_event_efl.cc", + "//tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h", + "//tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc", + "//tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.h", + "//tizen_src/chromium_impl/content/browser/renderer_host/web_event_factory_efl.cc", + "//tizen_src/chromium_impl/content/browser/screen_orientation/screen_orientation_delegate_efl.h", + "//tizen_src/chromium_impl/content/browser/screen_orientation/screen_orientation_delegate_efl.cc", + "//tizen_src/chromium_impl/content/browser/selection/selection_box_efl.cc", + "//tizen_src/chromium_impl/content/browser/selection/selection_box_efl.h", + "//tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.cc", + "//tizen_src/chromium_impl/content/browser/selection/selection_controller_efl.h", + "//tizen_src/chromium_impl/content/browser/selection/selection_handle_efl.cc", + "//tizen_src/chromium_impl/content/browser/selection/selection_handle_efl.h", + "//tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.cc", + "//tizen_src/chromium_impl/content/browser/selection/selection_magnifier_efl.h", + "//tizen_src/chromium_impl/content/browser/public/browser/web_contents_efl_delegate.h", + "//tizen_src/chromium_impl/content/browser/public/browser/web_contents_view_efl_delegate.h", +] + +external_content_browser_efl_sources += [ + "//content/browser/renderer_host/ui_events_helper.cc", + "//content/browser/renderer_host/ui_events_helper.h", +] + +if (building_for_tizen) { + external_content_browser_efl_sources += [ + "//tizen_src/chromium_impl/content/browser/speech/tts_message_filter_efl.cc", + "//tizen_src/chromium_impl/content/browser/speech/tts_message_filter_efl.h", + "//tizen_src/chromium_impl/content/browser/speech/tts_tizen.cc", + "//tizen_src/chromium_impl/content/browser/speech/tts_tizen.h", + ] +} +if (building_for_tizen_mobile) { + external_exclude_content_browser_efl_sources = [ "device_sensors/data_fetcher_shared_memory_default.cc" ] + external_content_browser_efl_sources += [ + "//tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.cc", + "//tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_impl_tizen.h", + "//tizen_src/chromium_impl/content/browser/device_sensors/data_fetcher_shared_memory_tizen.cc", + ] +} +if (tizen_multimedia_support) { + external_content_browser_efl_sources += [ + "//tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.cc", + "//tizen_src/chromium_impl/content/browser/media/media_web_contents_observer_efl.h", + "//tizen_src/chromium_impl/content/browser/media/efl/browser_demuxer_efl.cc", + "//tizen_src/chromium_impl/content/browser/media/efl/browser_demuxer_efl.h", + "//tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.cc", + "//tizen_src/chromium_impl/content/browser/media/efl/browser_media_player_manager_efl.h", + ] +} +if (tizen_tbm_support) { + external_content_browser_efl_sources += [ + "//tizen_src/chromium_impl/content/browser/media/browser_mediapacket_manager.cc", + "//tizen_src/chromium_impl/content/browser/media/browser_mediapacket_manager.h", + ] +} diff --git a/tizen_src/chromium_impl/content/common/BUILD.gn b/tizen_src/chromium_impl/content/common/BUILD.gn new file mode 100644 index 0000000..7d3ab57 --- /dev/null +++ b/tizen_src/chromium_impl/content/common/BUILD.gn @@ -0,0 +1,27 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +config("content_common_efl") { + visibility = [ "//tizen_src/chromium_impl/content/common/common_efl.gni" ] + + defines = [ + "DATA_DIR=\"$tizen_data_dir\"", + "EXE_DIR=\"$exe_dir\"", + ] + + if (building_for_tizen) { + defines += [ + "EDJE_DIR=\"$edje_dir\"", + "LOCALE_DIR=\"$locale_dir\"", + ] + } else { + outdir = rebase_path("$root_out_dir") + defines += [ + "EDJE_DIR=\"$outdir/resources\"", + "LOCALE_DIR=\"$outdir/locale\"", + ] + } +} diff --git a/tizen_src/chromium_impl/content/common/common_efl.gni b/tizen_src/chromium_impl/content/common/common_efl.gni new file mode 100644 index 0000000..21a7133 --- /dev/null +++ b/tizen_src/chromium_impl/content/common/common_efl.gni @@ -0,0 +1,57 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +external_content_common_efl_configs = [ "//tizen_src/chromium_impl/content/common:content_common_efl" ] + +external_exclude_content_common_efl_sources = [] + +external_content_common_efl_sources = [ + "//tizen_src/chromium_impl/content/common/content_client_export.cc", + "//tizen_src/chromium_impl/content/common/content_client_export.h", + "//tizen_src/chromium_impl/content/common/message_generator_efl.cc", + "//tizen_src/chromium_impl/content/common/message_generator_efl.h", + "//tizen_src/chromium_impl/content/common/paths_efl.h", + "//tizen_src/chromium_impl/content/common/paths_efl.cc", + "//tizen_src/chromium_impl/content/common/render_messages_efl.h", + "//tizen_src/chromium_impl/content/common/cursors/webcursor_efl.cc", + "//tizen_src/chromium_impl/content/common/cursors/webcursor_efl.h", + "//tizen_src/chromium_impl/content/common/wrt/wrt_url_parse.h", +] + +if (building_for_tizen) { + external_content_common_efl_sources += [ + "//tizen_src/chromium_impl/content/common/tts_messages_efl.h", + "//tizen_src/chromium_impl/content/common/tts_utterance_request_efl.cc", + "//tizen_src/chromium_impl/content/common/tts_utterance_request_efl.h", + ] +} + +if (building_for_tizen && !ewk_bringup) { + external_content_common_efl_sources += [ + "//tizen_src/chromium_impl/content/common/gpu/client/gpu_memory_buffer_impl_efl.cc", + "//tizen_src/chromium_impl/content/common/gpu/gpu_memory_buffer_factory_efl.cc", + ] + + if (!wayland_bringup) { + external_content_common_efl_sources += [ + "//tizen_src/chromium_impl/content/common/gpu/client/gpu_memory_buffer_impl_efl_pixmap.cc", + "//tizen_src/chromium_impl/content/common/gpu/client/gpu_memory_buffer_impl_efl_pixmap.h", + "//tizen_src/chromium_impl/content/common/gpu/gpu_memory_buffer_factory_efl_pixmap.cc", + "//tizen_src/chromium_impl/content/common/gpu/gpu_memory_buffer_factory_efl_pixmap.h", + ] + } +} + +if (tizen_multimedia_support) { + external_content_common_efl_sources += [ + "//tizen_src/chromium_impl/content/common/media/efl/media_player_messages_enums_efl.h", + "//tizen_src/chromium_impl/content/common/media/efl/media_player_messages_efl.h", + "//tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_decode_accelerator.h", + "//tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_decode_accelerator.cc", + "//tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_encode_accelerator.h", + "//tizen_src/chromium_impl/content/common/gpu/media/efl/tizen_video_encode_accelerator.cc", + ] +} diff --git a/tizen_src/chromium_impl/content/content_efl.gni b/tizen_src/chromium_impl/content/content_efl.gni new file mode 100644 index 0000000..8430f21 --- /dev/null +++ b/tizen_src/chromium_impl/content/content_efl.gni @@ -0,0 +1,108 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") +import("//tizen_src/chromium_impl/components/components.gni") + +external_content_common_configs = [ + "//tizen_src/build:capi-appfw-application", + "//tizen_src/build:libcapi-appfw-application", + "//tizen_src/build:tizen_tzplatform_config", + "//tizen_src/build:libtizen_tzplatform_config", + "//tizen_src/build:tts", + "//tizen_src/build:libtts", +] + + +external_content_browser_configs = [ + "//tizen_src/build:capi-media-player", + "//tizen_src/build:libcapi-media-player", + "//tizen_src/build:capi-media-tool", + "//tizen_src/build:libcapi-media-tool", + "//tizen_src/build:capi-system-sensor", + "//tizen_src/build:libcapi-system-sensor", + "//tizen_src/build:ecore", + "//tizen_src/build:libecore", + "//tizen_src/build:ecore-imf-evas", + "//tizen_src/build:libecore-imf-evas", + "//tizen_src/build:ecore-evas", + "//tizen_src/build:libecore-evas", + "//tizen_src/build:elementary", + "//tizen_src/build:libelementary", + "//tizen_src/build:efl-extension", + "//tizen_src/build:libefl-extension", +] + +external_content_browser_extra_configs = [ + "//tizen_src/build:tts", + "//tizen_src/build:libtts", +] + +external_content_browser_deps = [ + "//tizen_src/chromium_impl/efl:window-factory", + "//tizen_src/chromium_impl/edje_resources:edje_resources_efl", + "//ui/gl:gl", +] + +external_content_renderer_extra_configs = [ + "//tizen_src/build:tts", + "//tizen_src/build:libtts", +] + +external_content_renderer_deps = [ + "//tizen_src/chromium_impl/content:android_content_detection", +] + +external_content_gpu_configs = [ + "//tizen_src/build:evas", + "//tizen_src/build:libevas", +] + +external_content_shell_configs = [ + "//tizen_src/build:evas", + "//tizen_src/build:libevas", + "//tizen_src/build:ecore-evas", + "//tizen_src/build:libecore-evas", + "//tizen_src/build:elementary", + "//tizen_src/build:libelementary", +] + +external_content_shell_deps = [ + "//tizen_src/chromium_impl/efl:efl-init", +] +external_content_shell_deps += js_dialog_efl_deps + +if (building_for_tizen) { + external_content_browser_configs += [ + "//tizen_src/build:vconf", + "//tizen_src/build:libvconf", + ] +} + +if (!use_wayland) { + external_content_common_configs += [ "//tizen_src/build:ecore-x" ] + external_content_common_configs += [ "//tizen_src/build:libecore-x" ] + external_content_browser_configs += [ "//tizen_src/build:x11" ] + external_content_browser_configs += [ "//tizen_src/build:libx11" ] + external_content_browser_extra_configs += [ "//tizen_src/build:ecore-x" ] + external_content_browser_extra_configs += [ "//tizen_src/build:libecore-x" ] + external_content_shell_configs += [ "//tizen_src/build:ecore-x" ] + external_content_shell_configs += [ "//tizen_src/build:libecore-x" ] +} else { + external_content_common_configs += [ "//tizen_src/build:ecore-wayland" ] + external_content_common_configs += [ "//tizen_src/build:libecore-wayland" ] + external_content_shell_configs += [ "//tizen_src/build:ecore-wayland" ] + external_content_shell_configs += [ "//tizen_src/build:libecore-wayland" ] +} + +if (tizen_multimedia_support) { + external_content_browser_configs += [ + "//tizen_src/build:capi-media-player", + "//tizen_src/build:libcapi-media-player", + "//tizen_src/build:capi-media-tool", + "//tizen_src/build:libcapi-media-tool", + ] + external_content_common_configs += ["//tizen_src/build:gstreamer"] + external_content_common_configs += ["//tizen_src/build:libgstreamer"] +} diff --git a/tizen_src/chromium_impl/content/content_efl.gyp b/tizen_src/chromium_impl/content/content_efl.gyp index d1075b0..fbfb049 100644 --- a/tizen_src/chromium_impl/content/content_efl.gyp +++ b/tizen_src/chromium_impl/content/content_efl.gyp @@ -15,7 +15,7 @@ 'dependencies' : [ '<(DEPTH)/third_party/libphonenumber/libphonenumber.gyp:libphonenumber', '<(DEPTH)/third_party/icu/icu.gyp:icui18n', - '<(DEPTH)/third_party/WebKit/public/blink.gyp:blink', + '<(DEPTH)/third_party/blink/public/blink.gyp:blink', '<(DEPTH)/mojo/mojo_public.gyp:mojo_cpp_bindings', ], 'sources': [ diff --git a/tizen_src/chromium_impl/content/gpu/gpu_efl.gni b/tizen_src/chromium_impl/content/gpu/gpu_efl.gni new file mode 100644 index 0000000..97a5235 --- /dev/null +++ b/tizen_src/chromium_impl/content/gpu/gpu_efl.gni @@ -0,0 +1,12 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +external_content_gpu_efl_sources = [ + "//tizen_src/chromium_impl/content/gpu/gpu_thread_override_efl.cc", + "//tizen_src/chromium_impl/content/gpu/in_process_gpu_thread_efl.cc", + "//tizen_src/chromium_impl/content/gpu/shared_mailbox_manager.h", + "//tizen_src/chromium_impl/content/gpu/shared_mailbox_manager.cc", +] + +external_exclude_content_gpu_efl_sources = [ "in_process_gpu_thread.cc" ] diff --git a/tizen_src/chromium_impl/content/renderer/renderer_efl.gni b/tizen_src/chromium_impl/content/renderer/renderer_efl.gni new file mode 100644 index 0000000..ba3f05d --- /dev/null +++ b/tizen_src/chromium_impl/content/renderer/renderer_efl.gni @@ -0,0 +1,34 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +external_exclude_content_renderer_efl_sources = [] + +if (building_for_tizen) { + external_content_renderer_efl_sources = [ + "//tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.cc", + "//tizen_src/chromium_impl/content/renderer/tts_dispatcher_efl.h", + ] +} + +if (tizen_multimedia_support) { + external_exclude_content_renderer_efl_sources = [ + "//content/renderer/media/audio_decoder.cc", + "//content/renderer/media/audio_decoder.h", + ] + + external_content_renderer_efl_sources += [ + "media/efl/audio_decoder_efl.h", + "media/efl/media_source_delegate_efl.cc", + "media/efl/media_source_delegate_efl.h", + "media/efl/renderer_demuxer_efl.cc", + "media/efl/renderer_demuxer_efl.h", + "media/efl/renderer_media_player_manager_efl.cc", + "media/efl/renderer_media_player_manager_efl.h", + "media/efl/webmediaplayer_efl.cc", + "media/efl/webmediaplayer_efl.h", + "media/tizen/audio_decoder_capi.cc", + ] +} diff --git a/tizen_src/chromium_impl/content/shell/shell_efl.gni b/tizen_src/chromium_impl/content/shell/shell_efl.gni new file mode 100644 index 0000000..7e051e6 --- /dev/null +++ b/tizen_src/chromium_impl/content/shell/shell_efl.gni @@ -0,0 +1,12 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +external_content_shell_lib_efl_sources = [ + "//tizen_src/chromium_impl/content/shell/browser/shell_efl.cc", + "//tizen_src/chromium_impl/content/shell/browser/shell_web_contents_view_delegate_efl.cc" +] + +external_content_shell_efl_sources = [ "//tizen_src/chromium_impl/content/shell/browser/shell_main_efl.cc" ] + +external_exclude_content_shell_efl_sources = [ "app/shell_main.cc" ] diff --git a/tizen_src/chromium_impl/device/battery_tizen.gni b/tizen_src/chromium_impl/device/battery_tizen.gni new file mode 100644 index 0000000..0e5ee98 --- /dev/null +++ b/tizen_src/chromium_impl/device/battery_tizen.gni @@ -0,0 +1,15 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +external_device_battery_configs = [ + "//tizen_src/build:capi-system-device", + "//tizen_src/build:libcapi-system-device", + "//tizen_src/build:vconf", + "//tizen_src/build:libvconf", +] + +external_device_battery_sources = [ + "//tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.cc", + "//tizen_src/chromium_impl/device/battery/battery_status_manager_tizen.h", +] diff --git a/tizen_src/chromium_impl/device/vibration/vibration_efl.gni b/tizen_src/chromium_impl/device/vibration/vibration_efl.gni new file mode 100644 index 0000000..d0869ec --- /dev/null +++ b/tizen_src/chromium_impl/device/vibration/vibration_efl.gni @@ -0,0 +1,11 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +external_device_vibration_efl_sources = [ + "//tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.cc", + "//tizen_src/chromium_impl/device/vibration/vibration_manager_impl_efl.h", + "//tizen_src/chromium_impl/device/vibration/vibration_provider_client.h", +] + +external_exclude_device_vibration_efl_sources = [ "vibration_manager_impl_default.cc" ] diff --git a/tizen_src/chromium_impl/edje_resources/BUILD.gn b/tizen_src/chromium_impl/edje_resources/BUILD.gn new file mode 100644 index 0000000..b43c08f --- /dev/null +++ b/tizen_src/chromium_impl/edje_resources/BUILD.gn @@ -0,0 +1,34 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +template("edje_res_efl") { + edje_target_name = "${target_name}_generate" + action_foreach(edje_target_name) { + script = "//tizen_src/build/cmd_execution.py" + sources = invoker.sources + outputs = [ "$root_out_dir/resources/{{source_name_part}}.edj" ] + args = [ + "$edje_compiler", + "-id", + rebase_path("images/"), + rebase_path("{{source_file_part}}"), + rebase_path("$root_out_dir/resources/{{source_name_part}}.edj"), + ] + } + + source_set(target_name) { + deps = [ ":$edje_target_name" ] + } +} + +edje_res_efl("edje_resources_efl") { + sources = [ + "SelectionHandles.edc", + "Magnifier.edc", + "DisambiguationPopup.edc", + "Edge.edc", + ] +} diff --git a/tizen_src/chromium_impl/efl/BUILD.gn b/tizen_src/chromium_impl/efl/BUILD.gn new file mode 100644 index 0000000..e44699f --- /dev/null +++ b/tizen_src/chromium_impl/efl/BUILD.gn @@ -0,0 +1,47 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +static_library("window-factory") { + configs += [ "//tizen_src/build:evas" ] + configs += [ "//tizen_src/build:libevas" ] + configs += [ "//tizen_src/build:elementary" ] + configs += [ "//tizen_src/build:libelementary" ] + public_configs = [ "//tizen_src/build:elementary-public" ] + + sources = [ + "window_factory.h", + "window_factory.cc", + ] +} + +static_library("efl-init") { + configs += [ "//tizen_src/build:evas" ] + configs += [ "//tizen_src/build:libevas" ] + configs += [ "//tizen_src/build:elementary" ] + configs += [ "//tizen_src/build:libelementary" ] + public_configs = [ "//tizen_src/build:elementary-public" ] + + deps = [ "//ui/compositor:compositor" ] + + sources = [ + "efl_export.h", + "init.h", + "init.cc", + ] + + if (use_ozone) { + deps += [ "//ui/ozone:ozone" ] + } + if (use_wayland) { + configs += [ "//tizen_src/build:ecore-wayland" ] + configs += [ "//tizen_src/build:libecore-wayland" ] + public_configs += [ "//tizen_src/build:ecore-wayland-public" ] + } else { + configs += [ "//tizen_src/build:ecore-x" ] + configs += [ "//tizen_src/build:libecore-x" ] + public_configs += [ "//tizen_src/build:ecore-x-public" ] + } +} diff --git a/tizen_src/chromium_impl/gpu/gpu_efl.gni b/tizen_src/chromium_impl/gpu/gpu_efl.gni new file mode 100644 index 0000000..87c6ab9 --- /dev/null +++ b/tizen_src/chromium_impl/gpu/gpu_efl.gni @@ -0,0 +1,23 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +external_exclude_gpu_efl_sources = [ + "gpu_driver_bug_list_json.cc", + "gpu_info_collector_x11.cc", + "software_rendering_list_json.cc", +] + +if (!is_tizen) { + external_exclude_gpu_efl_sources += [ + "gpu_info_collector_linux.cc", + ] +} + +external_gpu_efl_sources = [ + "//tizen_src/chromium_impl/gpu/config/gpu_driver_bug_list_json_efl.cc", + "//tizen_src/chromium_impl/gpu/config/gpu_info_collector_efl.cc", + "//tizen_src/chromium_impl/gpu/config/software_rendering_list_json_efl.cc", + "//tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.cc", + "//tizen_src/chromium_impl/gpu/config/scoped_restore_non_owned_egl_context.h" +] diff --git a/tizen_src/chromium_impl/media/BUILD.gn b/tizen_src/chromium_impl/media/BUILD.gn new file mode 100644 index 0000000..5d9a968 --- /dev/null +++ b/tizen_src/chromium_impl/media/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +if (tizen_multimedia_support) { + config("media_efl_config") { + defines = [ + "TIZEN_VIDEO_CAPTURE_SUPPORT", + "TIZEN_MULTIMEDIA_ZEROCOPY_SUPPORT", + ] + + include_dirs = [ + "//third_party/WebKit", + "//third_party/libyuv/include", + "//third_party/mojo/src", + "//v8/include", + ] + + defines += [ "TIZEN_MULTIMEDIA_EME_SUPPORT = 1" ] + } +} diff --git a/tizen_src/chromium_impl/media/media_efl.gni b/tizen_src/chromium_impl/media/media_efl.gni new file mode 100644 index 0000000..04747a0 --- /dev/null +++ b/tizen_src/chromium_impl/media/media_efl.gni @@ -0,0 +1,86 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +external_media_efl_deps = [] +external_media_efl_sources = [] +external_exclude_media_efl_sources = [] +external_media_efl_config = [] + +if (use_ozone) { + external_media_efl_deps += [ "//tizen_src/chromium_impl/ui/ozone:ozone_efl" ] +} + +if (tizen_multimedia_support) { + external_media_efl_deps += [ + "//tizen_src/build:capi-media-audio-io", + "//tizen_src/build:libcapi-media-audio-io", + "//tizen_src/build:capi-media-camera", + "//tizen_src/build:libcapi-media-camera", + "//tizen_src/build:capi-media-player", + "//tizen_src/build:libcapi-media-player", + "//tizen_src/build:ecore", + "//tizen_src/build:libecore", + "//tizen_src/build:mm_player", + ] + + if (!use_wayland) { + external_media_efl_deps += [ + "//tizen_src/build:ecore-x", + "//tizen_src/build:libecore-x", + "//ui/gl:gl", + ] + } else { + external_media_efl_deps += [ "//tizen_src/build:ecore-wayland" ] + external_media_efl_deps += [ "//tizen_src/build:libecore-wayland" ] + } + + if (building_for_tizen_mobile) { + external_media_efl_deps += [ "//tizen_src/build:capi-system-device" ] + external_media_efl_deps += [ "//tizen_src/build:libcapi-system-device" ] + } + + external_media_efl_sources += [ + "audio/tizen/audio_manager_capi.cc", + "audio/tizen/audio_manager_capi.h", + "audio/tizen/audio_manager_tizen.cc", + "audio/tizen/capi_audio_input.cc", + "audio/tizen/capi_audio_input.h", + "audio/tizen/capi_audio_output.cc", + "audio/tizen/capi_audio_output.h", + "audio/tizen/capi_util.cc", + "audio/tizen/capi_util.h", + "base/efl/demuxer_efl.h", + "base/efl/demuxer_stream_player_params_efl.cc", + "base/efl/demuxer_stream_player_params_efl.h", + "base/efl/media_player_efl.cc", + "base/efl/media_player_efl.h", + "base/efl/media_player_manager_efl.h", + "base/efl/media_player_util_efl.cc", + "base/efl/media_player_util_efl.h", + "base/efl/webaudio_decoder_efl.h", + "base/efl/webaudio_media_codec_info_efl.h", + "base/tizen/media_player_bridge_capi.cc", + "base/tizen/media_player_bridge_capi.h", + "base/tizen/media_source_player_capi.cc", + "base/tizen/media_source_player_capi.h", + "base/tizen/webaudio_decoder_browser_capi.cc", + "base/tizen/webaudio_decoder_browser_capi.h", + "capture/video/tizen/video_capture_device_factory_tizen.cc", + "capture/video/tizen/video_capture_device_factory_tizen.h", + "capture/video/tizen/video_capture_device_tizen.cc", + "capture/video/tizen/video_capture_device_tizen.h", + ] + + external_exclude_media_efl_sources += [ + "audio/linux/audio_manager_linux.cc", + "capture/video/linux/video_capture_device_factory_linux.cc", + "capture/video/linux/video_capture_device_factory_linux.h", + "capture/video/linux/video_capture_device_linux.cc", + "capture/video/linux/video_capture_device_linux.h", + ] + + external_media_efl_config += [ ":media_efl_config" ] +} diff --git a/tizen_src/chromium_impl/third_party/WebKit/Source/core/BUILD.gn b/tizen_src/chromium_impl/third_party/WebKit/Source/core/BUILD.gn new file mode 100644 index 0000000..d436269 --- /dev/null +++ b/tizen_src/chromium_impl/third_party/WebKit/Source/core/BUILD.gn @@ -0,0 +1,32 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +source_set("webkit_core_generated") { + sources = [ + "$root_gen_dir/TizenUserAgentStyleSheets.h", + "$root_gen_dir/TizenUserAgentStyleSheetsData.cpp", + ] + + deps = [ ":TizenUserAgentStyleSheets" ] +} + +action("TizenUserAgentStyleSheets") { + script = "make-file-arrays.py" + stylesheet = "rendering/themeChromiumTizen.css" + inputs = [ + stylesheet, + ] + outputs = [ + "$root_gen_dir/TizenUserAgentStyleSheets.h", + "$root_gen_dir/TizenUserAgentStyleSheetsData.cpp", + ] + out_h = rebase_path("$root_gen_dir/TizenUserAgentStyleSheets.h", root_build_dir) + out_cpp = rebase_path("$root_gen_dir/TizenUserAgentStyleSheetsData.cpp", root_build_dir) + args = [ + "--namespace", + "blink", + "--out-h=$out_h", + "--out-cpp=$out_cpp", + ] + rebase_path(inputs, root_build_dir) +} diff --git a/tizen_src/chromium_impl/third_party/WebKit/Source/core/core_efl.gni b/tizen_src/chromium_impl/third_party/WebKit/Source/core/core_efl.gni new file mode 100644 index 0000000..84fbb10 --- /dev/null +++ b/tizen_src/chromium_impl/third_party/WebKit/Source/core/core_efl.gni @@ -0,0 +1,26 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# For //third_party/blink/renderer/core:rendering target +# Temporary kept in the //third_party/blink/renderer/core:remaining target +if (is_tizen) { + # Already excluded using !linux in //third_party/blink/renderer/core/BUILD.gn + external_exclude_webkit_core_rendering_sources = [] +} else { +# [TODO] This code should be fixed. +# external_exclude_webkit_core_rendering_sources = [ "layout/LayoutThemeLinux.cpp" ] + external_exclude_webkit_core_rendering_sources = [] +} +external_webkit_core_rendering_sources = [ + "//tizen_src/chromium_impl/third_party/blink/renderer/core/rendering/RenderThemeChromiumTizen.cpp", + "//tizen_src/chromium_impl/third_party/blink/renderer/core/rendering/RenderThemeChromiumTizen.h", +] + +# For //third_party/blink/renderer/core:core_generated target +external_webkit_core_generated_deps = [ + "//tizen_src/chromium_impl/third_party/blink/renderer/core:webkit_core_generated", +] + +# For //third_party/blink/renderer/core:make_core_generated target +external_webkit_core_make_generated_deps = [ "//tizen_src/chromium_impl/third_party/blink/renderer/core:TizenUserAgentStyleSheets" ] diff --git a/tizen_src/chromium_impl/third_party/WebKit/Source/core/core_efl.gypi b/tizen_src/chromium_impl/third_party/WebKit/Source/core/core_efl.gypi index e6fad5b..1172b4a 100644 --- a/tizen_src/chromium_impl/third_party/WebKit/Source/core/core_efl.gypi +++ b/tizen_src/chromium_impl/third_party/WebKit/Source/core/core_efl.gypi @@ -29,10 +29,10 @@ 'action_name': 'TizenUserAgentStyleSheets', 'variables': { 'scripts': [ - '<(DEPTH)/tizen_src/chromium_impl/third_party/WebKit/Source/core/make-file-arrays.py', + '<(DEPTH)/tizen_src/chromium_impl/third_party/blink/renderer/core/make-file-arrays.py', ], 'stylesheets': [ - '<(DEPTH)/tizen_src/chromium_impl/third_party/WebKit/Source/core/rendering/themeChromiumTizen.css', + '<(DEPTH)/tizen_src/chromium_impl/third_party/blink/renderer/core/rendering/themeChromiumTizen.css', ], }, 'inputs': [ diff --git a/tizen_src/chromium_impl/third_party/WebKit/Source/core/make-file-arrays.py b/tizen_src/chromium_impl/third_party/WebKit/Source/core/make-file-arrays.py index 0bedc2d..c7f1a6d 100755 --- a/tizen_src/chromium_impl/third_party/WebKit/Source/core/make-file-arrays.py +++ b/tizen_src/chromium_impl/third_party/WebKit/Source/core/make-file-arrays.py @@ -109,7 +109,8 @@ def write_header_file(header_file_name, flag, names_and_contents, namespace): def write_cpp_file(cpp_file_name, flag, names_and_contents, header_file_name, namespace): with open(cpp_file_name, 'w') as cpp_file: - cpp_file.write('#include "config.h"\n') + # TODO : commented for gn build. + #cpp_file.write('#include "config.h"\n') cpp_file.write('#include "%s"\n' % os.path.basename(header_file_name)) if flag: cpp_file.write('#if ' + flag + '\n') diff --git a/tizen_src/chromium_impl/third_party/WebKit/Source/modules/modules_efl.gni b/tizen_src/chromium_impl/third_party/WebKit/Source/modules/modules_efl.gni new file mode 100644 index 0000000..fb84a85 --- /dev/null +++ b/tizen_src/chromium_impl/third_party/WebKit/Source/modules/modules_efl.gni @@ -0,0 +1,10 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +if (use_gstreamer_fft) { + external_webkit_modules_configs = [ "//tizen_src/build:gstreamer-fft" ] + external_webkit_modules_configs += [ "//tizen_src/build:libgstreamer-fft" ] +} diff --git a/tizen_src/chromium_impl/third_party/WebKit/Source/platform/blink_platform_efl.gni b/tizen_src/chromium_impl/third_party/WebKit/Source/platform/blink_platform_efl.gni new file mode 100644 index 0000000..ec455d9 --- /dev/null +++ b/tizen_src/chromium_impl/third_party/WebKit/Source/platform/blink_platform_efl.gni @@ -0,0 +1,5 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +external_webkit_platform_files = [ "//tizen_src/chromium_impl/third_party/blink/renderer/platform/audio/gstreamer/FFTFrameGStreamer.cpp" ] diff --git a/tizen_src/chromium_impl/ui/BUILD.gn b/tizen_src/chromium_impl/ui/BUILD.gn new file mode 100644 index 0000000..9132e91 --- /dev/null +++ b/tizen_src/chromium_impl/ui/BUILD.gn @@ -0,0 +1,32 @@ +# copyright (c) 2015 samsung electronics. all rights reserved. +# use of this source code is governed by a bsd-style license that can be +# found in the license file. + +static_library("ui_events_source_inject") { + sources = [ + # Indirectly includes ui/events/gestures/gesture_recognizer_impl_efl.cc/h. + "events/gestures/gesture_recognizer_impl_override.cc", + "events/gestures/gesture_recognizer_impl_efl.cc", + "events/gestures/gesture_recognizer_impl_efl.h", + "//ui/events/gestures/gesture_provider_aura.cc", + "//ui/events/gestures/gesture_provider_aura.h", + "//ui/events/gestures/motion_event_aura.cc", + "//ui/events/gestures/motion_event_aura.h", + ] +} + +static_library("ui_native_theme_inject") { + sources = [ + "//ui/native_theme/native_theme_aura.h", + "//ui/native_theme/native_theme_aura.cc", + ] + deps = [ "//skia" ] +} + +static_library("ui_base_inject") { + sources = [ + #"//ui/base/cursor/cursors_aura.h", + #"//ui/base/cursor/cursors_aura.cc", + ] + deps = [ "//skia" ] +} diff --git a/tizen_src/chromium_impl/ui/ozone/BUILD.gn b/tizen_src/chromium_impl/ui/ozone/BUILD.gn new file mode 100644 index 0000000..21822ea --- /dev/null +++ b/tizen_src/chromium_impl/ui/ozone/BUILD.gn @@ -0,0 +1,26 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//tizen_src/build/config/tizen_features.gni") + +static_library("ozone_efl") { + deps = [ "//ui/ozone/common" ] + + if (!use_wayland) { + configs += [ "//tizen_src/build:ecore-x" ] + configs += [ "//tizen_src/build:libecore-x" ] + } else { + configs += [ "//tizen_src/build:ecore-wayland" ] + configs += [ "//tizen_src/build:libecore-wayland" ] + } + + sources = [ + "client_native_pixmap_factory_efl.h", + "client_native_pixmap_factory_efl.cc", + "ozone_platform_efl.h", + "ozone_platform_efl.cc", + "surface_factory_efl.h", + "surface_factory_efl.cc", + ] +} diff --git a/tizen_src/chromium_impl/ui/ui_efl.gni b/tizen_src/chromium_impl/ui/ui_efl.gni new file mode 100644 index 0000000..6d86b21 --- /dev/null +++ b/tizen_src/chromium_impl/ui/ui_efl.gni @@ -0,0 +1,136 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("ui_efl_injections.gni") +import("//tizen_src/build/config/tizen_features.gni") + +external_ui_base_configs = [ + "//tizen_src/build:elementary", + "//tizen_src/build:libelementary", +] + +external_ui_gl_configs = [ + "//tizen_src/build:evas", + "//tizen_src/build:libevas", + "//tizen_src/build:ecore-evas", + "//tizen_src/build:libecore-evas", + "//tizen_src/build:libdrm", + "//tizen_src/build:liblibdrm", + "//tizen_src/build:libtbm", + "//tizen_src/build:liblibtbm", +] + +external_ui_gfx_x11_configs = [] +external_ui_gfx_configs = [] +external_ozone_platform_deps = [] + +if (!use_wayland) { + external_ui_base_configs += [ + "//tizen_src/build:ecore-x", + "//tizen_src/build:libecore-x", + "//tizen_src/build:x11", + "//tizen_src/build:libx11", + ] + external_ui_gl_configs += [ "//tizen_src/build:libdri2" ] + external_ui_gl_configs += [ "//tizen_src/build:liblibdri2" ] + external_ui_gfx_x11_configs += [ "//tizen_src/build:ecore-x" ] + external_ui_gfx_x11_configs += [ "//tizen_src/build:libecore-x" ] + external_ui_gfx_configs += [ "//tizen_src/build:ecore-x" ] + external_ui_gfx_configs += [ "//tizen_src/build:libecore-x" ] + + if (building_for_tizen) { + # needed for efl_pixmap.cc/h + external_ui_gl_configs += [ "//tizen_src/build:x11" ] + external_ui_gl_configs += [ "//tizen_src/build:libx11" ] + } +} else { + external_ui_gfx_configs += [ "//tizen_src/build:ecore-wayland" ] + external_ui_gfx_configs += [ "//tizen_src/build:libecore-wayland" ] +} + +if (use_ozone) { + external_ozone_platform_deps += [ + "//tizen_src/chromium_impl/ui/ozone:ozone_efl", + "//ui/events/devices:devices", + ] +} + +# For //ui/gfx target +external_ui_gfx_sources = [ + "//ui/gfx/nine_image_painter.cc", + "//ui/gfx/nine_image_painter.h", + "//tizen_src/chromium_impl/ui/display/device_display_info_efl.cc", + "//tizen_src/chromium_impl/ui/display/device_display_info_efl.h", + "//tizen_src/chromium_impl/ui/display/screen_efl.h", + "//tizen_src/chromium_impl/ui/display/screen_efl.cc", +] + +# For //ui/gfx/x target +external_ui_gfx_x11_sources = [ "//tizen_src/chromium_impl/ui/gfx/x/x11_types_override.cc" ] +external_exclude_ui_gfx_x11_sources = [ "x11_types.cc" ] +if (wayland_bringup) { + external_exclude_ui_gfx_x11_sources += [ "gfx/x11_types_override.cc" ] +} + +external_exclude_ui_gl_sources = [] +# For //ui/gl target +external_exclude_ui_gl_sources += [ "gl_context_egl.cc" ] +external_ui_gl_sources = [ + "//tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.h", + "//tizen_src/chromium_impl/ui/gl/gl_shared_context_efl.cc", + "//tizen_src/chromium_impl/ui/gl/gl_context_egl_override.cc", + "//tizen_src/chromium_impl/ui/gl/gl_current_context_efl.cc", +] +if (building_for_tizen) { + external_ui_gl_sources += [ + "//tizen_src/chromium_impl/ui/gl/gl_image_efl_pixmap.cc", + "//tizen_src/chromium_impl/ui/gl/gl_image_efl_pixmap.h", + ] + if (!wayland_bringup) { + external_ui_gl_sources += [ + "//tizen_src/chromium_impl/ui/gl/efl_pixmap.cc", + "//tizen_src/chromium_impl/ui/gl/efl_pixmap.h", + ] + } +} + +# For //ui/events/platform/x11 target +external_exclude_ui_x11_event_sources = [] +if (wayland_bringup) { + external_exclude_ui_x11_event_sources = [ + "gfx/x11_event_source_efl.h", + "gfx/x11_event_source_efl.cc", + ] +} + +# For //ui/base target +external_ui_base_includes = [ "//third_party/mojo/src/" ] +external_ui_base_sources = [ + "//ui/base/cursor/cursor.h", + "//ui/base/cursor/cursor.cc", + "//ui/base/nine_image_painter_factory.h", + "//tizen_src/chromium_impl/ui/base/resource/resource_bundle_efl.cc", + "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_efl.cc", + "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_efl.h", + "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl.cc", + "//tizen_src/chromium_impl/ui/base/clipboard/clipboard_helper_efl.h", +] +if (use_x11) { + if (!wayland_bringup) { + external_ui_base_sources += [ + "//ui/base/cursor/cursor_x11.cc", + "//ui/base/cursor/cursor_x11.h", + "//ui/base/cursor/cursor_loader_x11.h", + "//ui/base/cursor/cursor_loader_x11.cc", + ] + } +} +external_exclude_ui_base_sources = [] + +# For //ui/snapshot target +external_ui_snapshot_sources = [ "//tizen_src/chromium_impl/ui/snapshot/snapshot_efl.cc" ] + +# For //ui/events:gesture_detection target +external_exclude_ui_gesture_detection_sources = [ "gesture_detection/gesture_configuration_default.cc"] +external_ui_gesture_detection_sources = [ "//tizen_src/chromium_impl/ui/events/gesture_detection/gesture_configuration_efl.cc" ] diff --git a/tizen_src/chromium_impl/ui/ui_efl_injections.gni b/tizen_src/chromium_impl/ui/ui_efl_injections.gni new file mode 100644 index 0000000..6209c0a --- /dev/null +++ b/tizen_src/chromium_impl/ui/ui_efl_injections.gni @@ -0,0 +1,37 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# In static mode, we build some sources that is needed +# by efl-port as injectable static library. +# However, in component mode, we build each of ui modules +# as single DLL. So we include needed sources directly. + +external_ui_base_static_lib_deps = [ "//tizen_src/chromium_impl/ui:ui_base_inject" ] + +external_ui_events_static_lib_deps = [ "//tizen_src/chromium_impl/ui:ui_events_source_inject" ] + +external_native_theme_static_lib_deps = [ "//tizen_src/chromium_impl/ui:ui_native_theme_inject" ] + +# For //ui/base target +external_ui_base_shared_lib_sources = [ + "cursor/cursors_aura.cc", + "cursor/cursors_aura.h", +] + +# For //ui/events target +external_ui_events_shared_lib_sources = [ + "events/gestures/gesture_recognizer_impl_override.cc", + "events/gestures/gesture_recognizer_impl_efl.cc", + "events/gestures/gesture_recognizer_impl_efl.h", + "gestures/gesture_provider_aura.cc", + "gestures/gesture_provider_aura.h", + "gestures/motion_event_aura.cc", + "gestures/motion_event_aura.h", +] + +# For //ui/native_theme target +external_ui_native_theme_shared_lib_sources = [ + "native_theme_aura.cc", + "native_theme_aura.h", +] diff --git a/tizen_src/ewk/BUILD.gn b/tizen_src/ewk/BUILD.gn new file mode 100644 index 0000000..0770d10 --- /dev/null +++ b/tizen_src/ewk/BUILD.gn @@ -0,0 +1,12 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +group("chromium_efl_all") { + testonly = true + deps = [ +# "//tizen_src/ewk/unittest:ewk_unittests", + "//tizen_src/ewk/ubrowser:ubrowser", + "//tizen_src/ewk/efl_webview_app:efl_webview_app", + ] +} diff --git a/tizen_src/ewk/efl_integration/BUILD.gn b/tizen_src/ewk/efl_integration/BUILD.gn new file mode 100644 index 0000000..959d68d --- /dev/null +++ b/tizen_src/ewk/efl_integration/BUILD.gn @@ -0,0 +1,546 @@ +# Copyright (c) 2015 Samsung Electronics. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +import("//build/config/allocator.gni") +import("//build/config/features.gni") + +# [M48_2564] Temporary disabling the flag for switching to new chromium +# FIXME: http://web.sec.samsung.net/bugzilla/show_bug.cgi?id=15382 +tizen_autofill_support = false + +# Components used to auto generate CHROMIUM_VERSION preprocessor define. +#TODO : below uncomment +#version_file = "//chrome/VERSION" +#version_script = "//build/util/version.py" +#version_pattern = "@MAJOR@.@MINOR@.@BUILD@.@PATCH@" + +shared_library("chromium-ewk") { + include_dirs = [ + ".", + "//tizen_src/ewk/efl_integration/public", + "//third_party/skia/include/core", + "//v8/include", + "$root_gen_dir/blink", + ] + configs += [ "//tizen_src/build:ecore" ] + configs += [ "//tizen_src/build:libecore" ] + configs += [ "//tizen_src/build:evas" ] + configs += [ "//tizen_src/build:libevas" ] + configs += [ "//tizen_src/build:ecore-evas" ] + configs += [ "//tizen_src/build:libecore-evas" ] + public_configs = [ "//tizen_src/build:ecore-evas-public" ] + configs += [ "//tizen_src/build:elementary" ] + configs += [ "//tizen_src/build:libelementary" ] + public_configs += [ "//tizen_src/build:elementary-public" ] + configs += [ "//tizen_src/build:gstreamer" ] + configs += [ "//tizen_src/build:libgstreamer" ] + public_configs += [ "//tizen_src/build:gstreamer-public" ] + configs += [ "//tizen_src/build:vconf" ] + configs += [ "//tizen_src/build:libvconf" ] + public_configs += [ "//tizen_src/build:vconf-public" ] + configs += [ "//tizen_src/build:capi-location-manager" ] + configs += [ "//tizen_src/build:libcapi-location-manager" ] + public_configs += [ "//tizen_src/build:capi-location-manager-public" ] + configs += [ "//tizen_src/build:capi-system-info" ] + configs += [ "//tizen_src/build:libcapi-system-info" ] + public_configs += [ "//tizen_src/build:capi-system-info-public" ] + configs += [ "//tizen_src/build:capi-media-camera" ] + configs += [ "//tizen_src/build:libcapi-media-camera" ] + public_configs += [ "//tizen_src/build:capi-media-camera-public" ] + configs += [ "//tizen_src/build:feedback" ] + configs += [ "//tizen_src/build:libfeedback" ] + public_configs += [ "//tizen_src/build:feedback-public" ] + configs += [ "//tizen_src/build:efl-extension" ] + configs += [ "//tizen_src/build:libefl-extension" ] + public_configs += [ "//tizen_src/build:efl-extension-public" ] + configs += [ "//tizen_src/build:ui-gadget" ] + configs += [ "//tizen_src/build:libui-gadget" ] + public_configs += [ "//tizen_src/build:ui-gadget-public" ] + deps = [ + "//tizen_src/ewk/po_tizen:locale_efl", + "//tizen_src/chromium_impl/efl:efl-init", + + "//base/:base_static", + "//chrome/common/media_router/mojo:media_router", + "//chrome:packed_resources", + "//content/public/browser", + "//content/shell:resources", + "//content/shell:pak", + "//components/visitedlink/browser", + "//components/visitedlink/renderer", + "//components/sessions", + "//components/autofill/content/renderer", + "//components/autofill/content/browser", + "//components/network_session_configurator/browser", + "//components/password_manager/content/browser", + "//components/password_manager/core/common", + "//components/password_manager/core/browser", + "//components/plugins/renderer", + "//components/variations", + "//services/device:lib", + "//extensions:shell_and_test_pak", + "//printing", + "//skia", + "//storage/browser", + "//third_party/leveldatabase", + "//third_party/sqlite", + "//third_party/blink/renderer/platform/wtf", + "//ui/compositor", + "//ui/events", + "//ui/events:events_base", + "//ui/gl", + "//v8", + ] + + # TODO : needs to check for generating this macro define + defines = [ "CHROMIUM_VERSION=\" Date: Sat, 25 Feb 2017 14:06:32 +0900 Subject: [PATCH 11/16] [M67 Dev][EFL] Set up build environment The gn build is supported by default: $ ./tizen_src/build/build_desktop.sh The followings are included in this: [Build] Use GN by default instead of GYP https://review.tizen.org/gerrit/#/c/116494/ [Build] Move tizen_src/packaging/ directory to top https://review.tizen.org/gerrit/#/c/116944/ [A&O] Revise replace_gn_files.py to support multiple replacements https://review.tizen.org/gerrit/#/c/128811/ fixup! [A&O] Revise replace_gn_files.py to support multiple replacements https://review.tizen.org/gerrit/#/c/129273/ Upgrade version of efl, elementary https://review.tizen.org/gerrit/#/c/161190/ Remove the apply_patches.sh calls https://review.tizen.org/gerrit/#/c/171551/ Change-Id: Id2e9c444434ed7ba5b6557920d111fc802364d71 Signed-off-by: Youngsoo Choi --- build/linux/unbundle/replace_gn_files.py | 45 +- .../chromium-efl-libs.manifest | 0 .../packaging => packaging}/chromium-efl-libs.spec | 0 .../packaging => packaging}/chromium-efl.manifest | 0 .../packaging => packaging}/chromium-efl.spec | 38 +- .../chromium-efl_v3.0.manifest | 0 .../chromium-ewktest.manifest | 0 .../packaging => packaging}/content_shell.in | 0 .../packaging => packaging}/crosswalk-bin.spec | 0 {tizen_src/packaging => packaging}/manifest.xml | 0 .../packaging => packaging}/print-chromium-deps.py | 0 tizen_src/build/apply_patches.sh | 41 - tizen_src/build/build_desktop.sh | 37 +- tizen_src/build/common.sh | 16 +- tizen_src/build/cross_build_mobile.sh | 2 - tizen_src/build/cross_build_tv.sh | 2 - tizen_src/build/gn_chromiumefl | 3 - tizen_src/build/gn_chromiumefl.sh | 47 +- tizen_src/build/jhbuild/jhbuild.modules | 58 +- tizen_src/build/jhbuild/jhbuildrc | 5 +- ...do-not-build-several-chromium-dependencies.diff | 919 --------------------- .../build/patches/gn_build_is_tizen_on_ffmpeg.diff | 100 --- .../build/patches/hotfix_enable_content_shell.diff | 41 - .../build/patches/hotfix_m53_2785_include_py.diff | 22 - .../patches/hotfix_m53_2785_render_view_impl.diff | 35 - tizen_src/build/patches/info.txt | 4 - 26 files changed, 120 insertions(+), 1295 deletions(-) rename {tizen_src/packaging => packaging}/chromium-efl-libs.manifest (100%) rename {tizen_src/packaging => packaging}/chromium-efl-libs.spec (100%) rename {tizen_src/packaging => packaging}/chromium-efl.manifest (100%) rename {tizen_src/packaging => packaging}/chromium-efl.spec (96%) rename {tizen_src/packaging => packaging}/chromium-efl_v3.0.manifest (100%) rename {tizen_src/packaging => packaging}/chromium-ewktest.manifest (100%) rename {tizen_src/packaging => packaging}/content_shell.in (100%) rename {tizen_src/packaging => packaging}/crosswalk-bin.spec (100%) rename {tizen_src/packaging => packaging}/manifest.xml (100%) rename {tizen_src/packaging => packaging}/print-chromium-deps.py (100%) delete mode 100755 tizen_src/build/apply_patches.sh delete mode 100644 tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff delete mode 100644 tizen_src/build/patches/gn_build_is_tizen_on_ffmpeg.diff delete mode 100644 tizen_src/build/patches/hotfix_enable_content_shell.diff delete mode 100644 tizen_src/build/patches/hotfix_m53_2785_include_py.diff delete mode 100644 tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff delete mode 100644 tizen_src/build/patches/info.txt diff --git a/build/linux/unbundle/replace_gn_files.py b/build/linux/unbundle/replace_gn_files.py index d4d07f2..8ef6e3d 100755 --- a/build/linux/unbundle/replace_gn_files.py +++ b/build/linux/unbundle/replace_gn_files.py @@ -58,18 +58,45 @@ def DoMain(argv): handled_libraries.add(lib) if args.undo: - # Restore original file, and also remove the backup. - # This is meant to restore the source tree to its original state. - os.rename(os.path.join(source_tree_root, path + '.orig'), - os.path.join(source_tree_root, path)) + try: + # Restore original file, and also remove the backup. + # This is meant to restore the source tree to its original state. + os.rename(os.path.join(source_tree_root, path + '.orig'), + os.path.join(source_tree_root, path)) + except OSError: + # .orig file may be not created (when we skip fetching the target + # library due to unexpected termination), so just ignore the error. + pass else: - # Create a backup copy for --undo. - shutil.copyfile(os.path.join(source_tree_root, path), - os.path.join(source_tree_root, path + '.orig')) + try: + # Create a backup copy for --undo. + shutil.copyfile(os.path.join(source_tree_root, path), + os.path.join(source_tree_root, path + '.orig')) + except IOError: + # This exception may happen when the target directory does not exist, + # which is the case when we skip fetching the third_party library due to unexpected + # termination. To proceed even in such case, let's create directory forcibly + # to have the configuration file copied. + target_dir = os.path.dirname(os.path.join(source_tree_root, path)) + if not os.path.isdir(target_dir): + try: + os.makedirs(target_dir) + except OSError, e: + if e.errno != errno.EEXIST: + raise # Copy the GN file from directory of this script to target path. - shutil.copyfile(os.path.join(my_dirname, '%s.gn' % lib), - os.path.join(source_tree_root, path)) + src = os.path.join(my_dirname, '%s.gn' % lib) + dst = os.path.join(source_tree_root, path) + print('** use system %s library **' % lib) + print(' From %s\n To %s' % (src, dst)) + shutil.copyfile(src, dst) + src = os.path.join(my_dirname, '%s' % lib) + # Copy the additional configuration files from directory of this script to target path. + if os.path.isdir(src): + dst = os.path.join(source_tree_root, 'third_party') + os.system("cp -rf " + src + " " + dst) + print(' From %s\n To %s' % (src, dst)) unhandled_libraries = set(args.system_libraries) - handled_libraries if unhandled_libraries: diff --git a/tizen_src/packaging/chromium-efl-libs.manifest b/packaging/chromium-efl-libs.manifest similarity index 100% rename from tizen_src/packaging/chromium-efl-libs.manifest rename to packaging/chromium-efl-libs.manifest diff --git a/tizen_src/packaging/chromium-efl-libs.spec b/packaging/chromium-efl-libs.spec similarity index 100% rename from tizen_src/packaging/chromium-efl-libs.spec rename to packaging/chromium-efl-libs.spec diff --git a/tizen_src/packaging/chromium-efl.manifest b/packaging/chromium-efl.manifest similarity index 100% rename from tizen_src/packaging/chromium-efl.manifest rename to packaging/chromium-efl.manifest diff --git a/tizen_src/packaging/chromium-efl.spec b/packaging/chromium-efl.spec similarity index 96% rename from tizen_src/packaging/chromium-efl.spec rename to packaging/chromium-efl.spec index a64108c..25148f0 100644 --- a/tizen_src/packaging/chromium-efl.spec +++ b/packaging/chromium-efl.spec @@ -270,10 +270,6 @@ Chromium EFL unit test utilities %setup -q %build - -tizen_src/build/apply_patches.sh -trap 'tizen_src/build/apply_patches.sh -r' EXIT - # architecture related configuration + neon temporary workaround %if %{?_skip_ninja:0}%{!?_skip_ninja:1} %ifarch %{arm} aarch64 @@ -305,14 +301,11 @@ trap 'tizen_src/build/apply_patches.sh -r' EXIT # The variable chromium-efl_tizen_version and _repository are essentially needed for build. # Therefore, if the variable is not defined, it explicitly raises exception here. %define OUTPUT_BASE_FOLDER out.tz_v%{chromium_efl_tizen_version}.%{OUTPUT_BUILD_PROFILE_TARGET}.%{_repository} -export GYP_GENERATOR_OUTPUT=$PWD/%{OUTPUT_BASE_FOLDER} + +export GN_GENERATOR_OUTPUT=$PWD/%{OUTPUT_BASE_FOLDER} #set build mode -%if 0%{?_debug_mode} - %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Debug -%else - %global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER}/Release -%endif +%global OUTPUT_FOLDER %{OUTPUT_BASE_FOLDER} %global XWALK_GEN %{OUTPUT_FOLDER}/xwalk_gen if type ccache &> /dev/null; then @@ -329,25 +322,26 @@ fi cp -a LICENSE "%{XWALK_GEN}"/LICENSE.chromium %endif -#gyp generate -%if %{?_skip_gyp:0}%{!?_skip_gyp:1} -#run standard gyp_chromiumefl wrapper - ./tizen_src/build/gyp_chromiumefl.sh \ - -Dexe_dir="%{CHROMIUM_EXE_DIR}" \ - -Ddata_dir="%{CHROMIUM_DATA_DIR}" \ - -Dedje_dir="%{CHROMIUM_DATA_DIR}"/themes \ - -Dlocale_dir="%{CHROMIUM_LOCALE_DIR}" \ +#gn generate +#run standard gn_chromiumefl wrapper + ./tizen_src/build/gn_chromiumefl.sh \ + "building_for_tizen_%{OUTPUT_BUILD_PROFILE_TARGET}=true" \ + "data_dir=\"%{CHROMIUM_DATA_DIR}\"" \ + "edje_dir=\"%{CHROMIUM_DATA_DIR}/themes\"" \ + "exe_dir=\"%{CHROMIUM_EXE_DIR}\"" \ + "locale_dir=\"%{CHROMIUM_LOCALE_DIR}\"" \ + "tizen_%{OUTPUT_BUILD_PROFILE_TARGET}=true" \ %if 0%{?_remove_webcore_debug_symbols:1} - -Dremove_webcore_debug_symbols=1 \ + "remove_webcore_debug_symbols=true" \ %endif %if 0%{?chromium_efl_tizen_version:1} - -Dchromium_efl_tizen_version=%{chromium_efl_tizen_version} \ + "chromium_efl_tizen_version=%{gn_chromium_efl_tizen_version}" \ %endif %if "%{?_with_wayland}" == "1" - -Duse_wayland=1 \ + "use_wayland=true" \ %endif %if "%{?_repository}" == "emulator" || "%{?_repository}" == "emulator32-x11" - -Dtizen_emulator_support=1 \ + "tizen_emulator_support=true" \ %endif %if 0%{?build_xwalk} --xwalk \ diff --git a/tizen_src/packaging/chromium-efl_v3.0.manifest b/packaging/chromium-efl_v3.0.manifest similarity index 100% rename from tizen_src/packaging/chromium-efl_v3.0.manifest rename to packaging/chromium-efl_v3.0.manifest diff --git a/tizen_src/packaging/chromium-ewktest.manifest b/packaging/chromium-ewktest.manifest similarity index 100% rename from tizen_src/packaging/chromium-ewktest.manifest rename to packaging/chromium-ewktest.manifest diff --git a/tizen_src/packaging/content_shell.in b/packaging/content_shell.in similarity index 100% rename from tizen_src/packaging/content_shell.in rename to packaging/content_shell.in diff --git a/tizen_src/packaging/crosswalk-bin.spec b/packaging/crosswalk-bin.spec similarity index 100% rename from tizen_src/packaging/crosswalk-bin.spec rename to packaging/crosswalk-bin.spec diff --git a/tizen_src/packaging/manifest.xml b/packaging/manifest.xml similarity index 100% rename from tizen_src/packaging/manifest.xml rename to packaging/manifest.xml diff --git a/tizen_src/packaging/print-chromium-deps.py b/packaging/print-chromium-deps.py similarity index 100% rename from tizen_src/packaging/print-chromium-deps.py rename to packaging/print-chromium-deps.py diff --git a/tizen_src/build/apply_patches.sh b/tizen_src/build/apply_patches.sh deleted file mode 100755 index 002e8e9..0000000 --- a/tizen_src/build/apply_patches.sh +++ /dev/null @@ -1,41 +0,0 @@ -. $(dirname $0)/common.sh - -function silentApply() { - PATCH=$(readlink -f $1) - patch -d ${CHROME_SRC} --forward --reject-file=- -p1 -i $PATCH >/dev/null - if [ "$?" -gt 0 ]; then - >&2 echo "failed applying $1" - fi -} - -function silentDeapply() { - PATCH=$(readlink -f $1) - pushd ${CHROME_SRC} > /dev/null - patch --forward --reject-file=- -p1 --dry-run -i $PATCH >/dev/null - RET=$? - if [ "$RET" -gt 1 ]; then - >&2 echo "failed deapplying $1" - elif [ "$RET" == "1" ]; then - # exit status 1 means it's already applied so we revert - patch -p1 -R --reject-file=- -i $PATCH >/dev/null - fi - popd > /dev/null -} - -echo "$@" | grep -q "\-r" && REVERSE=1 -echo "$@" | grep -q "\-\-crosswalk-bin" && CROSSWALK_BIN=1 - -patchdir=${TOPDIR}/tizen_src/build/patches -patchset=$patchdir/*.diff - -if [ "$CROSSWALK_BIN" == "1" ]; then - patchset+=" $patchdir/crosswalk/*.diff" -fi - -for patch in $patchset ; do - if [ -z "$REVERSE" ]; then - silentApply $patch - else - silentDeapply $patch - fi -done diff --git a/tizen_src/build/build_desktop.sh b/tizen_src/build/build_desktop.sh index 1e9463f..3ae7e8d 100755 --- a/tizen_src/build/build_desktop.sh +++ b/tizen_src/build/build_desktop.sh @@ -10,17 +10,10 @@ host_arch=$(getHostArch) parseHostBuildScriptParams desktop $@ JHBUILD_STAMPFILE="" -if [ "$USE_GN" ]; then - if [ -z "$GN_GENERATOR_OUTPUT" ]; then - export GN_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" - fi - JHBUILD_STAMPFILE="${GN_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" -else - if [ -z "$GYP_GENERATOR_OUTPUT" ]; then - export GYP_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" - fi - JHBUILD_STAMPFILE="${GYP_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" +if [ -z "$GN_GENERATOR_OUTPUT" ]; then + export GN_GENERATOR_OUTPUT=${TOPDIR}/"out.${host_arch}" fi +JHBUILD_STAMPFILE="${GN_GENERATOR_OUTPUT}/Dependencies/Root/jhbuild.stamp" forceJHBuildIfNeeded() { if [[ $FORCE_JHBUILD == 1 ]]; then @@ -37,11 +30,7 @@ forceJHBuildIfNeeded() { forceJHBuildIfNeeded JHBUILD_DEPS="" -if [ "$USE_GN" ]; then - JHBUILD_DEPS="${GN_GENERATOR_OUTPUT}/Dependencies/Root" -else - JHBUILD_DEPS="${GYP_GENERATOR_OUTPUT}/Dependencies/Root" -fi +JHBUILD_DEPS="${GN_GENERATOR_OUTPUT}/Dependencies/Root" if [ "${host_arch}" == "x64" ]; then _LIBDIR=lib64 elif [ "${host_arch}" == "ia32" ]; then @@ -57,13 +46,7 @@ if [ ! -f "$JHBUILD_STAMPFILE" ]; then fi fi -${SCRIPTDIR}/apply_patches.sh ${SCRIPTDIR}/patches - -if [ "$USE_GN" ]; then - export __GN_CHROMIUMEFL_TARGET=desktop -else - export __GYP_CHROMIUMEFL_TARGET=desktop -fi +export __GN_CHROMIUMEFL_TARGET=desktop #export BUILD_DEPENDENCIES_LIB_PATH="${JHBUILD_DEPS}/${_LIBDIR}" #export BUILD_DEPENDENCIES_INCLUDE_PATH="${JHBUILD_DEPS}/include" @@ -75,17 +58,11 @@ fi #done #deps_include_path="$deps_include_path\"" -if [ "$USE_GN" ]; then - #hostGnChromiumEfl "deps_include_path=$deps_include_path deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" - hostGnChromiumEfl "deps_include_path=\"${JHBUILD_DEPS}/include\" deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" +#hostGnChromiumEfl "deps_include_path=$deps_include_path deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" +hostGnChromiumEfl "deps_include_path=\"${JHBUILD_DEPS}/include\" deps_lib_path=\"${JHBUILD_DEPS}/${_LIBDIR}\"" # deps_efl_pc_path=\"${JHBUILD_DEPS}/Source/efl-1.16.0/pc\" -else - hostGypChromiumEfl -fi export LD_LIBRARY_PATH="${JHBUILD_DEPS}/${_LIBDIR}:$LD_LIBRARY_PATH" export PATH="${JHBUILD_DEPS}/bin:$PATH" hostNinja desktop - -${SCRIPTDIR}/apply_patches.sh -r ${SCRIPTDIR}/patches diff --git a/tizen_src/build/common.sh b/tizen_src/build/common.sh index 1f029d4..22f66a6 100755 --- a/tizen_src/build/common.sh +++ b/tizen_src/build/common.sh @@ -78,9 +78,6 @@ function parseHostBuildScriptParams() { --skip-gyp) export SKIP_GYP=1 ;; - --use-gn) - export USE_GN=1 - ;; --skip-gn) export SKIP_GN=1 ;; @@ -177,12 +174,8 @@ function hostNinja() { if [[ $BUILD_CHROMEDRIVER == 1 ]]; then TARGETS="$TARGETS chromedriver" fi - if [ "$USE_GN" ]; then - export BUILD_SUBDIRECTORY="" - BUILDDIR=${GN_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} - else - BUILDDIR=${GYP_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} - fi + export BUILD_SUBDIRECTORY="" + BUILDDIR=${GN_GENERATOR_OUTPUT}/${BUILD_SUBDIRECTORY} ninja -C $BUILDDIR ${JOBS} ${TARGETS} fi } @@ -278,11 +271,6 @@ function setupAndExecuteTargetBuild() { count=$(( $count + 1 )) ARGS[$count]="_skip_gyp 1" ;; - --use-gn) - ARGS[$count]=--define - count=$(( $count + 1 )) - ARGS[$count]="_use_gn 1" - ;; --skip-gn) ARGS[$count]=--define count=$(( $count + 1 )) diff --git a/tizen_src/build/cross_build_mobile.sh b/tizen_src/build/cross_build_mobile.sh index 6e1a448..a19ba14 100755 --- a/tizen_src/build/cross_build_mobile.sh +++ b/tizen_src/build/cross_build_mobile.sh @@ -20,12 +20,10 @@ function rollbackGbsSysrootChanges() { function preBuild() { adaptGbsSysrootToCrossCompilation $1 - ${SCRIPTDIR}/apply_patches.sh } function postBuild() { rollbackGbsSysrootChanges $1 - ${SCRIPTDIR}/apply_patches.sh -r } if [ -z "$GYP_GENERATOR_OUTPUT" ]; then diff --git a/tizen_src/build/cross_build_tv.sh b/tizen_src/build/cross_build_tv.sh index b7e34f0..0246cd4 100755 --- a/tizen_src/build/cross_build_tv.sh +++ b/tizen_src/build/cross_build_tv.sh @@ -20,12 +20,10 @@ function rollbackGbsSysrootChanges() { function preBuild() { adaptGbsSysrootToCrossCompilation $1 - ${SCRIPTDIR}/apply_patches.sh } function postBuild() { rollbackGbsSysrootChanges $1 - ${SCRIPTDIR}/apply_patches.sh -r } if [ -z "$GYP_GENERATOR_OUTPUT" ]; then diff --git a/tizen_src/build/gn_chromiumefl b/tizen_src/build/gn_chromiumefl index 52d6101..e2e47ee 100755 --- a/tizen_src/build/gn_chromiumefl +++ b/tizen_src/build/gn_chromiumefl @@ -125,9 +125,6 @@ if __name__ == '__main__': args[arg] += " gcc_version=49" # It should be in condition for arm target - args.append("--defines=USE_EFL") - args.append("-v") - buildtools_path = os.environ.get('CHROMIUM_BUILDTOOLS_PATH') host_arch = os.environ.get('HOST_ARCH') if not buildtools_path: diff --git a/tizen_src/build/gn_chromiumefl.sh b/tizen_src/build/gn_chromiumefl.sh index 03d27b3..11f95c4 100755 --- a/tizen_src/build/gn_chromiumefl.sh +++ b/tizen_src/build/gn_chromiumefl.sh @@ -201,39 +201,6 @@ add_gbs_flags() { # it is used for gbs and added target_cpu also. ADDITIONAL_GN_PARAMETERS+="target_cpu=\"${host_arch}\" " - # sysroot="" - #" - #no-parallel=true - #" - # TODO(b.kelemen): ideally crosscompile should also support system libs. - # Unfortunately the gbs root doesn't contain everything chromium needs. -# SYSTEM_DEPS="-Duse_system_expat=true -# -Duse_system_libjpeg=false -# -Duse_system_libpng=true -# -Duse_system_libusb=true -# -Duse_system_libxml=true -# -Duse_system_libxslt=true -# -Duse_system_re2=true -# -Duse_system_zlib=true -# " - SYSTEM_DEPS="" #"--system-libraries - #libxml - #" - - # [M50_2661] Temporary using the icu of internal chformium instead of system. - # The icu of system doesn't support utrie2.h - # FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-967 -# SYSTEM_DEPS+="-Duse_system_icu=false -# " - - if [ "$target" == "mobile" ]; then -# SYSTEM_DEPS+="-Duse_system_bzip2=true -# -Duse_system_libexif=true -# -Duse_system_nspr=true -# " - SYSTEM_DEPS+=" - " - fi } add_cross_flags() { @@ -264,10 +231,12 @@ else add_cross_flags fi fi - if [ "$SYSTEM_DEPS" != "" ]; then - #replacing original files with correct ones according to $SYSTEM_DEPS - $TOPDIR/build/linux/unbundle/replace_gn_files.py $SYSTEM_DEPS - fi +fi + +if [ "$SYSTEM_DEPS" != "" ]; then + echo "** use system lib : replace **" + #replacing original files with correct ones according to $SYSTEM_DEPS + $TOPDIR/build/linux/unbundle/replace_gn_files.py $SYSTEM_DEPS fi _GN_ARGS=" @@ -285,6 +254,9 @@ printf "GN_ARGUMENTS:\n" for arg in $_GN_ARGS; do printf " * ${arg##-D}\n" done +for arg in $SYSTEM_DEPS; do + printf " * ${arg##-D}\n" +done if [ -f "${TOPDIR}/BUILD_.gn" ]; then rm "${TOPDIR}/BUILD.gn" @@ -301,6 +273,7 @@ ret=$? mv ${TOPDIR}/BUILD_.gn ${TOPDIR}/BUILD.gn if [ "$SYSTEM_DEPS" != "" ]; then + echo "** use system lib : undo **" # Restore gn files to their original states not to mess up the tree permanently. $TOPDIR/build/linux/unbundle/replace_gn_files.py --undo $SYSTEM_DEPS fi diff --git a/tizen_src/build/jhbuild/jhbuild.modules b/tizen_src/build/jhbuild/jhbuild.modules index 6fb88ef..d30a2ab 100755 --- a/tizen_src/build/jhbuild/jhbuild.modules +++ b/tizen_src/build/jhbuild/jhbuild.modules @@ -27,18 +27,56 @@ + href="http://sourceware.org"/> + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + hash="sha256:c13540bad764d014fea2c079fad8fcca62e5c229994d43aa4eb692d2c9b73afe" + md5sum="c7cf8478edff3f1342e5f664b347c13c"> @@ -46,11 +84,11 @@ - + + hash="sha256:6a6a5883939eab8d87179c7980c0dbd6b53d82bf460a161045a891694d036b2b" + md5sum="5d25c429e34da44e6b4ba27cd91ade4d"> diff --git a/tizen_src/build/jhbuild/jhbuildrc b/tizen_src/build/jhbuild/jhbuildrc index 8a90c1b..337f39f 100644 --- a/tizen_src/build/jhbuild/jhbuildrc +++ b/tizen_src/build/jhbuild/jhbuildrc @@ -30,10 +30,7 @@ moduleset = [ __moduleset_file_uri, ] __extra_modules = os.environ.get("WEBKIT_EXTRA_MODULES", "").split(",") modules = [ 'chromeefl-dependencies', ] -if os.environ['USE_GN']: - outdir = os.environ.get('GN_GENERATOR_OUTPUT', 'out') -else: - outdir = os.environ.get('GYP_GENERATOR_OUTPUT', 'out') +outdir = os.environ.get('GN_GENERATOR_OUTPUT', 'out') checkoutroot = os.path.abspath(os.path.join(outdir,'Dependencies', 'Source')) prefix = os.path.abspath(os.path.join(outdir,'Dependencies', 'Root')) diff --git a/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff b/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff deleted file mode 100644 index 7f9e74d..0000000 --- a/tizen_src/build/patches/crosswalk/crosswalk-do-not-build-several-chromium-dependencies.diff +++ /dev/null @@ -1,919 +0,0 @@ -Author: Raphael Kubo da Costa - -This patch is part of a hack to allow us to split Crosswalk into two separate -packages, crosswalk-libs (with Chromium shared libraries and all dependencies -required by Crosswalk itself) and crosswalk-bin (with the Crosswalk binaries). - -If passes "--define build_libs 0" to the spec file, crosswalk-libs will not be -built and we assume it is already installed. This patch is then applied to the -source tree to make big targets that used to consume a lot of time and CPU by -generating and building a lot of files do nothing but pass "-l" to -the linker. In other words, we cheat the build system into thinking those -targets do not need to build anything. - -Not all targets can be converted like this, and keeping the patch up-to-date -across Chromium releases requires manual intervention. Some rules of thumb: - -* Only targets whose original type is '<(component)' or 'shared_library' can be - converted like this. 'static_library' targets are expected to remain static - (technically it is possible to convert them, but then the hack gets even - bigger and there is no guarantee that a certain target is expected to work as - a shared library in the first place). If they are part of a shared library we - have converted they will not need to be built at all, and if a target in - Crosswalk itself requires them the static library will need to exist anyway. - -* 'direct_dependent_settings' need to be maintained, as targets that depend on - a converted one still need include paths and other things specified there. - -* 'export_depent_settings' and 'all_dependent_settings' need to be preserved - for the same reason: a target that depends on the converted one may still - need other libraries that it does not depend on directly. Consequently, this - means that a certain amount of targets in 'dependencies' also need to be - kept, since a target must be in the 'dependencies' list to be in - '*_dependent_settings'. - -* 'actions' need to be removed from the original target, as otherwise there is - more than one target that generates the same files. - -* Some target dependencies may be needed even if they are not in one of the - '*_dependent_settings' lists. For example, targets that generate code, like - the mojo ones. - -* Some gyp files are trickier than others. contents.gyp and skia.gyp, for - example, get a lot of additional settings from the .gypi files that they - include. This all needs to be carefully examined when updating the patch. - -The best way to make sure the patch still works with a newer Chromium release -is to call `gbs build' with `--define build_bin 0' first so that only -crosswalk-libs is generated, then install/upgrade that package and finally call -`gbs build' with `--define build_libs 0' to build only crosswalk-bin. In the -best case, everything still builds and the total number of targets is still -similar to the previous count. If that is not the case, you need to check which -Crosswalk targets have started depending on others from Chromium and, if -possible, convert some of them. - -BUG=XWALK-2571 ---- src/base/base.gyp -+++ src/base/base.gyp -@@ -13,6 +13,74 @@ - 'targets': [ - { - 'target_name': 'base', -+ 'type': 'none', -+ 'toolsets': ['host', 'target'], -+ 'link_settings': { -+ 'libraries': [ -+ '-lbase', -+ ], -+ }, -+ # TODO(gregoryd): direct_dependent_settings should be shared with the -+ # 64-bit target, but it doesn't work due to a bug in gyp -+ 'direct_dependent_settings': { -+ 'include_dirs': [ -+ '..', -+ ], -+ }, -+ 'conditions': [ -+ ['use_glib==1 or <(use_ozone)==1', { -+ 'dependencies': [ -+ '../build/linux/system.gyp:glib', -+ ], -+ 'export_dependent_settings': [ -+ '../build/linux/system.gyp:glib', -+ ], -+ }], -+ ['OS == "linux"', { -+ 'link_settings': { -+ 'libraries': [ -+ # We need rt for clock_gettime(). -+ '-lrt', -+ # For 'native_library_linux.cc' -+ '-ldl', -+ ], -+ }, -+ }], -+ ], -+ }, -+ { -+ 'target_name': 'base_i18n', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lbase_i18n', -+ ], -+ }, -+ 'dependencies': [ -+ 'base', -+ ], -+ 'export_dependent_settings': [ -+ 'base', -+ ], -+ }, -+ { -+ 'target_name': 'base_prefs', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lbase_prefs', -+ ], -+ }, -+ 'dependencies': [ -+ 'base', -+ ], -+ 'export_dependent_settings': [ -+ 'base', -+ ], -+ }, -+ -+ { -+ 'target_name': 'base_original', - 'type': '<(component)', - 'toolsets': ['host', 'target'], - 'variables': { -@@ -256,7 +323,7 @@ - ], - }, - { -- 'target_name': 'base_i18n', -+ 'target_name': 'base_i18n_original', - 'type': '<(component)', - 'variables': { - 'enable_wexit_time_destructors': 1, -@@ -308,7 +375,7 @@ - ], - }, - { -- 'target_name': 'base_prefs', -+ 'target_name': 'base_prefs_original', - 'type': '<(component)', - 'variables': { - 'enable_wexit_time_destructors': 1, ---- src/cc/cc.gyp -+++ src/cc/cc.gyp -@@ -10,6 +10,21 @@ - { - # GN version: //cc - 'target_name': 'cc', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lcc', -+ ], -+ }, -+ # Include src/gpu for gl2chromium.h. -+ 'dependencies': [ -+ '../third_party/khronos/khronos.gyp:khronos_headers', -+ ], -+ }, -+ -+ { -+ # GN version: //cc -+ 'target_name': 'cc_original', - 'type': '<(component)', - 'dependencies': [ - '<(DEPTH)/base/base.gyp:base', ---- src/content/content.gyp -+++ src/content/content.gyp -@@ -21,6 +21,69 @@ - }], - ], - }, -+ -+ 'targets': [ -+ { -+ # GN version: //content -+ 'target_name': 'content', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lcontent', -+ ], -+ }, -+ -+ 'dependencies': [ -+ '../ui/accessibility/accessibility.gyp:ax_gen', -+ '../third_party/blink/public/blink_headers.gyp:blink_headers', -+ '../skia/skia.gyp:skia', -+ -+ '../device/battery/battery.gyp:device_battery_mojo_bindings', -+ '../device/vibration/vibration.gyp:device_vibration_mojo_bindings', -+ '../mojo/mojo_base.gyp:mojo_application_bindings', -+ '../mojo/mojo_base.gyp:mojo_environment_chromium', -+ '../third_party/mojo/mojo_edk.gyp:mojo_system_impl', -+ '../third_party/mojo/mojo_public.gyp:mojo_cpp_bindings', -+ 'content_common_mojo_bindings.gyp:content_common_mojo_bindings', -+ ], -+ 'export_dependent_settings': [ -+ '../ui/accessibility/accessibility.gyp:ax_gen', -+ # The public content API headers directly include Blink API headers, so we -+ # have to export the blink header settings so that relative paths in these -+ # headers resolve correctly. -+ '../third_party/blink/public/blink_headers.gyp:blink_headers', -+ # The public render_widget_host.h needs to re-export skia defines. -+ '../skia/skia.gyp:skia', -+ 'content_common_mojo_bindings.gyp:content_common_mojo_bindings', -+ ], -+ -+ 'actions': [ -+ { -+ 'action_name': 'generate_webkit_version', -+ 'inputs': [ -+ '<(script)', -+ '<(lastchange)', -+ '<(template)', -+ ], -+ 'outputs': [ -+ '<(SHARED_INTERMEDIATE_DIR)/webkit_version.h', -+ ], -+ 'action': ['python', -+ '<(script)', -+ '-f', '<(lastchange)', -+ '<(template)', -+ '<@(_outputs)', -+ ], -+ 'variables': { -+ 'script': '<(DEPTH)/build/util/version.py', -+ 'lastchange': '<(DEPTH)/build/util/LASTCHANGE.blink', -+ 'template': 'webkit_version.h.in', -+ }, -+ }, -+ ], -+ }, -+ ], -+ - 'conditions': [ - ['OS != "ios"', { - 'includes': [ -@@ -291,7 +349,7 @@ - 'targets': [ - { - # GN version: //content -- 'target_name': 'content', -+ 'target_name': 'content_original', - 'type': 'shared_library', - 'variables': { 'enable_wexit_time_destructors': 1, }, - 'dependencies': [ ---- src/content/content_common.gypi -+++ src/content/content_common.gypi -@@ -569,30 +569,6 @@ - '../ui/gl/gl.gyp:gl', - '../webkit/common/gpu/webkit_gpu.gyp:webkit_gpu', - ], -- 'actions': [ -- { -- 'action_name': 'generate_webkit_version', -- 'inputs': [ -- '<(script)', -- '<(lastchange)', -- '<(template)', -- ], -- 'outputs': [ -- '<(SHARED_INTERMEDIATE_DIR)/webkit_version.h', -- ], -- 'action': ['python', -- '<(script)', -- '-f', '<(lastchange)', -- '<(template)', -- '<@(_outputs)', -- ], -- 'variables': { -- 'script': '<(DEPTH)/build/util/version.py', -- 'lastchange': '<(DEPTH)/build/util/LASTCHANGE.blink', -- 'template': 'webkit_version.h.in', -- }, -- }, -- ], - }], - ['OS=="mac"', { - 'dependencies': [ ---- src/gpu/gpu.gyp -+++ src/gpu/gpu.gyp -@@ -11,6 +11,17 @@ - ], - 'targets': [ - { -+ # GN version: //gpu -+ 'target_name': 'gpu', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lgpu', -+ ], -+ }, -+ }, -+ -+ { - # Library emulates GLES2 using command_buffers. - # GN version: //gpu/command_buffer/client:gles2_implementation - 'target_name': 'gles2_implementation', -@@ -522,7 +533,7 @@ - }, - { - # GN version: //gpu -- 'target_name': 'gpu', -+ 'target_name': 'gpu_original', - 'type': 'shared_library', - 'includes': [ - 'command_buffer_client.gypi', ---- src/media/media.gyp -+++ src/media/media.gyp -@@ -49,6 +49,22 @@ - { - # GN version: //media - 'target_name': 'media', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lmedia', -+ ], -+ }, -+ 'direct_dependent_settings': { -+ 'include_dirs': [ -+ '..', -+ ], -+ }, -+ }, -+ -+ { -+ # GN version: //media -+ 'target_name': 'media_original', - 'type': '<(component)', - 'dependencies': [ - '../base/base.gyp:base', ---- src/third_party/mojo/mojo_edk.gyp -+++ src/third_party/mojo/mojo_edk.gyp -@@ -10,6 +10,21 @@ - { - # GN version: //mojo/edk/system - 'target_name': 'mojo_system_impl', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lmojo_system_impl', -+ ], -+ }, -+ 'all_dependent_settings': { -+ # Ensures that dependent projects import the core functions on Windows. -+ 'defines': ['MOJO_USE_SYSTEM_IMPL'], -+ }, -+ }, -+ -+ { -+ # GN version: //mojo/edk/system -+ 'target_name': 'mojo_system_original', - 'type': '<(component)', - 'dependencies': [ - '../base/base.gyp:base', ---- src/net/net.gyp -+++ src/net/net.gyp -@@ -104,6 +104,41 @@ - }, - { - 'target_name': 'net', -+ 'type': 'none', -+ 'link_settings': { -+ 'libraries': [ -+ '-lnet', -+ ], -+ }, -+ 'dependencies': [ -+ '../base/base.gyp:base', -+ ], -+ 'export_dependent_settings': [ -+ '../base/base.gyp:base', -+ ], -+ 'conditions': [ -+ ['use_kerberos==1', { -+ 'conditions': [ -+ ['linux_link_kerberos==1', { -+ 'link_settings': { -+ 'ldflags': [ -+ '= 7 && arm_use_neon) { -+} else if ((current_cpu == "arm" || is_tizen) && arm_version >= 7 && arm_use_neon) { - ffmpeg_arch = "arm-neon" -+} else if (is_tizen) { -+ ffmpeg_arch = "arm" - } else { - ffmpeg_arch = current_cpu - } -@@ -61,6 +63,6 @@ os_config = current_os - if ((is_linux || is_chromeos) && is_msan) { - os_config = "linux-noasm" - disable_ffmpeg_asm = true --} else if (is_chromeos) { -+} else if (is_chromeos || is_tizen) { - os_config = "linux" - } diff --git a/tizen_src/build/patches/hotfix_enable_content_shell.diff b/tizen_src/build/patches/hotfix_enable_content_shell.diff deleted file mode 100644 index 16b5a6f..0000000 --- a/tizen_src/build/patches/hotfix_enable_content_shell.diff +++ /dev/null @@ -1,41 +0,0 @@ -diff --git a/third_party/mesa/src/chromium_gensrc/mesa/glcpp-parse.c b/third_party/mesa/src/chromium_gensrc/mesa/glcpp-parse.c -index 40ff9ff..c641ab0 100644 ---- a/third_party/mesa/src/chromium_gensrc/mesa/glcpp-parse.c -+++ b/third_party/mesa/src/chromium_gensrc/mesa/glcpp-parse.c -@@ -4005,12 +4005,12 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser, - * unexpanded token. */ - char *str; - token_list_t *expansion; -- token_t *final; -+ token_t *final_token; - - str = ralloc_strdup (parser, token->value.str); -- final = _token_create_str (parser, OTHER, str); -+ final_token = _token_create_str (parser, OTHER, str); - expansion = _token_list_create (parser); -- _token_list_append (expansion, final); -+ _token_list_append (expansion, final_token); - *last = node; - return expansion; - } -diff --git a/third_party/mesa/src/src/glsl/glcpp/glcpp-parse.y b/third_party/mesa/src/src/glsl/glcpp/glcpp-parse.y -index 8025c06..a19dc15 100644 ---- a/third_party/mesa/src/src/glsl/glcpp/glcpp-parse.y -+++ b/third_party/mesa/src/src/glsl/glcpp/glcpp-parse.y -@@ -1538,12 +1538,12 @@ _glcpp_parser_expand_node (glcpp_parser_t *parser, - * unexpanded token. */ - char *str; - token_list_t *expansion; -- token_t *final; -+ token_t *final_token; - - str = ralloc_strdup (parser, token->value.str); -- final = _token_create_str (parser, OTHER, str); -+ final_token = _token_create_str (parser, OTHER, str); - expansion = _token_list_create (parser); -- _token_list_append (expansion, final); -+ _token_list_append (expansion, final_token); - *last = node; - return expansion; - } - diff --git a/tizen_src/build/patches/hotfix_m53_2785_include_py.diff b/tizen_src/build/patches/hotfix_m53_2785_include_py.diff deleted file mode 100644 index 3c4eaea..0000000 --- a/tizen_src/build/patches/hotfix_m53_2785_include_py.diff +++ /dev/null @@ -1,22 +0,0 @@ -diff --git a/tools/grit/grit/node/include.py b/tools/grit/grit/node/include.py -index 4bad785..94e5e7a 100755 ---- a/tools/grit/grit/node/include.py -+++ b/tools/grit/grit/node/include.py -@@ -100,10 +100,13 @@ class IncludeNode(base.Node): - # We only use rsyncable compression on Linux. - # We exclude ChromeOS since ChromeOS bots are Linux based but do not have - # the --rsyncable option built in for gzip. See crbug.com/617950. -- if sys.platform == 'linux2' and 'chromeos' not in self.GetRoot().defines: -- data = grit.format.gzip_string.GzipStringRsyncable(data) -- else: -- data = grit.format.gzip_string.GzipString(data) -+# [M53_2785] We cannot use the rsyncable compression since 'chromium-efl' do not -+# have the --rsyncable option built in for gzip. -+# FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2059 -+# if sys.platform == 'linux2' and 'chromeos' not in self.GetRoot().defines: -+# data = grit.format.gzip_string.GzipStringRsyncable(data) -+# else: -+ data = grit.format.gzip_string.GzipString(data) - data = self.RESERVED_HEADER[0] + data - elif data[:3] == self.RESERVED_HEADER: - # We are reserving these 3 bytes as the header for gzipped files in the diff --git a/tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff b/tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff deleted file mode 100644 index ac81acd..0000000 --- a/tizen_src/build/patches/hotfix_m53_2785_render_view_impl.diff +++ /dev/null @@ -1,35 +0,0 @@ -diff --git a/content/renderer/render_view_impl.cc b/content/renderer/render_view_impl.cc -index 140e2fc..426bd43 100644 ---- a/content/renderer/render_view_impl.cc -+++ b/content/renderer/render_view_impl.cc -@@ -208,6 +208,7 @@ - #endif - - #if defined(USE_EFL) -+#include "content/renderer/android/disambiguation_popup_helper.h" - #include "content/renderer/android/email_detector.h" - #include "content/renderer/android/phone_number_detector.h" - #include "ui/gfx/device_display_info_efl.h" -@@ -3272,6 +3273,12 @@ bool RenderViewImpl::didTapMultipleTargets( - // The touch_rect, target_rects and zoom_rect are in the outer viewport - // reference frame. - gfx::Rect zoom_rect; -+#if !defined(EWK_BRINGUP) -+// [M53_2785] The path of "DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor" -+// is changed to "content/renderer/android/disambiguation_popup_helper.h" -+// from "content/renderer/disambiguation_popup_helper.h". -+// It will be fixed by webview team. -+// FIXME: http://suprem.sec.samsung.net/jira/browse/TWF-2057 - float new_total_scale = - #if defined(S_TERRACE_SUPPORT) - DisambiguationPopupHelper::ComputeZoomAreaAndScaleFactor( -@@ -3285,6 +3292,9 @@ bool RenderViewImpl::didTapMultipleTargets( - gfx::Rect(webview()->mainFrame()->visibleContentRect()).size(), - device_scale_factor_ * webview()->pageScaleFactor(), &zoom_rect); - #endif -+#else -+ float new_total_scale; -+#endif // EWK_BRINGUP - if (!new_total_scale || zoom_rect.IsEmpty()) - return false; - diff --git a/tizen_src/build/patches/info.txt b/tizen_src/build/patches/info.txt deleted file mode 100644 index cf2416d..0000000 --- a/tizen_src/build/patches/info.txt +++ /dev/null @@ -1,4 +0,0 @@ -webrtc.diff - double slash (//) in include path leads to rpm error, fixed by patch - See: http://107.108.218.239/bugzilla/show_bug.cgi?id=6458 - TODO(b.kelemen): upstream -- 2.7.4 From 7e3c96086836384de2822d50db644d4db46406a4 Mon Sep 17 00:00:00 2001 From: Arnaud Renevier Date: Fri, 15 May 2015 12:02:40 -0700 Subject: [PATCH 12/16] [M67 Dev][EFL] Define WebCursor::GetPlatformCursor for efl It will be necessary to define WebCursor::GetPlatformCursor in order to build ozone. Reference: 6bf5529a7a033a692f0ced0d25761f839114395c Change-Id: Ic681ccd587e0a5ea274b07ed0fa9283b2abd2e2e Signed-off-by: Arnaud Renevier Signed-off-by: Youngsoo Choi --- content/common/cursors/webcursor.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/content/common/cursors/webcursor.h b/content/common/cursors/webcursor.h index 485eef5..214cc27 100644 --- a/content/common/cursors/webcursor.h +++ b/content/common/cursors/webcursor.h @@ -15,7 +15,7 @@ #include "ui/gfx/geometry/size.h" #include "ui/gfx/native_widget_types.h" -#if defined(USE_AURA) +#if defined(USE_AURA) || defined(USE_EFL) #include "ui/base/cursor/cursor.h" #endif @@ -71,7 +71,7 @@ class CONTENT_EXPORT WebCursor { // Returns a native cursor representing the current WebCursor instance. gfx::NativeCursor GetNativeCursor(); -#if defined(USE_AURA) +#if defined(USE_AURA) || defined(USE_EFL) ui::PlatformCursor GetPlatformCursor(); // Updates |device_scale_factor_| and |rotation_| based on |display|. @@ -138,14 +138,14 @@ class CONTENT_EXPORT WebCursor { float custom_scale_; std::vector custom_data_; -#if defined(USE_AURA) && (defined(USE_X11) || defined(USE_OZONE)) +#if (defined(USE_AURA) || defined(USE_EFL)) && (defined(USE_X11) || defined(USE_OZONE)) // Only used for custom cursors. ui::PlatformCursor platform_cursor_; #elif defined(OS_WIN) // A custom cursor created from custom bitmap data by Webkit. HCURSOR custom_cursor_; #endif -#if defined(USE_AURA) +#if defined(USE_AURA) || defined(USE_EFL) float device_scale_factor_; #endif -- 2.7.4 From 0f6a1563313a523fdddc40b472d87a273c79ced7 Mon Sep 17 00:00:00 2001 From: Antonio Gomes Date: Tue, 7 Apr 2015 02:43:26 -0400 Subject: [PATCH 13/16] [M67 Dev][EFL] Allow chromium to use EFL instead of Aura This commit allows chromium code to use EFL as the main UI toolkit instead of Aura. The actual implementation of EFL port of chromium is done in an external module. This commit only exposes some of the needed generic code paths that are normally disabled for non Aura or MacOSX ports. Reference: 5e22fe4d0bb137a1b73530205f7cdc07a31643c9 Change-Id: I1f327fb9e31616879cf0448735f1adbe82e476bf Signed-off-by: Piotr Tworek Signed-off-by: Youngsoo Choi --- content/browser/browser_main_loop.cc | 4 ++-- content/renderer/render_widget.cc | 4 ++-- ui/base/clipboard/clipboard.h | 4 ++-- ui/gfx/native_widget_types.h | 12 +++++++++--- 4 files changed, 15 insertions(+), 9 deletions(-) diff --git a/content/browser/browser_main_loop.cc b/content/browser/browser_main_loop.cc index 7e20243..a2586ba 100644 --- a/content/browser/browser_main_loop.cc +++ b/content/browser/browser_main_loop.cc @@ -135,7 +135,7 @@ #include "ui/display/display_switches.h" #include "ui/gfx/switches.h" -#if defined(USE_AURA) || defined(OS_MACOSX) +#if defined(USE_AURA) || defined(OS_MACOSX) || defined(USE_EFL) #include "content/browser/compositor/image_transport_factory.h" #endif @@ -1054,7 +1054,7 @@ void BrowserMainLoop::ShutdownThreadsAndCleanUp() { BrowserCompositorMac::DisableRecyclingForShutdown(); #endif -#if defined(USE_AURA) || defined(OS_MACOSX) +#if defined(USE_AURA) || defined(OS_MACOSX) || defined(USE_EFL) { TRACE_EVENT0("shutdown", "BrowserMainLoop::Subsystem:ImageTransportFactory"); diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc index be18d40..889e1b4 100644 --- a/content/renderer/render_widget.cc +++ b/content/renderer/render_widget.cc @@ -2261,7 +2261,7 @@ void RenderWidget::OnImeEventGuardFinish(ImeEventGuard* guard) { // are ignored. These must explicitly be updated once finished handling the // ime event. UpdateSelectionBounds(); -#if defined(OS_ANDROID) +#if defined(OS_ANDROID) || defined(USE_EFL) if (guard->show_virtual_keyboard()) ShowVirtualKeyboard(); else @@ -2477,7 +2477,7 @@ blink::WebScreenInfo RenderWidget::GetScreenInfo() { void RenderWidget::DidHandleGestureEvent(const WebGestureEvent& event, bool event_cancelled) { -#if defined(OS_ANDROID) || defined(USE_AURA) +#if defined(OS_ANDROID) || defined(USE_AURA) || defined(USE_EFL) if (event_cancelled) return; if (event.GetType() == WebInputEvent::kGestureTap) { diff --git a/ui/base/clipboard/clipboard.h b/ui/base/clipboard/clipboard.h index 94236ad..e554c7b 100644 --- a/ui/base/clipboard/clipboard.h +++ b/ui/base/clipboard/clipboard.h @@ -70,7 +70,7 @@ class UI_BASE_EXPORT Clipboard : public base::ThreadChecker { #if defined(OS_WIN) const FORMATETC& ToFormatEtc() const { return data_; } -#elif defined(USE_AURA) || defined(OS_ANDROID) || defined(OS_FUCHSIA) +#elif defined(USE_AURA) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(USE_EFL) const std::string& ToString() const { return data_; } #elif defined(OS_MACOSX) NSString* ToNSString() const { return data_; } @@ -96,7 +96,7 @@ class UI_BASE_EXPORT Clipboard : public base::ThreadChecker { explicit FormatType(UINT native_format); FormatType(UINT native_format, LONG index); FORMATETC data_; -#elif defined(USE_AURA) || defined(OS_ANDROID) || defined(OS_FUCHSIA) +#elif defined(USE_AURA) || defined(OS_ANDROID) || defined(OS_FUCHSIA) || defined(USE_EFL) explicit FormatType(const std::string& native_format); std::string data_; #elif defined(OS_MACOSX) diff --git a/ui/gfx/native_widget_types.h b/ui/gfx/native_widget_types.h index 7ceeee1..f55c467 100644 --- a/ui/gfx/native_widget_types.h +++ b/ui/gfx/native_widget_types.h @@ -42,7 +42,7 @@ // 'views' and with our Chrome UI code where the elements are also called // 'views'. -#if defined(USE_AURA) +#if defined(USE_AURA) || defined(USE_EFL) namespace aura { class Window; } @@ -51,7 +51,7 @@ class Cursor; enum class CursorType; class Event; } -#endif // defined(USE_AURA) +#endif // defined(USE_AURA) || defined(USE_EFL) #if defined(OS_WIN) typedef struct HFONT__* HFONT; @@ -132,6 +132,12 @@ typedef void* NativeCursor; typedef ui::ViewAndroid* NativeView; typedef ui::WindowAndroid* NativeWindow; typedef base::android::ScopedJavaGlobalRef NativeEvent; +#elif defined(USE_EFL) +typedef ui::Cursor NativeCursor; +typedef void* NativeView; +typedef void* NativeWindow; +typedef SkRegion* NativeRegion; +typedef ui::Event* NativeEvent; #else #error Unknown build environment. #endif @@ -155,7 +161,7 @@ typedef void* NativeViewAccessible; #endif // A constant value to indicate that gfx::NativeCursor refers to no cursor. -#if defined(USE_AURA) +#if defined(USE_AURA) || defined(USE_EFL) const ui::CursorType kNullCursor = static_cast(0); #else const gfx::NativeCursor kNullCursor = static_cast(NULL); -- 2.7.4 From 864ff44b71f6058695be15a42b055d95e4895ddc Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Mon, 16 Jul 2018 07:06:25 +0000 Subject: [PATCH 14/16] [Rom Size] Remove dependencies of chrome, crashpad, and extension This removes unused component dependencies to reduced binary size. Removed Dependency List: - chrome - crashpad - extension Change-Id: Ic11a3f3bc999c91af00b21e8916d5d60ad42b4d7 Signed-off-by: Youngsoo Choi --- components/crash/content/app/BUILD.gn | 2 +- extensions/buildflags/buildflags.gni | 2 +- mojo/public/tools/bindings/chromium_bindings_configuration.gni | 5 ----- tizen_src/build/gn_chromiumefl.sh | 2 +- tizen_src/ewk/efl_integration/BUILD.gn | 3 --- 5 files changed, 3 insertions(+), 11 deletions(-) diff --git a/components/crash/content/app/BUILD.gn b/components/crash/content/app/BUILD.gn index b7e1771..6e27f0c 100644 --- a/components/crash/content/app/BUILD.gn +++ b/components/crash/content/app/BUILD.gn @@ -44,7 +44,7 @@ static_library("app") { "breakpad_linux.h", "breakpad_linux_impl.h", ] - if (!is_chromeos) { + if (!is_chromeos && !use_efl) { sources += [ "crashpad_linux.cc" ] } } diff --git a/extensions/buildflags/buildflags.gni b/extensions/buildflags/buildflags.gni index 6836e4a..1a7bec2 100644 --- a/extensions/buildflags/buildflags.gni +++ b/extensions/buildflags/buildflags.gni @@ -5,7 +5,7 @@ import("//build/config/features.gni") declare_args() { - enable_extensions = !is_android && !is_ios && !is_fuchsia + enable_extensions = !is_android && !is_ios && !is_fuchsia && !is_tizen # Enables Wi-Fi Display functionality # WARNING: This enables MPEG Transport Stream (MPEG-TS) encoding! diff --git a/mojo/public/tools/bindings/chromium_bindings_configuration.gni b/mojo/public/tools/bindings/chromium_bindings_configuration.gni index 19804b4..90d4b5b 100644 --- a/mojo/public/tools/bindings/chromium_bindings_configuration.gni +++ b/mojo/public/tools/bindings/chromium_bindings_configuration.gni @@ -4,11 +4,6 @@ _typemap_imports = [ "//ash/public/interfaces/typemaps.gni", - "//chrome/common/extensions/typemaps.gni", - "//chrome/common/importer/typemaps.gni", - "//chrome/common/media_router/mojo/typemaps.gni", - "//chrome/typemaps.gni", - "//chromeos/services/device_sync/public/mojom/typemaps.gni", "//components/arc/common/typemaps.gni", "//components/metrics/public/cpp/typemaps.gni", "//components/sync/mojo/typemaps.gni", diff --git a/tizen_src/build/gn_chromiumefl.sh b/tizen_src/build/gn_chromiumefl.sh index 11f95c4..704f9d1 100755 --- a/tizen_src/build/gn_chromiumefl.sh +++ b/tizen_src/build/gn_chromiumefl.sh @@ -83,7 +83,7 @@ COMMON_GN_PARAMETERS=" use_pango=false use_cairo=false enable_plugins=true - enable_extensions=true + enable_extensions=false use_cups=false use_allocator=\"none\" disable_fatal_linker_warnings=true diff --git a/tizen_src/ewk/efl_integration/BUILD.gn b/tizen_src/ewk/efl_integration/BUILD.gn index 959d68d..98f3b24 100644 --- a/tizen_src/ewk/efl_integration/BUILD.gn +++ b/tizen_src/ewk/efl_integration/BUILD.gn @@ -62,8 +62,6 @@ shared_library("chromium-ewk") { "//tizen_src/chromium_impl/efl:efl-init", "//base/:base_static", - "//chrome/common/media_router/mojo:media_router", - "//chrome:packed_resources", "//content/public/browser", "//content/shell:resources", "//content/shell:pak", @@ -79,7 +77,6 @@ shared_library("chromium-ewk") { "//components/plugins/renderer", "//components/variations", "//services/device:lib", - "//extensions:shell_and_test_pak", "//printing", "//skia", "//storage/browser", -- 2.7.4 From d38b3dbceb07a642a3594971c629cb1e94b6f646 Mon Sep 17 00:00:00 2001 From: Youngsoo Choi Date: Tue, 17 Jul 2018 01:23:19 +0000 Subject: [PATCH 15/16] [Rom Size] Use system libpng The libchromium-ewk.so size can be reduced by using system libpng. Note that this adds libpng 1.6 which ubuntu doesn't have so that the library can be used for desktop build by jhbuild. Change-Id: Id92c55f172c0a9591e19e0838e942aec6527489f Signed-off-by: Youngsoo Choi --- third_party/.gitignore | 1 + tizen_src/build/gn_chromiumefl.sh | 5 ++++- tizen_src/build/jhbuild/jhbuild.modules | 9 +++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/third_party/.gitignore b/third_party/.gitignore index 4ddbdc9..9f4bdbf 100644 --- a/third_party/.gitignore +++ b/third_party/.gitignore @@ -115,6 +115,7 @@ /libjpeg_turbo /liblouis/src /libphonenumber/dist +/libpng /libsrtp /libsync/src /libupnp diff --git a/tizen_src/build/gn_chromiumefl.sh b/tizen_src/build/gn_chromiumefl.sh index 704f9d1..3b7786d 100755 --- a/tizen_src/build/gn_chromiumefl.sh +++ b/tizen_src/build/gn_chromiumefl.sh @@ -98,6 +98,10 @@ COMMON_GN_PARAMETERS=" # proprietary_codecs=true # enable_plugins=true +SYSTEM_DEPS="--system-libraries + libpng + " + if [ "$building_xwalk" == "1" ] && [ "$building_xwalk_for_development" != "1" ]; then COMMON_GN_PARAMETERS+=" xwalk_link_against_chromium_ewk=true @@ -246,7 +250,6 @@ _GN_ARGS=" --dotfile=${TOPDIR}/tizen_src/.gn --args= $COMMON_GN_PARAMETERS - $SYSTEM_DEPS $ADDITIONAL_GN_PARAMETERS $EXTRA_GN_ARGS " diff --git a/tizen_src/build/jhbuild/jhbuild.modules b/tizen_src/build/jhbuild/jhbuild.modules index d30a2ab..a02f9d3 100755 --- a/tizen_src/build/jhbuild/jhbuild.modules +++ b/tizen_src/build/jhbuild/jhbuild.modules @@ -26,6 +26,8 @@ href="http://git.gnome.org/"/> + + + + + + -- 2.7.4 From 902dab6c9d2052b8bf77aca5912c02595fbc2824 Mon Sep 17 00:00:00 2001 From: Chandan Padhi Date: Wed, 25 Jul 2018 14:11:44 +0530 Subject: [PATCH 16/16] fixup! [Rom Size] Use system libpng This commit adds the missing dependency of libpng to fix related desktop build errors. Change-Id: I18a33f8be25c60b383d8e54599f13d3b8cfe7e08 Signed-off-by: Chandan Padhi --- tizen_src/build/jhbuild/jhbuild.modules | 1 + 1 file changed, 1 insertion(+) diff --git a/tizen_src/build/jhbuild/jhbuild.modules b/tizen_src/build/jhbuild/jhbuild.modules index a02f9d3..89a1e40 100755 --- a/tizen_src/build/jhbuild/jhbuild.modules +++ b/tizen_src/build/jhbuild/jhbuild.modules @@ -15,6 +15,7 @@ + -- 2.7.4