New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 612346 link

Starred by 4 users

Issue metadata

Status: Fixed
Owner:
Email to this user bounced
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Task


Sign in to add a comment

Content Modularization Project: Wake Lock

Project Member Reported by jam@chromium.org, May 17 2016

Issue description

Tracking bug for the wake lock part of the Content Modularization Project. The end goal should be to have a self-contained service. As part of getting rid (or greatly reducing) content/, this code should move out of content/. Most likely to device/wake_lock to be consistent with what's being done for other device related APIs.

Strawman proposal, following other services that we're extracting from content:
-eliminate the dependencies in this code on other code in content/
-move remaining code in content/browser/wake_lock and the mojom in third_party/webkit to device/wake_lock
 

Comment 1 by jam@chromium.org, May 17 2016

Cc: mcasas@chromium.org

Comment 2 by jam@chromium.org, May 17 2016

Blocking: -598073 598069
Project Member

Comment 3 by bugdroid1@chromium.org, Sep 27 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/87cd0848a0d1453e7553a72b0686d42fabf8ff3a

commit 87cd0848a0d1453e7553a72b0686d42fabf8ff3a
Author: blundell <blundell@chromium.org>
Date: Tue Sep 27 11:30:28 2016

Power Save Blocker: Eliminate passing ViewAndroid as WeakPtr

As of https://codereview.chromium.org/2103243002/, PowerSaveBlockerAndroid
accesses the ViewAndroid pointer it is passed only at a time when that
ViewAndroid pointer is guaranteed to be valid.  This CL moves
PowerSaveBlockerAndroid away from consuming the ViewAndroid pointer as a
WeakPtr. The concrete motivation is to eliminate WakeLockServiceContext needing
to listen for WebContentsObserver::WebContentsDestroyed() as part of decoupling
the wake lock service from //content.

BUG= 612346 

Review-Url: https://codereview.chromium.org/2371723002
Cr-Commit-Position: refs/heads/master@{#421169}

[modify] https://crrev.com/87cd0848a0d1453e7553a72b0686d42fabf8ff3a/content/browser/devtools/render_frame_devtools_agent_host.cc
[modify] https://crrev.com/87cd0848a0d1453e7553a72b0686d42fabf8ff3a/content/browser/devtools/render_frame_devtools_agent_host.h
[modify] https://crrev.com/87cd0848a0d1453e7553a72b0686d42fabf8ff3a/content/browser/media/media_web_contents_observer.cc
[modify] https://crrev.com/87cd0848a0d1453e7553a72b0686d42fabf8ff3a/content/browser/media/media_web_contents_observer.h
[modify] https://crrev.com/87cd0848a0d1453e7553a72b0686d42fabf8ff3a/content/browser/wake_lock/wake_lock_service_context.cc
[modify] https://crrev.com/87cd0848a0d1453e7553a72b0686d42fabf8ff3a/content/browser/wake_lock/wake_lock_service_context.h
[modify] https://crrev.com/87cd0848a0d1453e7553a72b0686d42fabf8ff3a/device/power_save_blocker/power_save_blocker.h
[modify] https://crrev.com/87cd0848a0d1453e7553a72b0686d42fabf8ff3a/device/power_save_blocker/power_save_blocker_android.cc

Project Member

Comment 4 by bugdroid1@chromium.org, Oct 3 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/ebd751770f62eb05586897f4d2843f2c0d8af0b9

commit ebd751770f62eb05586897f4d2843f2c0d8af0b9
Author: blundell <blundell@chromium.org>
Date: Mon Oct 03 10:41:43 2016

Decouple WakeLock from direct //content dependencies

As part of the Content Modularization Project, this CL removes direct
knowledge of //content from //content/browser's wake lock service.

The design follows that described here:

https://docs.google.com/document/d/1683obWqUStROtJHgkveAWbnGi-W3P7gMylzYeImEzBU/edit#heading=h.jr0fqceqrud1

Note that this CL does not remove synchronous dependencies of this code
on //content: on Android a callback is passed in in order to obtain
the current NativeView when creating a wake lock. I do not know how to
remove that dependency at this time: WebContent::GetNativeView() can
return different values throughout the lifetime of a WebContents instance,
at least on Android.

Two unittests were removed from wake_lock_service_context.cc as they are not
relevant at the //device level. The functionality of render frame deletion is
still tested via the browsertest.

BUG= 612346 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2378033002
Cr-Commit-Position: refs/heads/master@{#422397}

[modify] https://crrev.com/ebd751770f62eb05586897f4d2843f2c0d8af0b9/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/ebd751770f62eb05586897f4d2843f2c0d8af0b9/content/browser/wake_lock/wake_lock_service_context.cc
[modify] https://crrev.com/ebd751770f62eb05586897f4d2843f2c0d8af0b9/content/browser/wake_lock/wake_lock_service_context.h
[modify] https://crrev.com/ebd751770f62eb05586897f4d2843f2c0d8af0b9/content/browser/wake_lock/wake_lock_service_context_unittest.cc
[modify] https://crrev.com/ebd751770f62eb05586897f4d2843f2c0d8af0b9/content/browser/wake_lock/wake_lock_service_impl.cc
[modify] https://crrev.com/ebd751770f62eb05586897f4d2843f2c0d8af0b9/content/browser/wake_lock/wake_lock_service_impl.h
[modify] https://crrev.com/ebd751770f62eb05586897f4d2843f2c0d8af0b9/content/browser/web_contents/web_contents_impl.cc

Project Member

Comment 5 by bugdroid1@chromium.org, Oct 7 2016

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/d46e883138e3023c3ebc342f64dc8eda22926144

commit d46e883138e3023c3ebc342f64dc8eda22926144
Author: blundell <blundell@chromium.org>
Date: Fri Oct 07 10:34:27 2016

Content Modularization Project: Move Wake Lock to //device

As part of the Content Modularization Project, this CL moves the
implementation of the wake_lock_service.mojom interface from
//content/browser to //device. It also moves that interface itself
out from Blink to //device.

BUG= 612346 
CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation

Review-Url: https://codereview.chromium.org/2389743002
Cr-Commit-Position: refs/heads/master@{#423831}

[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/content/browser/BUILD.gn
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/content/browser/DEPS
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/content/browser/frame_host/render_frame_host_delegate.cc
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/content/browser/frame_host/render_frame_host_delegate.h
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/content/browser/frame_host/render_frame_host_impl.cc
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/content/browser/wake_lock/wake_lock_browsertest.cc
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/content/browser/web_contents/web_contents_impl.cc
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/content/browser/web_contents/web_contents_impl.h
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/content/test/BUILD.gn
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/BUILD.gn
[add] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/BUILD.gn
[add] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/DEPS
[add] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/OWNERS
[add] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/public/interfaces/BUILD.gn
[add] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/public/interfaces/OWNERS
[rename] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/public/interfaces/wake_lock_service.mojom
[rename] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/wake_lock_service_context.cc
[rename] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/wake_lock_service_context.h
[rename] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/wake_lock_service_context_unittest.cc
[rename] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/wake_lock_service_impl.cc
[rename] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/device/wake_lock/wake_lock_service_impl.h
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/third_party/WebKit/Source/modules/wake_lock/BUILD.gn
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/third_party/WebKit/Source/modules/wake_lock/DEPS
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/third_party/WebKit/Source/modules/wake_lock/ScreenWakeLock.h
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/third_party/WebKit/Source/web/BUILD.gn
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/third_party/WebKit/Source/web/tests/ScreenWakeLockTest.cpp
[modify] https://crrev.com/d46e883138e3023c3ebc342f64dc8eda22926144/third_party/WebKit/public/BUILD.gn

Labels: DeviceService
Blockedon: 689403
Blockedon: 689410
Blockedon: 689428
Blockedon: 689429
Blockedon: 701414
Owner: ke...@intel.com
Status: Fixed (was: Available)
Components: Internals>Services>Device
Labels: Type-Task
Migrating S13N meta bugs to Type=Task, so that they can be distinguished from technical work.

Sign in to add a comment