| Index: Source/modules/serviceworkers/ServiceWorkerError.h
|
| diff --git a/Source/core/html/ime/Composition.h b/Source/modules/serviceworkers/ServiceWorkerError.h
|
| similarity index 69%
|
| copy from Source/core/html/ime/Composition.h
|
| copy to Source/modules/serviceworkers/ServiceWorkerError.h
|
| index 43054668f0d17b4911e7af24a0db6f0606a7e868..1c29ea5e6db1d1b5459ab751ed7441e10195238b 100644
|
| --- a/Source/core/html/ime/Composition.h
|
| +++ b/Source/modules/serviceworkers/ServiceWorkerError.h
|
| @@ -28,36 +28,32 @@
|
| * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
| */
|
|
|
| -#ifndef Composition_h
|
| -#define Composition_h
|
| +#ifndef ServiceWorkerError_h
|
| +#define ServiceWorkerError_h
|
|
|
| -#include "bindings/v8/ScriptWrappable.h"
|
| +#include "core/dom/DOMError.h"
|
| +#include "public/platform/WebServiceWorkerError.h"
|
| #include "wtf/PassOwnPtr.h"
|
| -#include "wtf/text/WTFString.h"
|
|
|
| namespace WebCore {
|
|
|
| -class InputMethodContext;
|
| -
|
| -class Composition : public ScriptWrappable {
|
| +class ServiceWorkerError {
|
| public:
|
| - static PassOwnPtr<Composition> create(InputMethodContext*);
|
| - ~Composition();
|
| -
|
| - void ref();
|
| - void deref();
|
| -
|
| - String text() const;
|
| - int selectionStart() const;
|
| - int selectionEnd() const;
|
| - const Vector<unsigned>& getSegments() const;
|
| + // For CallbackPromiseAdapter
|
| + typedef WebKit::WebServiceWorkerError WebType;
|
| + static PassRefPtr<DOMError> from(WebType* webErrorRaw)
|
| + {
|
| + OwnPtr<WebType> webError = adoptPtr(webErrorRaw);
|
| + RefPtr<DOMError> error = DOMError::create(errorString(webError->errorType), webError->message);
|
| + return error.release();
|
| + }
|
|
|
| private:
|
| - explicit Composition(InputMethodContext*);
|
| -
|
| - InputMethodContext* m_inputMethodContext;
|
| + static String errorString(WebKit::WebServiceWorkerError::ErrorType);
|
| + WTF_MAKE_NONCOPYABLE(ServiceWorkerError);
|
| + ServiceWorkerError() WTF_DELETED_FUNCTION;
|
| };
|
|
|
| } // namespace WebCore
|
|
|
| -#endif // Composition_h
|
| +#endif // ServiceWorkerError_h
|
|
|