| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 | 4 |
| 5 #ifndef HitRegion_h | 5 #ifndef HitRegion_h |
| 6 #define HitRegion_h | 6 #define HitRegion_h |
| 7 | 7 |
| 8 #include "bindings/core/v8/Dictionary.h" | 8 #include "bindings/core/v8/Dictionary.h" |
| 9 #include "core/dom/Element.h" | 9 #include "core/dom/Element.h" |
| 10 #include "platform/graphics/Path.h" | 10 #include "platform/graphics/Path.h" |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 | 50 |
| 51 private: | 51 private: |
| 52 explicit HitRegion(const HitRegionOptions&); | 52 explicit HitRegion(const HitRegionOptions&); |
| 53 | 53 |
| 54 String m_id; | 54 String m_id; |
| 55 RefPtr<Element> m_control; | 55 RefPtr<Element> m_control; |
| 56 Path m_path; | 56 Path m_path; |
| 57 WindRule m_fillRule; | 57 WindRule m_fillRule; |
| 58 }; | 58 }; |
| 59 | 59 |
| 60 class HitRegionManager final : public DummyBase<HitRegionManager> { | 60 class HitRegionManager final { |
| 61 WTF_MAKE_NONCOPYABLE(HitRegionManager); | 61 WTF_MAKE_NONCOPYABLE(HitRegionManager); |
| 62 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(HitRegionManager) | 62 DECLARE_EMPTY_DESTRUCTOR_WILL_BE_REMOVED(HitRegionManager) |
| 63 public: | 63 public: |
| 64 static PassOwnPtr<HitRegionManager> create() { return adoptPtr(new HitRegion
Manager()); } | 64 static PassOwnPtr<HitRegionManager> create() { return adoptPtr(new HitRegion
Manager()); } |
| 65 | 65 |
| 66 void addHitRegion(PassRefPtr<HitRegion>); | 66 void addHitRegion(PassRefPtr<HitRegion>); |
| 67 | 67 |
| 68 void removeHitRegion(HitRegion*); | 68 void removeHitRegion(HitRegion*); |
| 69 void removeHitRegionById(const String& id); | 69 void removeHitRegionById(const String& id); |
| 70 void removeHitRegionByControl(Element*); | 70 void removeHitRegionByControl(Element*); |
| (...skipping 17 matching lines...) Expand all Loading... |
| 88 typedef HashMap<RefPtr<Element>, RefPtr<HitRegion> > HitRegionControlMap; | 88 typedef HashMap<RefPtr<Element>, RefPtr<HitRegion> > HitRegionControlMap; |
| 89 | 89 |
| 90 HitRegionList m_hitRegionList; | 90 HitRegionList m_hitRegionList; |
| 91 HitRegionIdMap m_hitRegionIdMap; | 91 HitRegionIdMap m_hitRegionIdMap; |
| 92 HitRegionControlMap m_hitRegionControlMap; | 92 HitRegionControlMap m_hitRegionControlMap; |
| 93 }; | 93 }; |
| 94 | 94 |
| 95 } // namespace blink | 95 } // namespace blink |
| 96 | 96 |
| 97 #endif | 97 #endif |
| OLD | NEW |