diff options
author | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-09 21:59:21 +0000 |
---|---|---|
committer | jrg@chromium.org <jrg@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-02-09 21:59:21 +0000 |
commit | b087019502d4fca5a36e367958fc333bc4cef2a5 (patch) | |
tree | e80aef25f53ebdb5ac2ccf6091ad1807d0cd5809 /chrome | |
parent | 1bce0b66d9de24d21afc8cd672f7e1100dfe0b55 (diff) | |
download | chromium_src-b087019502d4fca5a36e367958fc333bc4cef2a5.zip chromium_src-b087019502d4fca5a36e367958fc333bc4cef2a5.tar.gz chromium_src-b087019502d4fca5a36e367958fc333bc4cef2a5.tar.bz2 |
Hook up the browser bar just a little bit more.
We now hit the TabContentsDelegate in temp_scaffolding_stubs.h.
Review URL: http://codereview.chromium.org/21178
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@9419 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome')
-rw-r--r-- | chrome/browser/browser.cc | 6 | ||||
-rw-r--r-- | chrome/browser/browser.h | 6 |
2 files changed, 3 insertions, 9 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc index e9c48f1..e99b82e 100644 --- a/chrome/browser/browser.cc +++ b/chrome/browser/browser.cc @@ -606,11 +606,10 @@ void Browser::Home() { homepage_url, GURL(), PageTransition::AUTO_BOOKMARK); } -#if defined(OS_WIN) void Browser::OpenCurrentURL() { UserMetrics::RecordAction(L"LoadURL", profile_); LocationBar* location_bar = window_->GetLocationBar(); - OpenURL(GURL(location_bar->GetInputString()), GURL(), + OpenURL(GURL(WideToUTF8(location_bar->GetInputString())), GURL(), location_bar->GetWindowOpenDisposition(), location_bar->GetPageTransition()); } @@ -619,7 +618,6 @@ void Browser::Go() { UserMetrics::RecordAction(L"Go", profile_); window_->GetLocationBar()->AcceptInput(); } -#endif void Browser::Stop() { UserMetrics::RecordAction(L"Stop", profile_); @@ -1072,10 +1070,8 @@ void Browser::ExecuteCommand(int id) { case IDC_FORWARD: GoForward(); break; case IDC_RELOAD: Reload(); break; case IDC_HOME: Home(); break; -#if defined(OS_WIN) case IDC_OPEN_CURRENT_URL: OpenCurrentURL(); break; case IDC_GO: Go(); break; -#endif case IDC_STOP: Stop(); break; // Window management commands diff --git a/chrome/browser/browser.h b/chrome/browser/browser.h index 1874426..1259829 100644 --- a/chrome/browser/browser.h +++ b/chrome/browser/browser.h @@ -228,9 +228,7 @@ class Browser : public TabStripModelDelegate, void GoForward(); void Reload(); void Home(); -#if defined(OS_WIN) void OpenCurrentURL(); -#endif void Go(); void Stop(); // Window management commands @@ -391,7 +389,7 @@ class Browser : public TabStripModelDelegate, virtual void ContentsStateChanged(TabContents* source); virtual bool ShouldDisplayURLField(); virtual void BeforeUnloadFired(TabContents* source, - bool proceed, + bool proceed, bool* proceed_to_fire_unload); virtual void ShowHtmlDialog(HtmlDialogContentsDelegate* delegate, void* parent_window); @@ -490,7 +488,7 @@ class Browser : public TabStripModelDelegate, bool RemoveFromSet(UnloadListenerSet* set, TabContents* tab); // Cleans up state appropriately when we are trying to close the browser and - // the tab has finished firing it's unload handler. We also use this in the + // the tab has finished firing its unload handler. We also use this in the // cases where a tab crashes or hangs even if the beforeunload/unload haven't // successfully fired. void ClearUnloadState(TabContents* tab); |