#include "third_party/blink/renderer/modules/awc/additional_windowing_controls.h"
#include "third_party/blink/public/mojom/frame/frame.mojom-blink.h"
#include "third_party/blink/public/mojom/permissions/permission.mojom-blink.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise.h"
#include "third_party/blink/renderer/bindings/core/v8/script_promise_resolver.h"
#include "third_party/blink/renderer/bindings/core/v8/v8_throw_dom_exception.h"
#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/core/frame/local_frame.h"
#include "third_party/blink/renderer/core/page/chrome_client.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/platform/bindings/exception_state.h"
#include "third_party/blink/renderer/platform/bindings/script_state.h"
namespace blink {
PermissionDescriptor;
PermissionDescriptorPtr;
PermissionName;
namespace {
AdditionalWindowingControlsActionCallback;
bool IsPermissionGranted(ScriptPromiseResolver<IDLUndefined>* resolver,
mojom::blink::PermissionStatus status) { … }
bool CanUseWindowingControls(LocalDOMWindow* window,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> MaybePromptWindowManagementPermission(
LocalDOMWindow* window,
ScriptPromiseResolver<IDLUndefined>* resolver,
AdditionalWindowingControlsActionCallback callback) { … }
void OnMaximizePermissionRequestComplete(
ScriptPromiseResolver<IDLUndefined>* resolver,
LocalDOMWindow* window,
mojom::blink::PermissionStatus status) { … }
void OnMinimizePermissionRequestComplete(
ScriptPromiseResolver<IDLUndefined>* resolver,
LocalDOMWindow* window,
mojom::blink::PermissionStatus status) { … }
void OnRestorePermissionRequestComplete(
ScriptPromiseResolver<IDLUndefined>* resolver,
LocalDOMWindow* window,
mojom::blink::PermissionStatus status) { … }
void OnSetResizablePermissionRequestComplete(
ScriptPromiseResolver<IDLUndefined>* resolver,
LocalDOMWindow* window,
bool resizable,
mojom::blink::PermissionStatus status) { … }
}
ScriptPromise<IDLUndefined> AdditionalWindowingControls::maximize(
ScriptState* script_state,
LocalDOMWindow& window,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> AdditionalWindowingControls::minimize(
ScriptState* script_state,
LocalDOMWindow& window,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> AdditionalWindowingControls::restore(
ScriptState* script_state,
LocalDOMWindow& window,
ExceptionState& exception_state) { … }
ScriptPromise<IDLUndefined> AdditionalWindowingControls::setResizable(
ScriptState* script_state,
LocalDOMWindow& window,
bool resizable,
ExceptionState& exception_state) { … }
}