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

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

Issue 6913026: Compact Navigation prototype (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Created 9 years, 8 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 89a34d0121a5b1cc8b0edbb5444a7283df292097..e36354717b612a1a1c14ffd619a6868045199a26 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/search_engines/template_url_model_observer.h"
#include "chrome/browser/ui/omnibox/location_bar.h"
#include "chrome/browser/ui/toolbar/toolbar_model.h"
+#include "chrome/browser/ui/views/dropdown_bar_host.h"
#include "chrome/browser/ui/views/extensions/extension_popup.h"
#include "ui/gfx/font.h"
#include "ui/gfx/rect.h"
@@ -67,12 +68,20 @@ class LocationBarView : public LocationBar,
public views::View,
public views::DragController,
public AutocompleteEditController,
+ public DropdownBarHost::Delegate,
public TemplateURLModelObserver,
public NotificationObserver {
public:
// The location bar view's class name.
static const char kViewClassName[];
+ // DropdownBarHost::Delegate
+ virtual void set_animation_offset(int offset) OVERRIDE;
+ virtual void SetFocusAndSelection(bool select_all) OVERRIDE;
+
+ // Returns the offset used while animating.
+ int animation_offset() const { return animation_offset_; }
+
class Delegate {
public:
// Should return the current tab contents.
@@ -412,6 +421,12 @@ class LocationBarView : public LocationBar,
// Tracks this preference to determine whether bookmark editing is allowed.
BooleanPrefMember edit_bookmarks_enabled_;
+ // While animating, the host clips the widget and draws only the bottom
+ // part of it. The view needs to know the pixel offset at which we are drawing
+ // the widget so that we can draw the curved edges that attach to the toolbar
+ // in the right location.
+ int animation_offset_;
sky 2011/05/03 18:38:32 Initialize this to 0.
SteveT 2011/05/06 18:48:43 Done.
+
DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView);
};

Powered by Google App Engine
This is Rietveld 408576698