Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2720)

Unified Diff: chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc

Issue 6622002: Do all OOLing in the views code. linux_views now builds clean with the clang plugin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc
diff --git a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc
index eaf858a75a440150f8a4c5fc4498a49bda730adf..716dac7d1b34c269b4985c07fd3afd882e2e4f37 100644
--- a/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc
+++ b/chrome/browser/ui/views/autocomplete/autocomplete_result_view.cc
@@ -34,6 +34,28 @@ const int kMinimumTextVerticalPadding = 3;
////////////////////////////////////////////////////////////////////////////////
// AutocompleteResultView, public:
+// Precalculated data used to draw the portion of a match classification that
+// fits entirely within one run.
+struct AutocompleteResultView::ClassificationData {
+ string16 text;
+ const gfx::Font* font;
+ SkColor color;
+ int pixel_width;
+};
+
+// Precalculated data used to draw a complete visual run within the match.
+// This will include all or part of at leasdt one, and possibly several,
+// classifications.
+struct AutocompleteResultView::RunData {
+ size_t run_start; // Offset within the match text where this run begins.
+ int visual_order; // Where this run occurs in visual order. The earliest
+ // run drawn is run 0.
+ bool is_rtl;
+ int pixel_width;
+ Classifications classifications; // Classification pieces within this run,
+ // in logical order.
Nico 2011/03/04 22:53:02 align with // on prev line
+};
+
// This class is a utility class for calculations affected by whether the result
// view is horizontally mirrored. The drawing functions can be written as if
// all drawing occurs left-to-right, and then use this class to get the actual

Powered by Google App Engine
This is Rietveld 408576698