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

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

Issue 2543473005: Draw omnibox shadow with a ninebox layer.
Patch Set: Created 4 years 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_popup_contents_view.h
diff --git a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h
index ccf42a35ef8977e8dbd8d488f7148f291f888d2e..21004cb13486ce686e63df222352eeba968dfbfc 100644
--- a/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h
+++ b/chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.h
@@ -58,6 +58,7 @@ class OmniboxPopupContentsView : public views::View,
// views::View:
void Layout() override;
views::View* GetTooltipHandlerForPoint(const gfx::Point& point) override;
+ void OnBoundsChanged(const gfx::Rect& previous_bounds) override;
bool OnMousePressed(const ui::MouseEvent& event) override;
bool OnMouseDragged(const ui::MouseEvent& event) override;
void OnMouseReleased(const ui::MouseEvent& event) override;
@@ -93,7 +94,6 @@ class OmniboxPopupContentsView : public views::View,
// views::View:
const char* GetClassName() const override;
- void OnPaint(gfx::Canvas* canvas) override;
void PaintChildren(const ui::PaintContext& context) override;
// views::ViewTargeterDelegate:
@@ -141,6 +141,9 @@ class OmniboxPopupContentsView : public views::View,
// The font list used for result rows, based on the omnibox font list.
gfx::FontList font_list_;
+ // The ninebox layer that draws a drop shadow above and below the popup.
+ std::unique_ptr<ui::Layer> shadow_layer_;
+
// If the user cancels a dragging action (i.e. by pressing ESC), we don't have
// a convenient way to release mouse capture. Instead we use this flag to
// simply ignore all remaining drag events, and the eventual mouse release

Powered by Google App Engine
This is Rietveld 408576698