blob: 0c5344523bcc2f051af350100da762be3db00822 [file] [log] [blame]
// Copyright 2022 The Cobalt Authors. All Rights Reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#ifndef COBALT_WORKER_ABSTRACT_WORKER_H_
#define COBALT_WORKER_ABSTRACT_WORKER_H_
#include "cobalt/dom/event_target.h"
#include "cobalt/dom/event_target_listener_info.h"
#include "cobalt/script/environment_settings.h"
namespace cobalt {
namespace worker {
// Implementation of Abstract Worker.
// https://html.spec.whatwg.org/commit-snapshots/465a6b672c703054de278b0f8133eb3ad33d93f4/#abstractworker
class AbstractWorker {
public:
virtual const dom::EventTargetListenerInfo::EventListenerScriptValue*
onerror() const = 0;
virtual void set_onerror(
const dom::EventTargetListenerInfo::EventListenerScriptValue&
event_listener) = 0;
protected:
virtual ~AbstractWorker() {}
};
} // namespace worker
} // namespace cobalt
#endif // COBALT_WORKER_ABSTRACT_WORKER_H_