summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/dropdown_bar_host.h
diff options
context:
space:
mode:
authoroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 19:48:52 +0000
committeroshima@chromium.org <oshima@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-11 19:48:52 +0000
commitf4cce836e37b43b09e1f2d0f300f20598275f8aa (patch)
treee02bdd3dfd079ec4f57154546f7edf00c97792b9 /chrome/browser/views/dropdown_bar_host.h
parent8bc8c9bd128aa1af7df2c5a2c04e1f2eb8eb1fd5 (diff)
downloadchromium_src-f4cce836e37b43b09e1f2d0f300f20598275f8aa.zip
chromium_src-f4cce836e37b43b09e1f2d0f300f20598275f8aa.tar.gz
chromium_src-f4cce836e37b43b09e1f2d0f300f20598275f8aa.tar.bz2
Use dropdown bar for compact location bar.
* Refactored CompactLocationBar to Host/View to use DropdownBarHost/View. * Changed the logic to show/hide. Per cole's request, losing focus now hides the location bar. Following features are not implemented yet. * Window cripping while animating. * Adjust location when toolbar is shown (it's always under tab) * clipping autocomplete dropdown. Timer code is no longer used right now, but is left intentionally as we may put it back. BUG=None TEST=None Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=35674 Review URL: http://codereview.chromium.org/525018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@35929 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/dropdown_bar_host.h')
-rw-r--r--chrome/browser/views/dropdown_bar_host.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/chrome/browser/views/dropdown_bar_host.h b/chrome/browser/views/dropdown_bar_host.h
index c15585f..58dcc17 100644
--- a/chrome/browser/views/dropdown_bar_host.h
+++ b/chrome/browser/views/dropdown_bar_host.h
@@ -84,13 +84,13 @@ class DropdownBarHost : public views::AcceleratorTarget,
// having to poll it while it animates to open/closed status.
static bool disable_animations_during_testing_;
+ // Returns the browser view that the dropdown belongs to.
+ BrowserView* browser_view() const { return browser_view_; }
+
protected:
// Returns the dropdown bar view.
DropdownBarView* view() const { return view_; }
- // Returns the browser view that the dropdown belongs to.
- BrowserView* browser_view() const { return browser_view_; }
-
// Returns the focus tracker.
views::ExternalFocusTracker* focus_tracker() const {
return focus_tracker_.get();
@@ -143,6 +143,11 @@ class DropdownBarHost : public views::AcceleratorTarget,
const TabContents* contents,
const views::Textfield::Keystroke& key_stroke);
+ // Returns the animation for the dropdown.
+ SlideAnimation* animation() {
+ return animation_.get();
+ }
+
private:
// The BrowserView that created us.
BrowserView* browser_view_;
@@ -172,6 +177,10 @@ class DropdownBarHost : public views::AcceleratorTarget,
// dropdown bar. It contains the DropdownBarView.
scoped_ptr<views::Widget> host_;
+ // A flag to manually manage visibility. GTK/X11 is asynchrnous and
+ // the state of the widget can be out of sync.
+ bool is_visible_;
+
DISALLOW_COPY_AND_ASSIGN(DropdownBarHost);
};