Index: chrome/browser/ui/views/omnibox/omnibox_result_view.h |
diff --git a/chrome/browser/ui/views/omnibox/omnibox_result_view.h b/chrome/browser/ui/views/omnibox/omnibox_result_view.h |
index 886e1d5efaa6cc2c033d9b47d7112afb63b7024e..07167bfe6fc4b7de1e38fd479d86d8be6564248a 100644 |
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.h |
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.h |
@@ -111,6 +111,22 @@ |
gfx::ImageSkia GetIcon() const; |
const gfx::ImageSkia* GetKeywordIcon() const; |
+ // Elides |runs| to fit in |remaining_width|. The runs in |runs| should be in |
+ // logical order. |
+ // |
+ // When we need to elide a run, the ellipsis will be placed at the end of that |
+ // run. This means that if we elide a run whose visual direction is opposite |
+ // that of the drawing context, the ellipsis will not be at the "end" of the |
+ // drawn string. For example, if in an LTR context we have the LTR run |
+ // "LTR_STRING" and the RTL run "RTL_STRING", the unelided text would be drawn |
+ // like: |
+ // LTR_STRING GNIRTS_LTR |
+ // If we need to elide the RTL run, then it will be drawn like: |
+ // LTR_STRING ...RTS_LTR |
+ // Instead of: |
+ // LTR_STRING RTS_LTR... |
+ void Elide(Runs* runs, int remaining_width) const; |
+ |
// views::View: |
virtual void Layout() OVERRIDE; |
virtual void OnBoundsChanged(const gfx::Rect& previous_bounds) OVERRIDE; |