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) { ...@@ -50,9 +50,9 @@ void Presentation::setDefaultRequest(PresentationRequest* request) {
PresentationReceiver* Presentation::receiver() { PresentationReceiver* Presentation::receiver() {
PresentationController* controller = PresentationController::from(*frame()); PresentationController* controller = PresentationController::from(*frame());
auto* client = controller ? controller->client() : nullptr; auto* client = controller ? controller->client() : nullptr;
// TODO(crbug.com/647296): only return something if the Blink instance is running in // TODO(crbug.com/647296): only return something if the Blink instance is
// presentation receiver mode. The flag PresentationReceiver could be used // running in presentation receiver mode. The flag PresentationReceiver could
// for that. // be used for that.
if (!m_receiver) if (!m_receiver)
m_receiver = new PresentationReceiver(frame(), client); m_receiver = new PresentationReceiver(frame(), client);
return m_receiver; return m_receiver;
......
...@@ -16,8 +16,10 @@ class LocalFrame; ...@@ -16,8 +16,10 @@ class LocalFrame;
class PresentationReceiver; class PresentationReceiver;
class PresentationRequest; class PresentationRequest;
// Implements the main entry point of the Presentation API corresponding to the Presentation.idl // Implements the main entry point of the Presentation API corresponding to the
// See https://w3c.github.io/presentation-api/#navigatorpresentation for details. // Presentation.idl
// See https://w3c.github.io/presentation-api/#navigatorpresentation for
// details.
class Presentation final : public GarbageCollected<Presentation>, class Presentation final : public GarbageCollected<Presentation>,
public ScriptWrappable, public ScriptWrappable,
public DOMWindowProperty { public DOMWindowProperty {
......
...@@ -73,7 +73,8 @@ class PresentationConnection final : public EventTargetWithInlineData, ...@@ -73,7 +73,8 @@ class PresentationConnection final : public EventTargetWithInlineData,
DEFINE_ATTRIBUTE_EVENT_LISTENER(close); DEFINE_ATTRIBUTE_EVENT_LISTENER(close);
DEFINE_ATTRIBUTE_EVENT_LISTENER(terminate); 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; bool matches(WebPresentationConnectionClient*) const;
// Notifies the connection about its state change. // Notifies the connection about its state change.
......
...@@ -14,8 +14,8 @@ ...@@ -14,8 +14,8 @@
namespace blink { namespace blink {
// Implements the PresentationConnectionList interface from the Presentation API from // Implements the PresentationConnectionList interface from the Presentation API
// which represents set of presentation connections in the set of // from which represents set of presentation connections in the set of
// presentation controllers. // presentation controllers.
class MODULES_EXPORT PresentationConnectionList final class MODULES_EXPORT PresentationConnectionList final
: public EventTargetWithInlineData, : public EventTargetWithInlineData,
......
...@@ -14,7 +14,8 @@ namespace blink { ...@@ -14,7 +14,8 @@ namespace blink {
class DOMException; class DOMException;
class ScriptPromiseResolver; 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 { class PresentationError final {
STATIC_ONLY(PresentationError); STATIC_ONLY(PresentationError);
......
...@@ -47,7 +47,8 @@ void DeprecatedStorageInfo::queryUsageAndQuota( ...@@ -47,7 +47,8 @@ void DeprecatedStorageInfo::queryUsageAndQuota(
int storageType, int storageType,
StorageUsageCallback* successCallback, StorageUsageCallback* successCallback,
StorageErrorCallback* errorCallback) { 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); DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType);
if (!storageQuota) { if (!storageQuota) {
// Unknown storage type is requested. // Unknown storage type is requested.
...@@ -65,7 +66,8 @@ void DeprecatedStorageInfo::requestQuota(ExecutionContext* executionContext, ...@@ -65,7 +66,8 @@ void DeprecatedStorageInfo::requestQuota(ExecutionContext* executionContext,
unsigned long long newQuotaInBytes, unsigned long long newQuotaInBytes,
StorageQuotaCallback* successCallback, StorageQuotaCallback* successCallback,
StorageErrorCallback* errorCallback) { 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); DeprecatedStorageQuota* storageQuota = getStorageQuota(storageType);
if (!storageQuota) { if (!storageQuota) {
// Unknown storage type is requested. // Unknown storage type is requested.
......
...@@ -65,11 +65,12 @@ ScriptPromise RemotePlayback::getAvailability(ScriptState* scriptState) { ...@@ -65,11 +65,12 @@ ScriptPromise RemotePlayback::getAvailability(ScriptState* scriptState) {
ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState); ScriptPromiseResolver* resolver = ScriptPromiseResolver::create(scriptState);
ScriptPromise promise = resolver->promise(); ScriptPromise promise = resolver->promise();
// TODO(avayvod): currently the availability is tracked for each media element // 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 // as soon as it's created, we probably want to limit that to when the
// is visible (see https://crbug.com/597281) and has default controls. If there's // page/element is visible (see https://crbug.com/597281) and has default
// no default controls, we should also start tracking availability on demand // controls. If there are no default controls, we should also start tracking
// meaning the Promise returned by getAvailability() will be resolved asynchronously. // availability on demand meaning the Promise returned by getAvailability()
// will be resolved asynchronously.
RemotePlaybackAvailability* availability = RemotePlaybackAvailability* availability =
RemotePlaybackAvailability::take(resolver, m_availability); RemotePlaybackAvailability::take(resolver, m_availability);
m_availabilityObjects.append(availability); m_availabilityObjects.append(availability);
......
...@@ -15,7 +15,8 @@ ...@@ -15,7 +15,8 @@
#include "modules/screen_orientation/ScreenOrientationController.h" #include "modules/screen_orientation/ScreenOrientationController.h"
#include "public/platform/modules/screen_orientation/WebScreenOrientationType.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) \ #define STATIC_ASSERT_ENUM(a, b) \
static_assert(static_cast<int>(a) == static_cast<int>(b), \ static_assert(static_cast<int>(a) == static_cast<int>(b), \
"mismatching enum: " #a) "mismatching enum: " #a)
......
...@@ -49,13 +49,14 @@ const char* ScreenOrientationController::supplementName() { ...@@ -49,13 +49,14 @@ const char* ScreenOrientationController::supplementName() {
return "ScreenOrientationController"; 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( WebScreenOrientationType ScreenOrientationController::computeOrientation(
const IntRect& rect, const IntRect& rect,
uint16_t rotation) { uint16_t rotation) {
// Bypass orientation detection in layout tests to get consistent results. // 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 // FIXME: The screen dimension should be fixed when running the layout tests
// issues. // to avoid such issues.
if (LayoutTestSupport::isRunningLayoutTest()) if (LayoutTestSupport::isRunningLayoutTest())
return WebScreenOrientationPortraitPrimary; return WebScreenOrientationPortraitPrimary;
...@@ -89,7 +90,8 @@ void ScreenOrientationController::updateOrientation() { ...@@ -89,7 +90,8 @@ void ScreenOrientationController::updateOrientation() {
WebScreenInfo screenInfo = chromeClient.screenInfo(); WebScreenInfo screenInfo = chromeClient.screenInfo();
WebScreenOrientationType orientationType = screenInfo.orientationType; WebScreenOrientationType orientationType = screenInfo.orientationType;
if (orientationType == WebScreenOrientationUndefined) { 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, orientationType = computeOrientation(chromeClient.screenInfo().rect,
screenInfo.orientationAngle); screenInfo.orientationAngle);
} }
......
...@@ -17,8 +17,8 @@ namespace blink { ...@@ -17,8 +17,8 @@ namespace blink {
// - for 'CONTINUOUS' mode the polling function is invoked periodically // - for 'CONTINUOUS' mode the polling function is invoked periodically
// with the given polling period (on timer event). // with the given polling period (on timer event).
// - for 'ONCHANGE' mode the polling function is invoked only after client // - for 'ONCHANGE' mode the polling function is invoked only after client
// calls 'onSensorReadingChanged()' however considering the given polling period: // calls 'onSensorReadingChanged()' however considering the given polling
// guaranteed not to be called more often than expected. // period: guaranteed not to be called more often than expected.
class SensorPollingStrategy { class SensorPollingStrategy {
public: public:
static std::unique_ptr<SensorPollingStrategy> create( static std::unique_ptr<SensorPollingStrategy> create(
......
...@@ -43,10 +43,10 @@ void DOMWindowStorageController::didAddEventListener( ...@@ -43,10 +43,10 @@ void DOMWindowStorageController::didAddEventListener(
LocalDOMWindow* window, LocalDOMWindow* window,
const AtomicString& eventType) { const AtomicString& eventType) {
if (eventType == EventTypeNames::storage) { if (eventType == EventTypeNames::storage) {
// Creating these blink::Storage objects informs the system that we'd like to receive // Creating these blink::Storage objects informs the system that we'd like
// notifications about storage events that might be triggered in other processes. Rather // to receive notifications about storage events that might be triggered in
// than subscribe to these notifications explicitly, we subscribe to them implicitly to // other processes. Rather than subscribe to these notifications explicitly,
// simplify the work done by the system. // we subscribe to them implicitly to simplify the work done by the system.
DOMWindowStorage::from(*window).localStorage(IGNORE_EXCEPTION); DOMWindowStorage::from(*window).localStorage(IGNORE_EXCEPTION);
DOMWindowStorage::from(*window).sessionStorage(IGNORE_EXCEPTION); DOMWindowStorage::from(*window).sessionStorage(IGNORE_EXCEPTION);
} }
......
...@@ -169,7 +169,8 @@ void StorageArea::dispatchLocalStorageEvent( ...@@ -169,7 +169,8 @@ void StorageArea::dispatchLocalStorageEvent(
for (Page* page : Page::ordinaryPages()) { for (Page* page : Page::ordinaryPages()) {
for (Frame* frame = page->mainFrame(); frame; for (Frame* frame = page->mainFrame(); frame;
frame = frame->tree().traverseNext()) { 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()) if (!frame->isLocalFrame())
continue; continue;
LocalFrame* localFrame = toLocalFrame(frame); LocalFrame* localFrame = toLocalFrame(frame);
...@@ -219,7 +220,8 @@ void StorageArea::dispatchSessionStorageEvent( ...@@ -219,7 +220,8 @@ void StorageArea::dispatchSessionStorageEvent(
for (Frame* frame = page->mainFrame(); frame; for (Frame* frame = page->mainFrame(); frame;
frame = frame->tree().traverseNext()) { 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()) if (!frame->isLocalFrame())
continue; continue;
LocalFrame* localFrame = toLocalFrame(frame); LocalFrame* localFrame = toLocalFrame(frame);
......
...@@ -65,7 +65,10 @@ class StorageEvent final : public Event { ...@@ -65,7 +65,10 @@ class StorageEvent final : public Event {
Storage* storageArea); Storage* storageArea);
// Needed once we support init<blank>EventNS // 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; 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