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

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

Issue 2543473005: Draw omnibox shadow with a ninebox layer.
Patch Set: (not for commit --- added benchmarking code) 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
« no previous file with comments | « cc/layers/nine_patch_layer.h ('k') | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..7955ef25e1579d2648b3cb2a75d96a2ee7a2f61c 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;
@@ -66,7 +67,9 @@ class OmniboxPopupContentsView : public views::View,
void OnMouseEntered(const ui::MouseEvent& event) override;
void OnMouseExited(const ui::MouseEvent& event) override;
void OnGestureEvent(ui::GestureEvent* event) override;
-
+ void ViewHierarchyChanged(
+ const ViewHierarchyChangedDetails& details) override;
+bool experiment_started_ = false;
bool IsSelectedIndex(size_t index) const;
bool IsHoveredIndex(size_t index) const;
gfx::Image GetIconIfExtensionMatch(size_t index) const;
@@ -93,7 +96,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 +143,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
« no previous file with comments | « cc/layers/nine_patch_layer.h ('k') | chrome/browser/ui/views/omnibox/omnibox_popup_contents_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698