Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Side by Side Diff: third_party/WebKit/Source/platform/testing/FakeDisplayItemClient.h

Issue 2803613002: Rewrite references to "wtf/" to "platform/wtf/" in platform/testing. (Closed)
Patch Set: Fix compile error. (Why did this work before?) Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 FakeDisplayItemClient_h 5 #ifndef FakeDisplayItemClient_h
6 #define FakeDisplayItemClient_h 6 #define FakeDisplayItemClient_h
7 7
8 #include "platform/geometry/LayoutRect.h" 8 #include "platform/geometry/LayoutRect.h"
9 #include "wtf/Forward.h" 9 #include "platform/wtf/Forward.h"
10 10
11 namespace blink { 11 namespace blink {
12 12
13 // A simple DisplayItemClient implementation suitable for use in unit tests. 13 // A simple DisplayItemClient implementation suitable for use in unit tests.
14 class FakeDisplayItemClient : public DisplayItemClient { 14 class FakeDisplayItemClient : public DisplayItemClient {
15 public: 15 public:
16 FakeDisplayItemClient(const String& name = "FakeDisplayItemClient", 16 FakeDisplayItemClient(const String& name = "FakeDisplayItemClient",
17 const LayoutRect& visualRect = LayoutRect()) 17 const LayoutRect& visualRect = LayoutRect())
18 : m_name(name), m_visualRect(visualRect) {} 18 : m_name(name), m_visualRect(visualRect) {}
19 19
20 String debugName() const final { return m_name; } 20 String debugName() const final { return m_name; }
21 LayoutRect visualRect() const override { return m_visualRect; } 21 LayoutRect visualRect() const override { return m_visualRect; }
22 22
23 void setVisualRect(const LayoutRect& r) { m_visualRect = r; } 23 void setVisualRect(const LayoutRect& r) { m_visualRect = r; }
24 24
25 // This simulates a paint without needing a PaintController. 25 // This simulates a paint without needing a PaintController.
26 void updateCacheGeneration() { 26 void updateCacheGeneration() {
27 setDisplayItemsCached(CacheGenerationOrInvalidationReason::next()); 27 setDisplayItemsCached(CacheGenerationOrInvalidationReason::next());
28 } 28 }
29 29
30 private: 30 private:
31 String m_name; 31 String m_name;
32 LayoutRect m_visualRect; 32 LayoutRect m_visualRect;
33 }; 33 };
34 34
35 } // namespace blink 35 } // namespace blink
36 36
37 #endif // FakeDisplayItemClient_h 37 #endif // FakeDisplayItemClient_h
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/platform/testing/DEPS ('k') | third_party/WebKit/Source/platform/testing/FontTestHelpers.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698