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

Unified Diff: chrome/browser/ui/views/omnibox/omnibox_result_view.h

Issue 11535014: Replace StyleRange with BreakList; update RenderText, etc. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments. Created 7 years, 11 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/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 f0b8cb4a7e5413ffd897f1a9c810344618375ec8..be43e69187cc20ae56005c88c5d71289bb70f8e8 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_result_view.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_result_view.h
@@ -5,6 +5,8 @@
#ifndef CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_
#define CHROME_BROWSER_UI_VIEWS_OMNIBOX_OMNIBOX_RESULT_VIEW_H_
+#include <vector>
+
#include "chrome/browser/autocomplete/autocomplete_match.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/base/animation/animation_delegate.h"
@@ -18,6 +20,7 @@ class OmniboxResultViewModel;
namespace gfx {
class Canvas;
+class RenderText;
}
class OmniboxResultView : public views::View,
@@ -43,8 +46,7 @@ class OmniboxResultView : public views::View,
OmniboxResultView(OmniboxResultViewModel* model,
int model_index,
- const gfx::Font& font,
- const gfx::Font& bold_font);
+ const gfx::Font& font);
virtual ~OmniboxResultView();
SkColor GetColor(ResultViewState state, ColorKind kind) const;
@@ -92,11 +94,9 @@ class OmniboxResultView : public views::View,
}
private:
- struct ClassificationData;
- typedef std::vector<ClassificationData> Classifications;
-
struct RunData;
typedef std::vector<RunData> Runs;
+ typedef std::vector<gfx::RenderText*> Classifications;
// Common initialization code of the colors returned by GetColors().
static void CommonInitColors(const ui::NativeTheme* theme,
@@ -144,8 +144,8 @@ class OmniboxResultView : public views::View,
OmniboxResultViewModel* model_;
size_t model_index_;
- const gfx::Font normal_font_;
- const gfx::Font bold_font_;
+ const gfx::Font font_;
+ int font_height_;
// Width of the ellipsis in the normal font.
int ellipsis_width_;
« no previous file with comments | « chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc ('k') | chrome/browser/ui/views/omnibox/omnibox_result_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698