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

Unified Diff: chrome/browser/ui/views/location_bar/location_bar_view.h

Issue 15745031: Restyle omnibox popup (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Go back to 3 max search suggestions for now Created 7 years, 6 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/location_bar/location_bar_view.h
diff --git a/chrome/browser/ui/views/location_bar/location_bar_view.h b/chrome/browser/ui/views/location_bar/location_bar_view.h
index 57a5e6dc18b03098bb6ff753bad64313fc0d0595..b5ec77b77571f653f6d64d50103d6e8657cab2e0 100644
--- a/chrome/browser/ui/views/location_bar/location_bar_view.h
+++ b/chrome/browser/ui/views/location_bar/location_bar_view.h
@@ -18,6 +18,7 @@
#include "chrome/browser/ui/views/dropdown_bar_host.h"
#include "chrome/browser/ui/views/dropdown_bar_host_delegate.h"
#include "chrome/browser/ui/views/extensions/extension_popup.h"
+#include "chrome/browser/ui/views/omnibox/omnibox_view_delegate.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "ui/gfx/font.h"
@@ -69,6 +70,7 @@ class LocationBarView : public LocationBar,
public views::View,
public views::DragController,
public OmniboxEditController,
+ public OmniboxViewDelegate,
public DropdownBarHostDelegate,
public TemplateURLServiceObserver,
public content::NotificationObserver {
@@ -91,6 +93,15 @@ class LocationBarView : public LocationBar,
// Returns the InstantController, or NULL if there isn't one.
virtual InstantController* GetInstant() = 0;
+ // Returns the position and width that the popup should be, and also the
+ // left edge that the results should align themselves to (which will leave
+ // some border on the left of the popup).
+ virtual void GetOmniboxPopupPositioningInfo(
+ gfx::Point* top_left_screen_coord,
+ int* popup_width,
+ int* left_margin,
+ int* right_margin) = 0;
+
// Creates Widget for the given delegate.
virtual views::Widget* CreateViewsBubble(
views::BubbleDelegateView* bubble_delegate) = 0;
@@ -254,6 +265,14 @@ class LocationBarView : public LocationBar,
virtual InstantController* GetInstant() OVERRIDE;
virtual content::WebContents* GetWebContents() const OVERRIDE;
+ // OmniboxViewDelegate:
+ virtual void GetPopupPositioningInfo(gfx::Point* top_left_screen_coord,
+ int* popup_width,
+ int* left_margin,
+ int* right_margin) OVERRIDE;
+ virtual ui::ThemeProvider* GetThemeProviderForPopup() OVERRIDE;
+ virtual gfx::NativeView GetPopupParent() OVERRIDE;
+
// views::View:
virtual const char* GetClassName() const OVERRIDE;
virtual bool SkipDefaultKeyEventProcessing(

Powered by Google App Engine
This is Rietveld 408576698