This refers to the classes: - BarcodeDetectionImpl and TextDetectionImpl in [1] - FaceDetecitonImpl and FaceDetectionImplProvider in [2] that should be moved to live in //services/shape_detection so they will be isolated and running in background threads etc. Also consider supporting GMS core Face Detection if available ISO the android.media.FaceDetector. [1] https://cs.chromium.org/chromium/src/content/public/android/java/src/org/chromium/content/browser/shapedetection/?type=cs&q=655814&sq=package:chromium [2] https://cs.chromium.org/chromium/src/content/public/android/java/src/org/chromium/content/browser/shapedetection/?q=facedetectionimpl.java&sq=package:chromium&dr
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e766fc5ecd017b1ce6cca79c1f4a11a7e883c298 commit e766fc5ecd017b1ce6cca79c1f4a11a7e883c298 Author: mcasas <mcasas@chromium.org> Date: Thu May 04 18:34:44 2017 Shape Detection: run Android FaceDetector ops on background thread This CL moves the interactions with android.media.FaceDetector because they are slow and trigger a "StrictMode policy violation" (at least in Debug build). Some of the parameters are made final to use them inside a Runnable. BUG= 718275 Review-Url: https://codereview.chromium.org/2863553002 Cr-Commit-Position: refs/heads/master@{#469393} [modify] https://crrev.com/e766fc5ecd017b1ce6cca79c1f4a11a7e883c298/content/public/android/java/src/org/chromium/content/browser/shapedetection/FaceDetectionImpl.java
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/5b95074ff70c578c5eef6f1201f23acec24f29c8 commit 5b95074ff70c578c5eef6f1201f23acec24f29c8 Author: mcasas <mcasas@chromium.org> Date: Thu May 04 19:34:40 2017 Shape Detection: move {BarcodeDetectionImpl,TextDetectionImpl}.java to //services/shape_detection This CL: - moves those two fellas (BarcodeDetectionImpl.java and TextDetectionImpl.java) from //chrome to //services/shape_detection, with some tiny adaptations. - changes render_process_host_impl.cc to send requests to the said service. - adds a needed InterfaceRegistrar.java to //services/shape_detection and some android-specific code to shape_detection_service.cc, following the //services/device model (BatteryMonitor, concretely). No new code or functionality is intended in the ...Impl.java files (except a small change in testing for GMS presence). BUG= 718275 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.mac:mac_optional_gpu_tests_rel Review-Url: https://codereview.chromium.org/2855203003 Cr-Commit-Position: refs/heads/master@{#469424} [modify] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/chrome/android/BUILD.gn [modify] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/chrome/android/java/src/org/chromium/chrome/browser/mojo/ChromeInterfaceRegistrar.java [modify] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/chrome/android/java_sources.gni [modify] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/content/browser/renderer_host/render_process_host_impl.cc [modify] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/services/shape_detection/BUILD.gn [modify] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/services/shape_detection/DEPS [rename] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/services/shape_detection/android/java/src/org/chromium/shape_detection/BarcodeDetectionImpl.java [add] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java [rename] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/services/shape_detection/android/java/src/org/chromium/shape_detection/TextDetectionImpl.java [modify] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/services/shape_detection/shape_detection_service.cc [modify] https://crrev.com/5b95074ff70c578c5eef6f1201f23acec24f29c8/services/shape_detection/shape_detection_service.h
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/50891e91c5ff7c763a5b053dc6b4385448c2a78c commit 50891e91c5ff7c763a5b053dc6b4385448c2a78c Author: mcasas <mcasas@chromium.org> Date: Sat May 06 18:59:31 2017 Shape Detection: move Java Face detection classes to //services/shape_detection This CL moves FaceDetection{Provider}Impl.java out of from //content/public/... and into //services/shape_detection to reunite with the other two fellas {Barcode,Text}DetectionImpl.java. Aside from it, this CL adds no new code, and is tested via ShapeDetectionBrowserTest. [1] https://cs.chromium.org/chromium/src/content/browser/shape_detection/shape_detection_browsertest.cc?type=cs&q=ShapeDetectionBrowserTest&sq=package:chromium&l=47 BUG= 718275 Review-Url: https://codereview.chromium.org/2861263002 Cr-Commit-Position: refs/heads/master@{#469858} [modify] https://crrev.com/50891e91c5ff7c763a5b053dc6b4385448c2a78c/content/browser/renderer_host/render_process_host_impl.cc [modify] https://crrev.com/50891e91c5ff7c763a5b053dc6b4385448c2a78c/content/public/android/BUILD.gn [modify] https://crrev.com/50891e91c5ff7c763a5b053dc6b4385448c2a78c/content/public/android/java/src/org/chromium/content/browser/InterfaceRegistrarImpl.java [modify] https://crrev.com/50891e91c5ff7c763a5b053dc6b4385448c2a78c/services/shape_detection/BUILD.gn [rename] https://crrev.com/50891e91c5ff7c763a5b053dc6b4385448c2a78c/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionImpl.java [rename] https://crrev.com/50891e91c5ff7c763a5b053dc6b4385448c2a78c/services/shape_detection/android/java/src/org/chromium/shape_detection/FaceDetectionProviderImpl.java [modify] https://crrev.com/50891e91c5ff7c763a5b053dc6b4385448c2a78c/services/shape_detection/android/java/src/org/chromium/shape_detection/InterfaceRegistrar.java [modify] https://crrev.com/50891e91c5ff7c763a5b053dc6b4385448c2a78c/services/shape_detection/shape_detection_service.cc
Comment 1 by mcasas@chromium.org
, May 4 2017