From b943093b1bfd7178362d88c3bba8b4ce11989a3e Mon Sep 17 00:00:00 2001 From: stippi Date: Tue, 2 Mar 2010 21:23:44 +0000 Subject: [PATCH] Preload the browsing history after application start. This avoids the delay when beginning to type something in the URL text field and the autocompletion invoked the BrowsingHistory for the first time. git-svn-id: http://svn.haiku-os.org/webpositive/webkit/trunk@270 94f232f2-1747-11df-bad5-a5bfde151594 --- src/apps/webpositive/BrowserApp.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/apps/webpositive/BrowserApp.cpp b/src/apps/webpositive/BrowserApp.cpp index 67ce27db15..d4e05ac283 100644 --- a/src/apps/webpositive/BrowserApp.cpp +++ b/src/apps/webpositive/BrowserApp.cpp @@ -30,6 +30,7 @@ #include "BrowserApp.h" #include "BrowserWindow.h" +#include "BrowsingHistory.h" #include "DownloadWindow.h" #include "WebPage.h" #include "WebSettings.h" @@ -47,7 +48,7 @@ const char* kApplicationSignature = "application/x-vnd.Haiku-WebPositive"; const char* kApplicationName = "WebPositive"; - +static const uint32 PRELOAD_BROWSING_HISTORY = 'plbh'; BrowserApp::BrowserApp() : BApplication(kApplicationSignature) @@ -132,6 +133,7 @@ BrowserApp::ReadyToRun() BMessenger(fDownloadWindow)); window->Show(); } + PostMessage(PRELOAD_BROWSING_HISTORY); } @@ -139,6 +141,9 @@ void BrowserApp::MessageReceived(BMessage* message) { switch (message->what) { + case PRELOAD_BROWSING_HISTORY: + BrowsingHistory::defaultInstance(); + break; case B_SILENT_RELAUNCH: _CreateNewPage(""); break;