OLD | NEW |
1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 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 #include "config.h" | 5 #include "config.h" |
6 #include "web/PopupMenuImpl.h" | 6 #include "web/PopupMenuImpl.h" |
7 | 7 |
8 #include "core/HTMLNames.h" | 8 #include "core/HTMLNames.h" |
9 #include "core/css/CSSFontSelector.h" | 9 #include "core/css/CSSFontSelector.h" |
10 #include "core/dom/ElementTraversal.h" | 10 #include "core/dom/ElementTraversal.h" |
(...skipping 22 matching lines...) Expand all Loading... |
33 public: | 33 public: |
34 static PassRefPtrWillBeRawPtr<PopupMenuCSSFontSelector> create(Document* doc
ument, CSSFontSelector* ownerFontSelector) | 34 static PassRefPtrWillBeRawPtr<PopupMenuCSSFontSelector> create(Document* doc
ument, CSSFontSelector* ownerFontSelector) |
35 { | 35 { |
36 return adoptRefWillBeNoop(new PopupMenuCSSFontSelector(document, ownerFo
ntSelector)); | 36 return adoptRefWillBeNoop(new PopupMenuCSSFontSelector(document, ownerFo
ntSelector)); |
37 } | 37 } |
38 | 38 |
39 ~PopupMenuCSSFontSelector(); | 39 ~PopupMenuCSSFontSelector(); |
40 | 40 |
41 // We don't override willUseFontData() for now because the old PopupListBox | 41 // We don't override willUseFontData() for now because the old PopupListBox |
42 // only worked with fonts loaded when opening the popup. | 42 // only worked with fonts loaded when opening the popup. |
43 virtual PassRefPtr<FontData> getFontData(const FontDescription&, const Atomi
cString&) override; | 43 PassRefPtr<FontData> getFontData(const FontDescription&, const AtomicString&
) override; |
44 | 44 |
45 DECLARE_VIRTUAL_TRACE(); | 45 DECLARE_VIRTUAL_TRACE(); |
46 | 46 |
47 private: | 47 private: |
48 PopupMenuCSSFontSelector(Document*, CSSFontSelector*); | 48 PopupMenuCSSFontSelector(Document*, CSSFontSelector*); |
49 | 49 |
50 virtual void fontsNeedUpdate(CSSFontSelector*) override; | 50 void fontsNeedUpdate(CSSFontSelector*) override; |
51 | 51 |
52 RefPtrWillBeMember<CSSFontSelector> m_ownerFontSelector; | 52 RefPtrWillBeMember<CSSFontSelector> m_ownerFontSelector; |
53 }; | 53 }; |
54 | 54 |
55 PopupMenuCSSFontSelector::PopupMenuCSSFontSelector(Document* document, CSSFontSe
lector* ownerFontSelector) | 55 PopupMenuCSSFontSelector::PopupMenuCSSFontSelector(Document* document, CSSFontSe
lector* ownerFontSelector) |
56 : CSSFontSelector(document) | 56 : CSSFontSelector(document) |
57 , m_ownerFontSelector(ownerFontSelector) | 57 , m_ownerFontSelector(ownerFontSelector) |
58 { | 58 { |
59 m_ownerFontSelector->registerForInvalidationCallbacks(this); | 59 m_ownerFontSelector->registerForInvalidationCallbacks(this); |
60 } | 60 } |
(...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
468 | 468 |
469 void PopupMenuImpl::disconnectClient() | 469 void PopupMenuImpl::disconnectClient() |
470 { | 470 { |
471 m_client = nullptr; | 471 m_client = nullptr; |
472 // Cannot be done during finalization, so instead done when the | 472 // Cannot be done during finalization, so instead done when the |
473 // layout object is destroyed and disconnected. | 473 // layout object is destroyed and disconnected. |
474 dispose(); | 474 dispose(); |
475 } | 475 } |
476 | 476 |
477 } // namespace blink | 477 } // namespace blink |
OLD | NEW |