| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2012 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 #ifndef SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_ | 31 #ifndef SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_ |
| 32 #define SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_ | 32 #define SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_ |
| 33 | 33 |
| 34 #include "sky/engine/public/platform/WebCommon.h" | 34 #include "sky/engine/public/platform/WebCommon.h" |
| 35 #include "sky/engine/public/platform/WebData.h" | 35 #include "sky/engine/public/platform/WebData.h" |
| 36 #include "sky/engine/public/platform/WebGestureDevice.h" | 36 #include "sky/engine/public/platform/WebGestureDevice.h" |
| 37 #include "sky/engine/public/platform/WebGraphicsContext3D.h" | 37 #include "sky/engine/public/platform/WebGraphicsContext3D.h" |
| 38 #include "sky/engine/public/platform/WebLocalizedString.h" | 38 #include "sky/engine/public/platform/WebLocalizedString.h" |
| 39 #include "sky/engine/public/platform/WebString.h" | 39 #include "sky/engine/public/platform/WebString.h" |
| 40 #include "sky/engine/public/platform/WebURLError.h" | |
| 41 #include "sky/engine/public/platform/WebVector.h" | 40 #include "sky/engine/public/platform/WebVector.h" |
| 42 | 41 |
| 43 class GrContext; | 42 class GrContext; |
| 44 | 43 |
| 45 namespace base { | 44 namespace base { |
| 46 class SingleThreadTaskRunner; | 45 class SingleThreadTaskRunner; |
| 47 } | 46 } |
| 48 | 47 |
| 49 namespace mojo { | 48 namespace mojo { |
| 50 class NetworkService; | 49 class NetworkService; |
| 51 } | 50 } |
| 52 | 51 |
| 53 namespace blink { | 52 namespace blink { |
| 54 | 53 |
| 55 class WebBlobRegistry; | 54 class WebBlobRegistry; |
| 56 class WebClipboard; | 55 class WebClipboard; |
| 57 class WebDiscardableMemory; | 56 class WebDiscardableMemory; |
| 58 class WebFallbackThemeEngine; | 57 class WebFallbackThemeEngine; |
| 59 class WebGraphicsContext3DProvider; | 58 class WebGraphicsContext3DProvider; |
| 60 class WebSandboxSupport; | 59 class WebSandboxSupport; |
| 61 struct WebFloatPoint; | 60 struct WebFloatPoint; |
| 62 class WebURL; | 61 class WebURL; |
| 63 class WebURLLoader; | |
| 64 class WebUnitTestSupport; | 62 class WebUnitTestSupport; |
| 65 struct WebLocalizedString; | 63 struct WebLocalizedString; |
| 66 struct WebSize; | 64 struct WebSize; |
| 67 | 65 |
| 68 class Platform { | 66 class Platform { |
| 69 public: | 67 public: |
| 70 // HTML5 Database ------------------------------------------------------ | 68 // HTML5 Database ------------------------------------------------------ |
| 71 typedef int FileHandle; | 69 typedef int FileHandle; |
| 72 | 70 |
| 73 BLINK_PLATFORM_EXPORT static void initialize(Platform*); | 71 BLINK_PLATFORM_EXPORT static void initialize(Platform*); |
| (...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 static const size_t noDecodedImageByteLimit = static_cast<size_t>(-1); | 142 static const size_t noDecodedImageByteLimit = static_cast<size_t>(-1); |
| 145 | 143 |
| 146 // Returns the maximum amount of memory a decoded image should be allowed. | 144 // Returns the maximum amount of memory a decoded image should be allowed. |
| 147 // See comments on ImageDecoder::m_maxDecodedBytes. | 145 // See comments on ImageDecoder::m_maxDecodedBytes. |
| 148 virtual size_t maxDecodedImageBytes() { return noDecodedImageByteLimit; } | 146 virtual size_t maxDecodedImageBytes() { return noDecodedImageByteLimit; } |
| 149 | 147 |
| 150 // Network ------------------------------------------------------------- | 148 // Network ------------------------------------------------------------- |
| 151 | 149 |
| 152 virtual mojo::NetworkService* networkService() { return 0; } | 150 virtual mojo::NetworkService* networkService() { return 0; } |
| 153 | 151 |
| 154 // Returns a new WebURLLoader instance. | |
| 155 virtual WebURLLoader* createURLLoader() { return 0; } | |
| 156 | |
| 157 // A suggestion to cache this metadata in association with this URL. | 152 // A suggestion to cache this metadata in association with this URL. |
| 158 virtual void cacheMetadata(const WebURL&, double responseTime, const char* d
ata, size_t dataSize) { } | 153 virtual void cacheMetadata(const WebURL&, double responseTime, const char* d
ata, size_t dataSize) { } |
| 159 | 154 |
| 160 virtual WebURLError cancelledError(const WebURL&) const { return WebURLError
(); } | |
| 161 | |
| 162 // Resources ----------------------------------------------------------- | 155 // Resources ----------------------------------------------------------- |
| 163 | 156 |
| 164 // Returns a localized string resource (with substitution parameters). | 157 // Returns a localized string resource (with substitution parameters). |
| 165 virtual WebString queryLocalizedString(WebLocalizedString::Name) { return We
bString(); } | 158 virtual WebString queryLocalizedString(WebLocalizedString::Name) { return We
bString(); } |
| 166 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt
ring& parameter) { return WebString(); } | 159 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt
ring& parameter) { return WebString(); } |
| 167 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt
ring& parameter1, const WebString& parameter2) { return WebString(); } | 160 virtual WebString queryLocalizedString(WebLocalizedString::Name, const WebSt
ring& parameter1, const WebString& parameter2) { return WebString(); } |
| 168 | 161 |
| 169 | 162 |
| 170 // Profiling ----------------------------------------------------------- | 163 // Profiling ----------------------------------------------------------- |
| 171 | 164 |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 238 // This value must be checked again after a context loss event as the platfo
rm's capabilities may have changed. | 231 // This value must be checked again after a context loss event as the platfo
rm's capabilities may have changed. |
| 239 virtual bool canAccelerate2dCanvas() { return false; } | 232 virtual bool canAccelerate2dCanvas() { return false; } |
| 240 | 233 |
| 241 protected: | 234 protected: |
| 242 virtual ~Platform() { } | 235 virtual ~Platform() { } |
| 243 }; | 236 }; |
| 244 | 237 |
| 245 } // namespace blink | 238 } // namespace blink |
| 246 | 239 |
| 247 #endif // SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_ | 240 #endif // SKY_ENGINE_PUBLIC_PLATFORM_PLATFORM_H_ |
| OLD | NEW |