[M41_2236] Chromium upversion to m41_2236 branch
authorAntonio Gomes <a1.gomes@samsung.com>
Thu, 9 Apr 2015 06:41:06 +0000 (15:41 +0900)
committerYoungsoo Choi <kenshin.choi@samsung.com>
Tue, 10 Jul 2018 06:57:09 +0000 (06:57 +0000)
Based on the work of SeungSeop Park <sns.park@samsung.com>.
Original commit message:

Patch comprises followings:

1. Changes in DevToolsHttpHandler and its Delegate.
  - API changed: DevToolsHttpHandlerDelegate::CreateSocketForTethering.
    (see s-chromium: "1443f56 [DevTools] Migrate DevToolsHttpHandlerDelegate::
    CreateSocketForTethering to StreamSocket")
  - API removed: DevToolsHttpHandler::Stop.
    (see s-chromium: "3632399 [DevTools] Remove DevToolsHttpHandler::Stop.")
TODO: Need implementation according to the chromium change.
(http://107.108.218.239/bugzilla/show_bug.cgi?id=9801)

2. Change in ui::Clipboard::GetSequenceNumber.
  - ui::Clipboard::GetSequenceNumber is now const method.

3. API change in PdfMetafileSkia class:
   SkBaseDevice* StartPageForVectorCanvas =>
     skia::VectorCanvas* GetVectorCanvasForNewPage.
  Note: The inline documentation says that returned pointer don't need to be
  ref()ed or unref()ed since it's owned by the PdfMetafileSkia object.

4. WebContentDelgate API change.
  - NavigationStateChanged(): First argument changed to non-const WebContents*.
  - GetJavaScriptDialogManager(): Now takes WebContent* as the argument.
    But how to use the added argument is unclear (even chromium code seems
    not yet utilizing it).

5. Namespace change: content::ConvertRectToDIP -> gfx::ConvertRectToDIP.

6. New abstract API in BrowserContext: CreateZoomLevelDelegate().
   The provided solution is to give a dummy implementation as in content shell.

7. Type change: CopyFromCompositingSurfaceCallback=>ReadbackRequestCallback.

8. kEnableOverscrollNotifications flag removed in s-chromium commit:
   0fa5129 [Android] Add a flag to disable the pull-to-refresh effect
   (https://codereview.chromium.org/733293002).
   It says:
   "Also remove the kEnableOverscrollNotifications flag; overscroll
    notifications are now bundled with event acks, creating
    minimal extra overhead for non-consuming platforms."
   Prepared solution is to just remove it from our commandline switch
   (for OS_TIZEN).
TODO: Check if we can live without that flag.
     (http://107.108.218.239/bugzilla/show_bug.cgi?id=9802)

9. Upstream changed V8's initial snapshot loading mechanism.
   See https://crbug.com/421063, which says:
   "V8 used to be statically linked to the binary, but now it is loaded from
   external files, which reduces Chrome's binary size."

   Due to this change, "natives_blob.bin" and "snapshot_blob.bin" need to be
   deployed to mobile/tv target device. Otherwise, apps crashes on starting up
   in tv and mobile target. (Thanks to Zhang-hoon Oh)
Contributor: Zhang-hoon Oh <dennis.oh@samsung.com>

10. Finally, change sync_repos.sh so to track dev/m41_2236 of s-* repos.

Bug: http://107.108.218.239/bugzilla/show_bug.cgi?id=9758
Reviewed by: Antonio Gomes, Balazs Kelemen, SeungSeop Park

Change-Id: Iad80766e116612fd3b9d2717430edec3693e557f
Signed-off-by: SeungSeop Park <sns.park@samsung.com>
13 files changed:
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.cc
tizen_src/chromium_impl/content/browser/renderer_host/render_widget_host_view_efl.h
tizen_src/chromium_impl/ui/base/clipboard/clipboard_efl.cc
tizen_src/chromium_impl/ui/base/clipboard/clipboard_efl.h
tizen_src/chromium_impl/ui/gfx/screen_efl.cc
tizen_src/ewk/efl_integration/browser_context_efl.cc
tizen_src/ewk/efl_integration/browser_context_efl.h
tizen_src/ewk/efl_integration/devtools_delegate_efl.cc
tizen_src/ewk/efl_integration/eweb_view.cc
tizen_src/ewk/efl_integration/renderer/print_web_view_helper_efl.cc
tizen_src/ewk/efl_integration/web_contents_delegate_efl.cc
tizen_src/ewk/efl_integration/web_contents_delegate_efl.h
tizen_src/packaging/chromium-efl.spec

index 5f036c6..b7e59db 100644 (file)
@@ -34,7 +34,6 @@
 #include "content/browser/renderer_host/web_event_factory_efl.h"
 #include "content/browser/renderer_host/render_widget_host_impl.h"
 #include "content/browser/renderer_host/input/web_input_event_util.h"
-#include "content/browser/renderer_host/dip_util.h"
 #include "content/browser/gpu/gpu_process_host.h"
 #include "content/common/gpu/client/gl_helper.h"
 #include "content/common/input/did_overscroll_params.h"
@@ -54,6 +53,7 @@
 #include "third_party/WebKit/public/web/WebTouchPoint.h"
 #include "ui/base/layout.h"
 #include "ui/gfx/display.h"
+#include "ui/gfx/geometry/dip_util.h"
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/screen.h"
 #include "ui/events/event_utils.h"
@@ -586,7 +586,7 @@ bool RenderWidgetHostViewEfl::IsShowing() {
 }
 
 gfx::Rect RenderWidgetHostViewEfl::GetViewBounds() const {
-  return content::ConvertRectToDIP(device_scale_factor_, GetViewBoundsInPix());
+  return gfx::ConvertRectToDIP(device_scale_factor_, GetViewBoundsInPix());
 }
 
 bool RenderWidgetHostViewEfl::LockMouse() {
@@ -835,8 +835,8 @@ void RenderWidgetHostViewEfl::DispatchGestureEvent(ui::GestureEvent* event) {
 
 void RenderWidgetHostViewEfl::CopyFromCompositingSurface(
     const gfx::Rect& src_subrect,
-    const gfx::Size& /* dst_size */,
-    const base::Callback<void(bool, const SkBitmap&)>&,
+    const gfx::Size& output_size,
+    const ReadbackRequestCallback& callback,
     const SkColorType color_type) {
   NOTIMPLEMENTED();
 }
@@ -1068,8 +1068,8 @@ gfx::Rect RenderWidgetHostViewEfl::GetBoundsInRootWindow() {
   int x, y, w, h;
   ecore_evas_geometry_get(ee, &x, &y, &w, &h);
   if (current_orientation_ == 90 || current_orientation_ == 270)
-    return content::ConvertRectToDIP(device_scale_factor_, gfx::Rect(x, y, h, w));
-  return content::ConvertRectToDIP(device_scale_factor_, gfx::Rect(x, y, w, h));
+    return gfx::ConvertRectToDIP(device_scale_factor_, gfx::Rect(x, y, h, w));
+  return gfx::ConvertRectToDIP(device_scale_factor_, gfx::Rect(x, y, w, h));
 }
 
 gfx::GLSurfaceHandle RenderWidgetHostViewEfl::GetCompositingSurface() {
index a6a966d..7835a07 100644 (file)
@@ -118,7 +118,7 @@ class RenderWidgetHostViewEfl
   void CopyFromCompositingSurface(
     const gfx::Rect&,
     const gfx::Size& /* dst_size */,
-    const base::Callback<void(bool, const SkBitmap&)>&,
+    const ReadbackRequestCallback&,
     const SkColorType) override;
 
   void CopyFromCompositingSurfaceToVideoFrame(
index 8076dec..d6a8230 100644 (file)
@@ -74,7 +74,7 @@ void ClipboardEfl::WriteObjects(ClipboardType type, const ObjectMap& objects) {
   }
 }
 
-uint64 ClipboardEfl::GetSequenceNumber(ClipboardType /* type */) {
+uint64 ClipboardEfl::GetSequenceNumber(ClipboardType /* type */) const {
   DCHECK(CalledOnValidThread());
   // TODO: implement this. For now this interface will advertise
   // that the clipboard never changes. That's fine as long as we
index 9495652..3574a0e 100644 (file)
@@ -17,7 +17,7 @@ class ClipboardEfl: public Clipboard {
   ~ClipboardEfl() override;
 
   // Clipboard overrides:
-  uint64 GetSequenceNumber(ClipboardType type) override;
+  uint64 GetSequenceNumber(ClipboardType type) const override;
   bool IsFormatAvailable(const FormatType& format,
                          ClipboardType type) const override;
   void Clear(ClipboardType type) override;
index c8bc33e..d80000c 100644 (file)
@@ -12,6 +12,7 @@
 #include "ui/gfx/geometry/rect.h"
 #include "ui/gfx/display.h"
 #include "ui/gfx/display_observer.h"
+#include "ui/gfx/geometry/dip_util.h"
 #include "ui/gfx/screen.h"
 #include "ui/gfx/x/x11_types.h"
 
@@ -112,7 +113,7 @@ class ScreenEfl : public gfx::Screen {
 
     const gfx::Rect bounds_in_pixels = gfx::Rect(width, height);
     const gfx::Rect bounds_in_dip =
-        content::ConvertRectToDIP(device_scale_factor, bounds_in_pixels);
+        gfx::ConvertRectToDIP(device_scale_factor, bounds_in_pixels);
 
     display.set_device_scale_factor(device_scale_factor);
     display.set_bounds(bounds_in_dip);
index 70c4b1f..3cdd730 100644 (file)
@@ -143,14 +143,21 @@ BrowserContextEfl::BrowserContextEfl(EWebContext* web_context, bool incognito)
 
   user_prefs::UserPrefs::Set(this, user_pref_service_.get());
 
+#if defined(TIZEN_AUTOFILL_SUPPORT)
   autofill::PersonalDataManagerFactory::GetInstance()
       ->PersonalDataManagerAdd(this);
+#endif
 }
 
 net::URLRequestContextGetter* BrowserContextEfl::GetRequestContext() {
   return GetStoragePartition(this, NULL)->GetURLRequestContext();
 }
 
+scoped_ptr<ZoomLevelDelegate> BrowserContextEfl::CreateZoomLevelDelegate(
+    const base::FilePath&) {
+  return scoped_ptr<ZoomLevelDelegate>();
+}
+
 ResourceContext* BrowserContextEfl::GetResourceContext() {
   if (!resource_context_) {
     resource_context_ = new ResourceContextEfl(web_context_->cookieManager());
index 1d28094..f37dca8 100644 (file)
@@ -72,6 +72,8 @@ class BrowserContextEfl
   BrowserContextEfl(EWebContext*, bool incognito = false);
   ~BrowserContextEfl();
 
+  virtual scoped_ptr<ZoomLevelDelegate> CreateZoomLevelDelegate(
+      const base::FilePath& partition_path);
   virtual bool IsOffTheRecord() const override { return incognito_; }
   virtual net::URLRequestContextGetter* GetRequestContext() override;
   URLRequestContextGetterEfl* GetRequestContextEfl()
index b577245..8f10ddb 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "base/bind.h"
 #include "base/command_line.h"
+#include "base/lazy_instance.h"
 #include "base/logging.h"
 #include "base/strings/string_number_conversions.h"
 #include "base/strings/stringprintf.h"
index 724202b..ff6a1ff 100644 (file)
@@ -1914,7 +1914,8 @@ void EWebView::DidChangePageScaleFactor(double scale_factor) {
 }
 
 inline JavaScriptDialogManagerEfl* EWebView::GetJavaScriptDialogManagerEfl() {
-  return static_cast<JavaScriptDialogManagerEfl*>(web_contents_delegate_->GetJavaScriptDialogManager());
+  return static_cast<JavaScriptDialogManagerEfl*>(
+      web_contents_delegate_->GetJavaScriptDialogManager(web_contents_.get()));
 }
 
 void EWebView::SetJavaScriptAlertCallback(tizen_webview::View_JavaScript_Alert_Callback callback, void* user_data) {
index e24d57e..ed65aa0 100644 (file)
@@ -189,19 +189,15 @@ bool PrintWebViewHelperEfl::PrintPageInternal(
   PrintParams result;
   double scale_factor = 1.0f;
   gfx::Rect canvas_area(canvas_size);
-  SkBaseDevice* device = metafile->StartPageForVectorCanvas(params.params.page_size,
-      canvas_area, scale_factor);
-  if (!device)
+  skia::VectorCanvas* canvas = metafile->GetVectorCanvasForNewPage(
+      params.params.page_size, canvas_area, scale_factor);
+  if (!canvas)
     return false;
 
-  // The printPage method take a reference to the canvas we pass down, so it
-  // can't be a stack object.
-  skia::RefPtr<skia::VectorCanvas> canvas =
-      skia::AdoptRef(new skia::VectorCanvas(device));
-  printing::MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, static_cast<printing::PdfMetafileSkia*>(metafile));
+  printing::MetafileSkiaWrapper::SetMetafileOnCanvas(*canvas, metafile);
   skia::SetIsDraftMode(*canvas, true);
 
-  frame->printPage(params.page_number, canvas.get());
+  frame->printPage(params.page_number, canvas);
   // Done printing. Close the device context to retrieve the compiled metafile.
   if (!metafile->FinishPage()) {
     NOTREACHED() << "metafile failed";
index 5924bc1..44e92e7 100644 (file)
@@ -145,7 +145,7 @@ WebContents* WebContentsDelegateEfl::OpenURLFromTab(
 }
 
 void WebContentsDelegateEfl::NavigationStateChanged(
-    const WebContents* source, InvalidateTypes changed_flags) {
+    WebContents* source, InvalidateTypes changed_flags) {
   if (changed_flags & content::INVALIDATE_TYPE_URL) {
     const char* url = source->GetVisibleURL().spec().c_str();
     web_view_->SmartCallback<EWebViewCallbacks::URLChanged>().call(url);
@@ -460,7 +460,8 @@ void WebContentsDelegateEfl::FindReply(WebContents* web_contents,
   }
 }
 
-JavaScriptDialogManager* WebContentsDelegateEfl::GetJavaScriptDialogManager() {
+JavaScriptDialogManager* WebContentsDelegateEfl::GetJavaScriptDialogManager(
+      WebContents* source) {
   if (!dialog_manager_)
     dialog_manager_ = new JavaScriptDialogManagerEfl();
   return dialog_manager_;
index a69182c..c98021d 100644 (file)
@@ -39,7 +39,7 @@ class WebContentsDelegateEfl
 
   virtual WebContents* OpenURLFromTab(WebContents* source,
       const content::OpenURLParams& params) override;
-  virtual void NavigationStateChanged(const WebContents* source,
+  virtual void NavigationStateChanged(WebContents* source,
                                       InvalidateTypes changed_flags) override;
 
   virtual void LoadProgressChanged(WebContents* source, double progress) override;
@@ -132,7 +132,7 @@ class WebContentsDelegateEfl
   void UpdateFormNavigation(int formElementCount, int currentNodeIndex,
       bool prevState, bool nextState);
 
-  JavaScriptDialogManager* GetJavaScriptDialogManager() override;
+  JavaScriptDialogManager* GetJavaScriptDialogManager(WebContents* source) override;
 
   void DidFirstVisuallyNonEmptyPaint() override;
 
index b68ecf7..29e7622 100644 (file)
@@ -431,6 +431,8 @@ install -m 0755 "%{OUTPUT_FOLDER}"/lib/libchromium-ewk.so    "%{buildroot}"%{_li
 install -m 0755 "%{OUTPUT_FOLDER}"/libffmpegsumo.so  "%{buildroot}%{CHROMIUM_EXE_DIR}"
 install -m 0755 "%{OUTPUT_FOLDER}"/efl_webprocess    "%{buildroot}%{CHROMIUM_EXE_DIR}"
 install -m 0755 "%{OUTPUT_FOLDER}"/icudtl.dat    "%{buildroot}%{CHROMIUM_EXE_DIR}"
+install -m 0755 "%{OUTPUT_FOLDER}"/natives_blob.bin  "%{buildroot}%{CHROMIUM_EXE_DIR}"
+install -m 0755 "%{OUTPUT_FOLDER}"/snapshot_blob.bin "%{buildroot}%{CHROMIUM_EXE_DIR}"
 install -m 0755 "%{OUTPUT_FOLDER}"/content_shell.pak "%{buildroot}%{CHROMIUM_EXE_DIR}"
 install -m 0644 "%{OUTPUT_FOLDER}"/resources/*.edj   "%{buildroot}%{CHROMIUM_DATA_DIR}"/themes
 
@@ -574,6 +576,8 @@ fi
 %{CHROMIUM_EXE_DIR}/efl_webprocess
 %{CHROMIUM_EXE_DIR}/libffmpegsumo.so
 %{CHROMIUM_EXE_DIR}/icudtl.dat
+%{CHROMIUM_EXE_DIR}/natives_blob.bin
+%{CHROMIUM_EXE_DIR}/snapshot_blob.bin
 %{CHROMIUM_EXE_DIR}/content_shell.pak
 %{CHROMIUM_EXE_DIR}/locales/*.pak
 %{CHROMIUM_DATA_DIR}/themes/*.edj