Chromium Code Reviews| Index: ui/views/lookup_word_client.h |
| diff --git a/ui/views/lookup_word_client.h b/ui/views/lookup_word_client.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..97f4cc6c660aaf20d6e17b906285ee7c87154986 |
| --- /dev/null |
| +++ b/ui/views/lookup_word_client.h |
| @@ -0,0 +1,35 @@ |
| +// Copyright 2016 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 UI_VIEWS_LOOKUP_WORD_CLIENT_H_ |
| +#define UI_VIEWS_LOOKUP_WORD_CLIENT_H_ |
| + |
| +#include "ui/views/views_export.h" |
| + |
| +namespace gfx { |
| +struct DecoratedText; |
| +class Point; |
| +} // namespace gfx |
| + |
| +namespace views { |
| + |
| +// An interface implemented by a view which supports word lookups. |
| +class VIEWS_EXPORT LookupWordClient { |
|
sky
2016/10/04 17:26:47
WordLookupClient?
karandeepb
2016/10/05 04:36:25
Done.
|
| + public: |
| + // Retreives the word displayed at the given |point| along with its styling |
|
msw
2016/10/05 00:24:49
nit: Retrieves
karandeepb
2016/10/05 04:31:40
Done.
|
| + // information. |point| is in the coordinate system of the view. If no word is |
| + // displayed at the point, returns a nearby word. |baseline_point| should |
| + // correspond to the left baseline point of the leftmost glyph of the |word| |
|
msw
2016/10/05 00:24:49
nit: s/the left baseline/the baseline/
karandeepb
2016/10/05 04:31:40
Done.
|
| + // in the view's coordinates. Returns false, if no word can be retrieved. |
| + virtual bool GetDecoratedWordAtPoint(const gfx::Point& point, |
| + gfx::DecoratedText* decorated_word, |
| + gfx::Point* baseline_point) = 0; |
| + |
| + protected: |
| + ~LookupWordClient() {} |
| +}; |
| + |
| +} // namespace views |
| + |
| +#endif // UI_VIEWS_LOOKUP_WORD_CLIENT_H_ |