Commit 0632d8e8 authored by thakis's avatar thakis Committed by Commit bot

reflow comments in modules/[presentation,storage]

BUG=563793
TBR=haraken

Review-Url: https://codereview.chromium.org/2396573002
Cr-Commit-Position: refs/heads/master@{#422985}
parent 14347994
......@@ -50,9 +50,9 @@ void Presentation::setDefaultRequest(PresentationRequest* request) {
PresentationReceiver* Presentation::receiver() {
PresentationController* controller = PresentationController::from(*frame());
auto* client = controller ? controller->client() : nullptr;
// TODO(crbug.com/647296): only return something if the Blink instance is running in
// presentation receiver mode. The flag PresentationReceiver could be used
// for that.
// TODO(crbug.com/647296): only return something if the Blink instance is
// running in presentation receiver mode. The flag PresentationReceiver could
// be used for that.
if (!m_receiver)
m_receiver = new PresentationReceiver(frame(), client);
return m_receiver;
......
......@@ -16,8 +16,10 @@ class LocalFrame;
class PresentationReceiver;
class PresentationRequest;
// Implements the main entry point of the Presentation API corresponding to the Presentation.idl
// See https://w3c.github.io/presentation-api/#navigatorpresentation for details.
// Implements the main entry point of the Presentation API corresponding to the
// Presentation.idl
// See https://w3c.github.io/presentation-api/#navigatorpresentation for
// details.
class Presentation final : public GarbageCollected<Presentation>,
public ScriptWrappable,
public DOMWindowProperty {
......
......@@ -73,7 +73,8 @@ class PresentationConnection final : public EventTargetWithInlineData,
DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
DEFINE_ATTRIBUTE_EVENT_LISTENER(terminate);
// Returns true if and only if the WebPresentationConnectionClient represents this connection.
// Returns true if and only if the WebPresentationConnectionClient represents
// this connection.
bool matches(WebPresentationConnectionClient*) const;
// Notifies the connection about its state change.
......
......@@ -14,8 +14,8 @@
namespace blink {
// Implements the PresentationConnectionList interface from the Presentation API from
// which represents set of presentation connections in the set of
// Implements the PresentationConnectionList interface from the Presentation API
// from which represents set of presentation connections in the set of
// presentation controllers.
class MODULES_EXPORT PresentationConnectionList final
: public EventTargetWithInlineData,
......
......@@ -14,7 +14,8 @@ namespace blink {
class DOMException;
class ScriptPromiseResolver;
// A container of methods taking care of WebPresentationError in WebCallbacks subclasses.
// A container of methods taking care of WebPresentationError in WebCallbacks
// subclasses.
class PresentationError final {
STATIC_ONLY(PresentationError);
......
......@@ -47,7 +47,8 @@ void DeprecatedStorageInfo::queryUsageAndQuota(
int storageType,
StorageUsageCallback* successCallback,
StorageErrorCallback* errorCallback) {
// Dispatching the request to DeprecatedStorageQuota, as this interface is deprecated in favor of DeprecatedStorageQuota.
// Dispatching the request to DeprecatedStorageQuota, as this interface is
// deprecated in favor of DeprecatedStorageQuota.
DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType);
if (!storageQuota) {
// Unknown storage type is requested.
......@@ -65,7 +66,8 @@ void DeprecatedStorageInfo::requestQuota(ExecutionContext* executionContext,
unsigned long long newQuotaInBytes,
StorageQuotaCallback* successCallback,
StorageErrorCallback* errorCallback) {
// Dispatching the request to DeprecatedStorageQuota, as this interface is deprecated in favor of DeprecatedStorageQuota.
// Dispatching the request to DeprecatedStorageQuota, as this interface is
// deprecated in favor of DeprecatedStorageQuota.
DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType);
if (!storageQuota) {
// Unknown storage type is requested.
......
......@@ -65,11 +65,12 @@ ScriptPromise RemotePlayback::getAvailability(ScriptState* scriptState) {
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise();
// TODO(avayvod): currently the availability is tracked for each media element
// as soon as it's created, we probably want to limit that to when the page/element
// is visible (see https://crbug.com/597281) and has default controls. If there's
// no default controls, we should also start tracking availability on demand
// meaning the Promise returned by getAvailability() will be resolved asynchronously.
// TODO(avayvod): Currently the availability is tracked for each media element
// as soon as it's created, we probably want to limit that to when the
// page/element is visible (see https://crbug.com/597281) and has default
// controls. If there are no default controls, we should also start tracking
// availability on demand meaning the Promise returned by getAvailability()
// will be resolved asynchronously.
RemotePlaybackAvailability* availability =
RemotePlaybackAvailability::take(resolver, m_availability);
m_availabilityObjects.append(availability);
......
......@@ -15,7 +15,8 @@
#include "modules/screen_orientation/ScreenOrientationController.h"
#include "public/platform/modules/screen_orientation/WebScreenOrientationType.h"
// This code assumes that WebScreenOrientationType values are included in WebScreenOrientationLockType.
// This code assumes that WebScreenOrientationType values are included in
// WebScreenOrientationLockType.
#define STATIC_ASSERT_ENUM(a, b) \
static_assert(static_cast<int>(a) == static_cast<int>(b), \
"mismatching enum: " #a)
......
......@@ -49,13 +49,14 @@ const char* ScreenOrientationController::supplementName() {
return "ScreenOrientationController";
}
// Compute the screen orientation using the orientation angle and the screen width / height.
// Compute the screen orientation using the orientation angle and the screen
// width / height.
WebScreenOrientationType ScreenOrientationController::computeOrientation(
const IntRect& rect,
uint16_t rotation) {
// Bypass orientation detection in layout tests to get consistent results.
// FIXME: The screen dimension should be fixed when running the layout tests to avoid such
// issues.
// FIXME: The screen dimension should be fixed when running the layout tests
// to avoid such issues.
if (LayoutTestSupport::isRunningLayoutTest())
return WebScreenOrientationPortraitPrimary;
......@@ -89,7 +90,8 @@ void ScreenOrientationController::updateOrientation() {
WebScreenInfo screenInfo = chromeClient.screenInfo();
WebScreenOrientationType orientationType = screenInfo.orientationType;
if (orientationType == WebScreenOrientationUndefined) {
// The embedder could not provide us with an orientation, deduce it ourselves.
// The embedder could not provide us with an orientation, deduce it
// ourselves.
orientationType = computeOrientation(chromeClient.screenInfo().rect,
screenInfo.orientationAngle);
}
......
......@@ -17,8 +17,8 @@ namespace blink {
// - for 'CONTINUOUS' mode the polling function is invoked periodically
// with the given polling period (on timer event).
// - for 'ONCHANGE' mode the polling function is invoked only after client
// calls 'onSensorReadingChanged()' however considering the given polling period:
// guaranteed not to be called more often than expected.
// calls 'onSensorReadingChanged()' however considering the given polling
// period: guaranteed not to be called more often than expected.
class SensorPollingStrategy {
public:
static std::unique_ptr<SensorPollingStrategy> create(
......
......@@ -43,10 +43,10 @@ void DOMWindowStorageController::didAddEventListener(
LocalDOMWindow* window,
const AtomicString& eventType) {
if (eventType == EventTypeNames::storage) {
// Creating these blink::Storage objects informs the system that we'd like to receive
// notifications about storage events that might be triggered in other processes. Rather
// than subscribe to these notifications explicitly, we subscribe to them implicitly to
// simplify the work done by the system.
// Creating these blink::Storage objects informs the system that we'd like
// to receive notifications about storage events that might be triggered in
// other processes. Rather than subscribe to these notifications explicitly,
// we subscribe to them implicitly to simplify the work done by the system.
DOMWindowStorage::from(*window).localStorage(IGNORE_EXCEPTION);
DOMWindowStorage::from(*window).sessionStorage(IGNORE_EXCEPTION);
}
......
......@@ -169,7 +169,8 @@ void StorageArea::dispatchLocalStorageEvent(
for (Page* page : Page::ordinaryPages()) {
for (Frame* frame = page->mainFrame(); frame;
frame = frame->tree().traverseNext()) {
// FIXME: We do not yet have a way to dispatch events to out-of-process frames.
// FIXME: We do not yet have a way to dispatch events to out-of-process
// frames.
if (!frame->isLocalFrame())
continue;
LocalFrame* localFrame = toLocalFrame(frame);
......@@ -219,7 +220,8 @@ void StorageArea::dispatchSessionStorageEvent(
for (Frame* frame = page->mainFrame(); frame;
frame = frame->tree().traverseNext()) {
// FIXME: We do not yet have a way to dispatch events to out-of-process frames.
// FIXME: We do not yet have a way to dispatch events to out-of-process
// frames.
if (!frame->isLocalFrame())
continue;
LocalFrame* localFrame = toLocalFrame(frame);
......
......@@ -65,7 +65,10 @@ class StorageEvent final : public Event {
Storage* storageArea);
// Needed once we support init<blank>EventNS
// void initStorageEventNS(in DOMString namespaceURI, in DOMString typeArg, in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg, in DOMString oldValueArg, in DOMString newValueArg, in DOMString urlArg, Storage storageAreaArg);
// void initStorageEventNS(in DOMString namespaceURI, in DOMString typeArg,
// in boolean canBubbleArg, in boolean cancelableArg, in DOMString keyArg,
// in DOMString oldValueArg, in DOMString newValueArg,
// in DOMString urlArg, Storage storageAreaArg);
const AtomicString& interfaceName() const override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment