Commit 8464dc3f authored by Dave Schuyler's avatar Dave Schuyler Committed by Commit Bot

[Omnibox] Move result view layouts into sub-views

This CL moves pieces of the OmniboxResultView Layout into the sub-views
(OmniboxSuggestionView elements). The OmniboxSuggestionView now have
functions to layout each style of result: Answer, Entity, TwoLine, and
Split. This CL is part of a refactor of the OmniboxResultView.

Bug: None
Change-Id: I8cd07a4749ab68238956632b45c2bd575fb4dccc
Reviewed-on: https://chromium-review.googlesource.com/1013320Reviewed-by: default avatarJustin Donnelly <jdonnelly@chromium.org>
Commit-Queue: Dave Schuyler <dschuyler@chromium.org>
Cr-Commit-Position: refs/heads/master@{#551475}
parent 4f3725c4
...@@ -32,7 +32,6 @@ class Image; ...@@ -32,7 +32,6 @@ class Image;
} }
class OmniboxImageView; class OmniboxImageView;
class OmniboxSeparatedLineView;
class OmniboxSuggestionView; class OmniboxSuggestionView;
class OmniboxTabSwitchButton; class OmniboxTabSwitchButton;
class OmniboxTextView; class OmniboxTextView;
...@@ -95,12 +94,6 @@ class OmniboxResultView : public views::View, ...@@ -95,12 +94,6 @@ class OmniboxResultView : public views::View,
gfx::Image GetIcon() const; gfx::Image GetIcon() const;
// Returns the height of the the description section of answer suggestions.
int GetAnswerHeight() const;
// Returns the margin that should appear at the top and bottom of the result.
int GetVerticalMargin() const;
// Sets the hovered state of this result. // Sets the hovered state of this result.
void SetHovered(bool hovered); void SetHovered(bool hovered);
...@@ -136,7 +129,7 @@ class OmniboxResultView : public views::View, ...@@ -136,7 +129,7 @@ class OmniboxResultView : public views::View,
// Weak pointers for easy reference. // Weak pointers for easy reference.
OmniboxSuggestionView* suggestion_view_; // The leading (or left) view. OmniboxSuggestionView* suggestion_view_; // The leading (or left) view.
OmniboxSeparatedLineView* keyword_view_; // The trailing (or right) view. OmniboxSuggestionView* keyword_view_; // The trailing (or right) view.
std::unique_ptr<OmniboxTabSwitchButton> suggestion_tab_switch_button_; std::unique_ptr<OmniboxTabSwitchButton> suggestion_tab_switch_button_;
DISALLOW_COPY_AND_ASSIGN(OmniboxResultView); DISALLOW_COPY_AND_ASSIGN(OmniboxResultView);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment