Index: ui/base/ime/text_input_client.h |
diff --git a/ui/base/ime/text_input_client.h b/ui/base/ime/text_input_client.h |
index d76c00a49a9681f9f2171a652549ef75eeeed778..c84d3bdb2b565a63c36c50b487ac8d099c13e3ba 100644 |
--- a/ui/base/ime/text_input_client.h |
+++ b/ui/base/ime/text_input_client.h |
@@ -81,24 +81,23 @@ class UI_BASE_IME_EXPORT TextInputClient { |
// Returns if the client supports inline composition currently. |
virtual bool CanComposeInline() const = 0; |
+ // Returns the scale factor of the screen in which the view of this |
+ // TextInputClient has been located. |
+ // This is used in the platform-dependent InputMethod implementations, on |
+ // which the native IME requires the non-dip coordinates from |
+ // GetCaretBounds, etc. |
+ virtual float GetScaleFactor() const = 0; |
sadrul
2016/12/22 01:30:22
Unfortunately, there are several types of scale fa
Shu Chen
2016/12/22 03:02:27
Done.
I've removed the GetScaleFactor method.
|
+ |
// Returns current caret (insertion point) bounds in the universal screen |
- // coordinates. If there is selection, then the selection bounds will be |
- // returned. |
- // Note: On Windows, the returned value is supposed to be DIP (Density |
- // Independent Pixel). |
- // TODO(ime): Have a clear spec whether the returned value is DIP or not. |
- // http://crbug.com/360334 |
+ // coordinates in DIP (Density Independent Pixel). |
+ // If there is selection, then the selection bounds will be returned. |
virtual gfx::Rect GetCaretBounds() const = 0; |
// Retrieves the composition character boundary rectangle in the universal |
- // screen coordinates. The |index| is zero-based index of character position |
- // in composition text. |
+ // screen coordinates in DIP (Density Independent Pixel). |
+ // The |index| is zero-based index of character position in composition text. |
// Returns false if there is no composition text or |index| is out of range. |
// The |rect| is not touched in the case of failure. |
- // Note: On Windows, the returned value is supposed to be DIP |
- // (Density Independent Pixel). |
- // TODO(ime): Have a clear spec whether the returned value is DIP or not. |
- // http://crbug.com/360334 |
virtual bool GetCompositionCharacterBounds(uint32_t index, |
gfx::Rect* rect) const = 0; |
@@ -162,12 +161,9 @@ class UI_BASE_IME_EXPORT TextInputClient { |
// between browser and renderer. |
virtual void ExtendSelectionAndDelete(size_t before, size_t after) = 0; |
- // Ensure the caret is not in |rect|. |rect| is in screen coordinates and |
- // may extend beyond the bounds of this TextInputClient. |
- // Note: On Windows, the returned value is supposed to be DIP (Density |
- // Independent Pixel). |
- // TODO(ime): Have a clear spec whether the returned value is DIP or not. |
- // http://crbug.com/360334 |
+ // Ensure the caret is not in |rect|. |rect| is the screen coordinates in |
+ // DIP (Density Independent Pixel) and may extend beyond the bounds of this |
+ // TextInputClient. |
virtual void EnsureCaretNotInRect(const gfx::Rect& rect) = 0; |
// Returns true if |command| is currently allowed to be executed. |