| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 // | |
| 5 // This is a port of ManifestParser.h from WebKit/WebCore/loader/appcache. | |
| 6 | 4 |
| 7 /* | 5 /* |
| 8 * Copyright (C) 2008 Apple Inc. All Rights Reserved. | 6 * Copyright (C) 2010 Google Inc. All Rights Reserved. |
| 9 * | 7 * |
| 10 * Redistribution and use in source and binary forms, with or without | 8 * Redistribution and use in source and binary forms, with or without |
| 11 * modification, are permitted provided that the following conditions | 9 * modification, are permitted provided that the following conditions |
| 12 * are met: | 10 * are met: |
| 13 * 1. Redistributions of source code must retain the above copyright | 11 * 1. Redistributions of source code must retain the above copyright |
| 14 * notice, this list of conditions and the following disclaimer. | 12 * notice, this list of conditions and the following disclaimer. |
| 15 * 2. Redistributions in binary form must reproduce the above copyright | 13 * 2. Redistributions in binary form must reproduce the above copyright |
| 16 * notice, this list of conditions and the following disclaimer in the | 14 * notice, this list of conditions and the following disclaimer in the |
| 17 * documentation and/or other materials provided with the distribution. | 15 * documentation and/or other materials provided with the distribution. |
| 18 * | 16 * |
| 19 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY | 17 * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY |
| 20 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | 18 * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| 21 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 19 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR |
| 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR | 20 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR |
| 23 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | 21 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, |
| 24 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | 22 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, |
| 25 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | 23 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR |
| 26 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY | 24 * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY |
| 27 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | 25 * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT |
| 28 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | 26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| 29 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 27 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 30 */ | 28 */ |
| 31 | 29 |
| 32 #ifndef WEBKIT_BROWSER_APPCACHE_MANIFEST_PARSER_H_ | 30 // This implements the WebThemeEngine API in such a way that we match the Mac |
| 33 #define WEBKIT_BROWSER_APPCACHE_MANIFEST_PARSER_H_ | 31 // port rendering more than usual Chromium path, thus allowing us to share |
| 32 // more pixel baselines. |
| 34 | 33 |
| 35 #include <string> | 34 #ifndef WebTestThemeEngineMac_h |
| 36 #include <vector> | 35 #define WebTestThemeEngineMac_h |
| 37 | 36 |
| 38 #include "base/containers/hash_tables.h" | 37 #include "third_party/WebKit/public/platform/WebNonCopyable.h" |
| 39 #include "webkit/browser/webkit_storage_browser_export.h" | 38 #include "third_party/WebKit/public/platform/mac/WebThemeEngine.h" |
| 40 #include "webkit/common/appcache/appcache_interfaces.h" | |
| 41 | 39 |
| 42 class GURL; | 40 namespace WebTestRunner { |
| 43 | 41 |
| 44 namespace appcache { | 42 class WebTestThemeEngineMac : public blink::WebThemeEngine, public blink::WebNon
Copyable { |
| 43 public: |
| 44 virtual ~WebTestThemeEngineMac() { } |
| 45 | 45 |
| 46 struct WEBKIT_STORAGE_BROWSER_EXPORT Manifest { | 46 virtual void paintScrollbarThumb( |
| 47 Manifest(); | 47 blink::WebCanvas*, |
| 48 ~Manifest(); | 48 blink::WebThemeEngine::State, |
| 49 blink::WebThemeEngine::Size, |
| 50 const blink::WebRect&, |
| 51 const blink::WebThemeEngine::ScrollbarInfo&); |
| 49 | 52 |
| 50 base::hash_set<std::string> explicit_urls; | 53 private: |
| 51 NamespaceVector intercept_namespaces; | 54 virtual void paintHIThemeScrollbarThumb( |
| 52 NamespaceVector fallback_namespaces; | 55 blink::WebCanvas*, |
| 53 NamespaceVector online_whitelist_namespaces; | 56 blink::WebThemeEngine::State, |
| 54 bool online_whitelist_all; | 57 blink::WebThemeEngine::Size, |
| 58 const blink::WebRect&, |
| 59 const blink::WebThemeEngine::ScrollbarInfo&); |
| 60 virtual void paintNSScrollerScrollbarThumb( |
| 61 blink::WebCanvas*, |
| 62 blink::WebThemeEngine::State, |
| 63 blink::WebThemeEngine::Size, |
| 64 const blink::WebRect&, |
| 65 const blink::WebThemeEngine::ScrollbarInfo&); |
| 55 }; | 66 }; |
| 56 | 67 |
| 57 WEBKIT_STORAGE_BROWSER_EXPORT bool ParseManifest(const GURL& manifest_url, | 68 } |
| 58 const char* data, | |
| 59 int length, | |
| 60 Manifest& manifest); | |
| 61 | 69 |
| 62 } // namespace appcache | 70 #endif // WebTestThemeEngineMac_h |
| 63 | |
| 64 #endif // WEBKIT_BROWSER_APPCACHE_MANIFEST_PARSER_H_ | |
| OLD | NEW |