Chromium Code Reviews| Index: components/viz/hit_test/display_hit_test_data_factory.h |
| diff --git a/components/viz/hit_test/display_hit_test_data_factory.h b/components/viz/hit_test/display_hit_test_data_factory.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b0ea8fef45ca4850aaa53767517f9071a73da637 |
| --- /dev/null |
| +++ b/components/viz/hit_test/display_hit_test_data_factory.h |
| @@ -0,0 +1,33 @@ |
| +// Copyright 2017 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef COMPONENTS_VIZ_HIT_TEST_DISPLAY_HIT_TEST_DATA_FACTORY_H_ |
| +#define COMPONENTS_VIZ_HIT_TEST_DISPLAY_HIT_TEST_DATA_FACTORY_H_ |
| + |
| +#include <stdint.h> |
| + |
| +#include <map> |
| +#include <memory> |
| + |
| +#include "components/viz/hit_test/display_hit_test_data.h" |
| +#include "components/viz/hit_test/hit_test_export.h" |
| + |
| +namespace viz { |
| +namespace hit_test { |
| + |
| +class DisplayHitTestDataFactory { |
| + public: |
| + 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.
|
| + |
| + // 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 ).
|
| + // This may use an implementation that allocates local heap memory |
| + // when viz and browser are in the same process and must use an |
| + // implementation that allocates shared memory when they are not. |
| + virtual DisplayHitTestData* Create(int byte_count) = 0; |
| +}; |
| + |
| +} // namespace hit_test |
| +} // namespace viz |
| + |
| +#endif // COMPONENTS_VIZ_HIT_TEST_DISPLAY_HIT_TEST_DATA_FACTORY_H_ |