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

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: Clang build fix. After commit/revert. Created 9 years, 7 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
===================================================================
--- chrome/browser/ui/views/location_bar/location_bar_view.h (revision 84869)
+++ chrome/browser/ui/views/location_bar/location_bar_view.h (working copy)
@@ -18,6 +18,8 @@
#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/dropdown_bar_host_delegate.h"
#include "chrome/browser/ui/views/extensions/extension_popup.h"
#include "ui/gfx/font.h"
#include "ui/gfx/rect.h"
@@ -48,7 +50,7 @@
namespace views {
class HorizontalPainter;
class Label;
-};
+} // namespace views
#if defined(OS_WIN)
class SuggestedTextView;
@@ -67,12 +69,20 @@
public views::View,
public views::DragController,
public AutocompleteEditController,
+ public DropdownBarHostDelegate,
public TemplateURLModelObserver,
public NotificationObserver {
public:
// The location bar view's class name.
static const char kViewClassName[];
+ // DropdownBarHostDelegate
+ virtual void SetFocusAndSelection(bool select_all) OVERRIDE;
+ virtual void SetAnimationOffset(int offset) 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 +422,12 @@
// 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_;
+
DISALLOW_IMPLICIT_CONSTRUCTORS(LocationBarView);
};
« no previous file with comments | « chrome/browser/ui/views/frame/opaque_browser_frame_view.cc ('k') | chrome/browser/ui/views/location_bar/location_bar_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698