Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2017 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 COMPONENTS_VIZ_HIT_TEST_DISPLAY_HIT_TEST_DATA_FACTORY_H_ | |
| 6 #define COMPONENTS_VIZ_HIT_TEST_DISPLAY_HIT_TEST_DATA_FACTORY_H_ | |
| 7 | |
| 8 #include <stdint.h> | |
| 9 | |
| 10 #include <map> | |
| 11 #include <memory> | |
| 12 | |
| 13 #include "components/viz/hit_test/display_hit_test_data.h" | |
| 14 #include "components/viz/hit_test/hit_test_export.h" | |
| 15 | |
| 16 namespace viz { | |
| 17 namespace hit_test { | |
| 18 | |
| 19 class DisplayHitTestDataFactory { | |
| 20 public: | |
| 21 virtual ~DisplayHitTestDataFactory() = default; | |
|
rjkroege
2017/06/15 21:58:44
you'll need to override it anyway so = 0?
gklassen
2017/06/16 21:49:38
Done.
| |
| 22 | |
| 23 // Creates the memory required for a DisplayHitTestData structure. | |
|
rjkroege
2017/06/15 21:58:43
The same pattern of abstract interface permits not
gklassen
2017/06/16 21:49:38
Not sure what this is referring to? ( sorry ).
| |
| 24 // This may use an implementation that allocates local heap memory | |
| 25 // when viz and browser are in the same process and must use an | |
| 26 // implementation that allocates shared memory when they are not. | |
| 27 virtual DisplayHitTestData* Create(int byte_count) = 0; | |
| 28 }; | |
| 29 | |
| 30 } // namespace hit_test | |
| 31 } // namespace viz | |
| 32 | |
| 33 #endif // COMPONENTS_VIZ_HIT_TEST_DISPLAY_HIT_TEST_DATA_FACTORY_H_ | |
| OLD | NEW |