summaryrefslogtreecommitdiffstats
path: root/chrome/browser/views/location_bar_view.h
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-27 01:07:18 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-01-27 01:07:18 +0000
commitda99a54a499890a2773b4c4ed5e9fe54b35780d1 (patch)
tree7868aae1e1a1a54190322f970e3f91fbf616f992 /chrome/browser/views/location_bar_view.h
parent65e7a79bade71acadf8aee3dd96f93f71080503a (diff)
downloadchromium_src-da99a54a499890a2773b4c4ed5e9fe54b35780d1.zip
chromium_src-da99a54a499890a2773b4c4ed5e9fe54b35780d1.tar.gz
chromium_src-da99a54a499890a2773b4c4ed5e9fe54b35780d1.tar.bz2
Extract a cross-platform LocationBar interface accessible via the BrowserWindow interface that the Browser object can use to do locationbar-ey things without directly depending on Views.
Review URL: http://codereview.chromium.org/18826 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@8693 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/location_bar_view.h')
-rw-r--r--chrome/browser/views/location_bar_view.h33
1 files changed, 14 insertions, 19 deletions
diff --git a/chrome/browser/views/location_bar_view.h b/chrome/browser/views/location_bar_view.h
index eb3b4ef..ec01c63 100644
--- a/chrome/browser/views/location_bar_view.h
+++ b/chrome/browser/views/location_bar_view.h
@@ -9,6 +9,7 @@
#include "base/gfx/rect.h"
#include "chrome/browser/autocomplete/autocomplete_edit.h"
+#include "chrome/browser/location_bar.h"
#include "chrome/browser/tab_contents/tab_contents.h"
#include "chrome/browser/toolbar_model.h"
#include "chrome/browser/views/info_bubble.h"
@@ -30,10 +31,10 @@ class Profile;
// of the URL bar strip and contains its content.
//
/////////////////////////////////////////////////////////////////////////////
-class LocationBarView : public views::View,
+class LocationBarView : public LocationBar,
+ public views::View,
public AutocompleteEditController {
public:
-
class Delegate {
public:
// Should return the current tab contents.
@@ -107,25 +108,19 @@ class LocationBarView : public views::View,
return location_entry_.get();
}
- std::wstring location_input() {
- return location_input_;
- }
-
- WindowOpenDisposition disposition() {
- return disposition_;
- }
-
- PageTransition::Type transition() {
- return transition_;
- }
-
- // Shows a info bubble that tells the user what the omnibox is and allows
- // to change the search providers.
- void ShowFirstRunBubble();
-
- // Overridden from View.
+ // Overridden from views::View:
virtual bool OverrideAccelerator(const views::Accelerator& accelerator);
+ // Overridden from LocationBar:
+ virtual void ShowFirstRunBubble();
+ virtual std::wstring GetInputString() const;
+ virtual WindowOpenDisposition GetWindowOpenDisposition() const;
+ virtual PageTransition::Type GetPageTransition() const;
+ virtual void AcceptInput();
+ virtual void FocusLocation();
+ virtual void FocusSearch();
+ virtual void SaveStateToContents(TabContents* contents);
+
static const int kTextVertMargin;
static const COLORREF kBackgroundColorByLevel[];