| 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 17 matching lines...) Expand all Loading... |
| 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| 29 */ | 29 */ |
| 30 | 30 |
| 31 #ifndef ContextFeaturesClientImpl_h | 31 #ifndef ContextFeaturesClientImpl_h |
| 32 #define ContextFeaturesClientImpl_h | 32 #define ContextFeaturesClientImpl_h |
| 33 | 33 |
| 34 #include <memory> | 34 #include <memory> |
| 35 | 35 |
| 36 #include "core/CoreExport.h" | 36 #include "core/CoreExport.h" |
| 37 #include "core/dom/ContextFeatures.h" | 37 #include "core/dom/ContextFeatures.h" |
| 38 #include "wtf/PtrUtil.h" | 38 #include "platform/wtf/PtrUtil.h" |
| 39 | 39 |
| 40 namespace blink { | 40 namespace blink { |
| 41 | 41 |
| 42 class CORE_EXPORT ContextFeaturesClientImpl final | 42 class CORE_EXPORT ContextFeaturesClientImpl final |
| 43 : public NON_EXPORTED_BASE(ContextFeaturesClient) { | 43 : public NON_EXPORTED_BASE(ContextFeaturesClient) { |
| 44 public: | 44 public: |
| 45 static std::unique_ptr<ContextFeaturesClientImpl> Create() { | 45 static std::unique_ptr<ContextFeaturesClientImpl> Create() { |
| 46 return WTF::WrapUnique(new ContextFeaturesClientImpl()); | 46 return WTF::WrapUnique(new ContextFeaturesClientImpl()); |
| 47 } | 47 } |
| 48 | 48 |
| 49 bool IsEnabled(Document*, | 49 bool IsEnabled(Document*, |
| 50 ContextFeatures::FeatureType, | 50 ContextFeatures::FeatureType, |
| 51 bool default_value) override; | 51 bool default_value) override; |
| 52 void UrlDidChange(Document*) override; | 52 void UrlDidChange(Document*) override; |
| 53 | 53 |
| 54 private: | 54 private: |
| 55 ContextFeaturesClientImpl() {} | 55 ContextFeaturesClientImpl() {} |
| 56 | 56 |
| 57 bool AskIfIsEnabled(Document*, | 57 bool AskIfIsEnabled(Document*, |
| 58 ContextFeatures::FeatureType, | 58 ContextFeatures::FeatureType, |
| 59 bool default_value); | 59 bool default_value); |
| 60 }; | 60 }; |
| 61 | 61 |
| 62 } // namespace blink | 62 } // namespace blink |
| 63 | 63 |
| 64 #endif // ContextFeaturesClientImpl_h | 64 #endif // ContextFeaturesClientImpl_h |
| OLD | NEW |