summaryrefslogtreecommitdiffstats
path: root/chrome/browser/gtk
diff options
context:
space:
mode:
authordeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 16:40:43 +0000
committerdeanm@chromium.org <deanm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2009-03-03 16:40:43 +0000
commit79d1685c4d9af31bf63235e917f0daed1528d461 (patch)
treee33b9478f106345f99086e0972abb614095a0d13 /chrome/browser/gtk
parent6f33add36219e1faadea9d295b35d43841ebd508 (diff)
downloadchromium_src-79d1685c4d9af31bf63235e917f0daed1528d461.zip
chromium_src-79d1685c4d9af31bf63235e917f0daed1528d461.tar.gz
chromium_src-79d1685c4d9af31bf63235e917f0daed1528d461.tar.bz2
Plumb GetLocationBar through to the toolbar.
The toolbar will own the LocationBarView, which implements the LocationBar interface. Plumb the request for the LocationBar through from the browser window to the toolbar. Review URL: http://codereview.chromium.org/40008 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@10799 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk')
-rw-r--r--chrome/browser/gtk/browser_toolbar_view_gtk.cc8
-rw-r--r--chrome/browser/gtk/browser_toolbar_view_gtk.h3
-rw-r--r--chrome/browser/gtk/browser_window_gtk.cc3
-rw-r--r--chrome/browser/gtk/browser_window_gtk.h1
4 files changed, 13 insertions, 2 deletions
diff --git a/chrome/browser/gtk/browser_toolbar_view_gtk.cc b/chrome/browser/gtk/browser_toolbar_view_gtk.cc
index ffee692..1dd3ef3 100644
--- a/chrome/browser/gtk/browser_toolbar_view_gtk.cc
+++ b/chrome/browser/gtk/browser_toolbar_view_gtk.cc
@@ -19,6 +19,9 @@
#include "grit/generated_resources.h"
#include "grit/theme_resources.h"
+// TODO(deanm): Remove this when the LocationBarView is used.
+class LocationBar;
+
const int BrowserToolbarGtk::kToolbarHeight = 38;
// For the back/forward dropdown menus, the time in milliseconds between
// when the user clicks and the popup menu appears.
@@ -110,6 +113,11 @@ void BrowserToolbarGtk::AddToolbarToBox(GtkWidget* box) {
gtk_box_pack_start(GTK_BOX(box), toolbar_, FALSE, FALSE, 0);
}
+LocationBar* BrowserToolbarGtk::GetLocationBar() const {
+ NOTIMPLEMENTED();
+ return NULL;
+}
+
void BrowserToolbarGtk::FocusLocationBar() {
gtk_widget_grab_focus(entry_);
}
diff --git a/chrome/browser/gtk/browser_toolbar_view_gtk.h b/chrome/browser/gtk/browser_toolbar_view_gtk.h
index 63983022..2053094 100644
--- a/chrome/browser/gtk/browser_toolbar_view_gtk.h
+++ b/chrome/browser/gtk/browser_toolbar_view_gtk.h
@@ -18,6 +18,7 @@ class BackForwardMenuModelGtk;
class Browser;
class CustomContainerButton;
class CustomDrawButton;
+class LocationBar;
class Profile;
class TabContents;
class ToolbarModel;
@@ -40,6 +41,8 @@ class BrowserToolbarGtk : public CommandUpdater::CommandObserver,
// Adds this GTK toolbar into a sizing box.
void AddToolbarToBox(GtkWidget* box);
+ virtual LocationBar* GetLocationBar() const;
+
// Set focus on the entry box.
void FocusLocationBar();
diff --git a/chrome/browser/gtk/browser_window_gtk.cc b/chrome/browser/gtk/browser_window_gtk.cc
index 346990f..bdfcb7e 100644
--- a/chrome/browser/gtk/browser_window_gtk.cc
+++ b/chrome/browser/gtk/browser_window_gtk.cc
@@ -261,8 +261,7 @@ bool BrowserWindowGtk::IsFullscreen() const {
}
LocationBar* BrowserWindowGtk::GetLocationBar() const {
- NOTIMPLEMENTED();
- return NULL;
+ return toolbar_->GetLocationBar();
}
void BrowserWindowGtk::SetFocusToLocationBar() {
diff --git a/chrome/browser/gtk/browser_window_gtk.h b/chrome/browser/gtk/browser_window_gtk.h
index 07d3c97..c42ad97 100644
--- a/chrome/browser/gtk/browser_window_gtk.h
+++ b/chrome/browser/gtk/browser_window_gtk.h
@@ -13,6 +13,7 @@
#include "chrome/browser/tabs/tab_strip_model.h"
class BrowserToolbarGtk;
+class LocationBar;
class NineBox;
class StatusBubbleGtk;
class TabContentsContainerGtk;