Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef MockFontResourceClient_h | |
| 6 #define MockFontResourceClient_h | |
| 7 | |
| 8 #include "core/fetch/FontResource.h" | |
|
yhirano
2016/11/17 07:30:48
#include "core/fetch/Resource.h"
Takashi Toyoshima
2016/11/17 10:18:09
Done.
| |
| 9 #include "platform/heap/Handle.h" | |
|
yhirano
2016/11/17 07:30:47
#include "wtf/text/WTFString.h"
Takashi Toyoshima
2016/11/17 10:18:09
Done.
| |
| 10 | |
| 11 namespace blink { | |
| 12 | |
| 13 class MockFontResourceClient final | |
| 14 : public GarbageCollectedFinalized<MockFontResourceClient>, | |
| 15 public FontResourceClient { | |
| 16 USING_PRE_FINALIZER(MockFontResourceClient, dispose); | |
| 17 USING_GARBAGE_COLLECTED_MIXIN(MockFontResourceClient); | |
| 18 | |
| 19 public: | |
| 20 explicit MockFontResourceClient(Resource*); | |
| 21 ~MockFontResourceClient() override; | |
| 22 | |
| 23 void fontLoadShortLimitExceeded(FontResource*) override; | |
| 24 void fontLoadLongLimitExceeded(FontResource*) override; | |
| 25 | |
| 26 bool fontLoadShortLimitExceededCalled() const { | |
| 27 return m_fontLoadShortLimitExceededCalled; | |
| 28 } | |
| 29 | |
| 30 bool fontLoadLongLimitExceededCalled() const { | |
| 31 return m_fontLoadLongLimitExceededCalled; | |
| 32 } | |
| 33 | |
| 34 DEFINE_INLINE_TRACE() { | |
| 35 visitor->trace(m_resource); | |
| 36 FontResourceClient::trace(visitor); | |
| 37 } | |
| 38 | |
| 39 String debugName() const override { return "MockFontResourceClient"; } | |
| 40 | |
| 41 private: | |
| 42 void dispose(); | |
| 43 | |
| 44 Member<Resource> m_resource; | |
| 45 bool m_fontLoadShortLimitExceededCalled; | |
| 46 bool m_fontLoadLongLimitExceededCalled; | |
| 47 }; | |
| 48 | |
| 49 } // namespace blink | |
| 50 | |
| 51 #endif // MockFontResourceClient_h | |
| OLD | NEW |