From: Prashanth R K Shandilya Date: Tue, 5 Jul 2016 07:13:35 +0000 (+0530) Subject: [M53_2785] Chromium upversion to m53_2785 branch. X-Git-Tag: submit/tizen/20201118.160233~299 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=52c9c8b3df7a3d222f253c5c1e42c372522957a9;p=platform%2Fframework%2Fweb%2Fchromium-efl.git [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 --- 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,