Reviewed by Darin Adler.
authorkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 May 2008 05:47:44 +0000 (05:47 +0000)
committerkevino@webkit.org <kevino@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Wed, 21 May 2008 05:47:44 +0000 (05:47 +0000)
Rename wxWebFrame -> wxWebBrowserShell in preparation to introduce a WebFrame counterpart in wx port. (Frame typically means 'top level window' in wx terms.)

https://bugs.webkit.org/show_bug.cgi?id=19041

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@33957 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKit/wx/ChangeLog
WebKit/wx/WebBrowserShell.cpp [moved from WebKit/wx/WebFrame.cpp with 77% similarity]
WebKit/wx/WebBrowserShell.h [moved from WebKit/wx/WebFrame.h with 91% similarity]
WebKit/wx/WebKitSupport/ChromeClientWx.cpp
WebKit/wx/bindings/python/webview.i
WebKit/wx/wxwebkit.bkl

index 513331bb142daf7597ab84e3667efea77ab89871..58f07416ad0a957d229b4a7a7f6b010e99170875 100644 (file)
@@ -1,3 +1,42 @@
+2008-05-16  Kevin Ollivier  <kevino@theolliviers.com>
+
+        Reviewed by Darin Adler.
+        
+        Rename wxWebFrame -> wxWebBrowserShell in preparation to introduce a WebFrame
+        counterpart in wx port. (Frame typically means 'top level window' in wx terms.)
+        
+        https://bugs.webkit.org/show_bug.cgi?id=19041
+
+        * WebBrowserShell.cpp: Copied from WebKit/wx/WebFrame.cpp.
+        (wxWebBrowserShell::wxWebBrowserShell):
+        (wxWebBrowserShell::~wxWebBrowserShell):
+        (wxWebBrowserShell::ShowDebugMenu):
+        (wxWebBrowserShell::OnQuit):
+        (wxWebBrowserShell::OnAbout):
+        (wxWebBrowserShell::OnLoadFile):
+        (wxWebBrowserShell::OnLoadEvent):
+        (wxWebBrowserShell::OnBeforeLoad):
+        (wxWebBrowserShell::OnAddressBarEnter):
+        (wxWebBrowserShell::OnSearchCtrlEnter):
+        (wxWebBrowserShell::OnBack):
+        (wxWebBrowserShell::OnForward):
+        (wxWebBrowserShell::OnStop):
+        (wxWebBrowserShell::OnReload):
+        (wxWebBrowserShell::OnMakeTextLarger):
+        (wxWebBrowserShell::OnMakeTextSmaller):
+        (wxWebBrowserShell::OnGetSource):
+        (wxWebBrowserShell::OnSetSource):
+        (wxWebBrowserShell::OnBrowse):
+        (wxWebBrowserShell::OnEdit):
+        (wxWebBrowserShell::OnRunScript):
+        * WebBrowserShell.h: Copied from WebKit/wx/WebFrame.h.
+        * WebFrame.cpp: Removed.
+        * WebFrame.h: Removed.
+        * WebKitSupport/ChromeClientWx.cpp:
+        (WebCore::ChromeClientWx::createWindow):
+        * bindings/python/webview.i:
+        * wxwebkit.bkl:
+
 2008-05-20  Kevin Ollivier  <kevino@theolliviers.com>
 
         wx build fix. Update code after removal of Document::toString().
similarity index 77%
rename from WebKit/wx/WebFrame.cpp
rename to WebKit/wx/WebBrowserShell.cpp
index ad0cfc815cf3f1af1f5703d5e6ed070685e65998..d2a30d547afe22efcd4e1792ca0f05529006ec5c 100644 (file)
@@ -36,7 +36,7 @@
 #include "wx/artprov.h"
 
 #include "WebView.h"
-#include "WebFrame.h"
+#include "WebBrowserShell.h"
 #include "WebViewPrivate.h"
 
 wxPageSourceViewFrame::wxPageSourceViewFrame(const wxString& source)
@@ -66,29 +66,29 @@ enum {
     ID_WEBVIEW = wxID_HIGHEST + 18
 };
 
-BEGIN_EVENT_TABLE(wxWebFrame, wxFrame)
-    EVT_MENU(wxID_EXIT,  wxWebFrame::OnQuit)
-    EVT_MENU(wxID_ABOUT, wxWebFrame::OnAbout)
-    EVT_MENU(ID_LOADFILE, wxWebFrame::OnLoadFile)
-    EVT_TEXT_ENTER(ID_TEXTCTRL, wxWebFrame::OnAddressBarEnter)
-    EVT_TEXT_ENTER(ID_SEARCHCTRL, wxWebFrame::OnSearchCtrlEnter)
-    EVT_WEBVIEW_LOAD(ID_WEBVIEW, wxWebFrame::OnLoadEvent)
-    EVT_WEBVIEW_BEFORE_LOAD(ID_WEBVIEW, wxWebFrame::OnBeforeLoad)
-    EVT_MENU(ID_BACK, wxWebFrame::OnBack)
-    EVT_MENU(ID_FORWARD, wxWebFrame::OnForward)
-    EVT_MENU(ID_STOP, wxWebFrame::OnStop)
-    EVT_MENU(ID_RELOAD, wxWebFrame::OnReload)
-    EVT_MENU(ID_MAKE_TEXT_LARGER, wxWebFrame::OnMakeTextLarger)
-    EVT_MENU(ID_MAKE_TEXT_SMALLER, wxWebFrame::OnMakeTextSmaller)
-    EVT_MENU(ID_GET_SOURCE, wxWebFrame::OnGetSource)
-    EVT_MENU(ID_SET_SOURCE, wxWebFrame::OnSetSource)
-    EVT_MENU(ID_BROWSE, wxWebFrame::OnBrowse)
-    EVT_MENU(ID_EDIT, wxWebFrame::OnEdit)
-    EVT_MENU(ID_RUN_SCRIPT, wxWebFrame::OnRunScript)
+BEGIN_EVENT_TABLE(wxWebBrowserShell, wxFrame)
+    EVT_MENU(wxID_EXIT,  wxWebBrowserShell::OnQuit)
+    EVT_MENU(wxID_ABOUT, wxWebBrowserShell::OnAbout)
+    EVT_MENU(ID_LOADFILE, wxWebBrowserShell::OnLoadFile)
+    EVT_TEXT_ENTER(ID_TEXTCTRL, wxWebBrowserShell::OnAddressBarEnter)
+    EVT_TEXT_ENTER(ID_SEARCHCTRL, wxWebBrowserShell::OnSearchCtrlEnter)
+    EVT_WEBVIEW_LOAD(ID_WEBVIEW, wxWebBrowserShell::OnLoadEvent)
+    EVT_WEBVIEW_BEFORE_LOAD(ID_WEBVIEW, wxWebBrowserShell::OnBeforeLoad)
+    EVT_MENU(ID_BACK, wxWebBrowserShell::OnBack)
+    EVT_MENU(ID_FORWARD, wxWebBrowserShell::OnForward)
+    EVT_MENU(ID_STOP, wxWebBrowserShell::OnStop)
+    EVT_MENU(ID_RELOAD, wxWebBrowserShell::OnReload)
+    EVT_MENU(ID_MAKE_TEXT_LARGER, wxWebBrowserShell::OnMakeTextLarger)
+    EVT_MENU(ID_MAKE_TEXT_SMALLER, wxWebBrowserShell::OnMakeTextSmaller)
+    EVT_MENU(ID_GET_SOURCE, wxWebBrowserShell::OnGetSource)
+    EVT_MENU(ID_SET_SOURCE, wxWebBrowserShell::OnSetSource)
+    EVT_MENU(ID_BROWSE, wxWebBrowserShell::OnBrowse)
+    EVT_MENU(ID_EDIT, wxWebBrowserShell::OnEdit)
+    EVT_MENU(ID_RUN_SCRIPT, wxWebBrowserShell::OnRunScript)
 END_EVENT_TABLE()
 
 
-wxWebFrame::wxWebFrame(const wxString& title) : 
+wxWebBrowserShell::wxWebBrowserShell(const wxString& title) : 
         wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(600, 500)),
         m_checkBeforeLoad(false)
 {
@@ -161,13 +161,13 @@ wxWebFrame::wxWebFrame(const wxString& title) :
     CreateStatusBar(2);
 }
 
-wxWebFrame::~wxWebFrame()
+wxWebBrowserShell::~wxWebBrowserShell()
 {
     if (m_debugMenu && GetMenuBar()->FindMenu(_("&Debug")) == wxNOT_FOUND)
         delete m_debugMenu;
 }
 
-void wxWebFrame::ShowDebugMenu(bool show)
+void wxWebBrowserShell::ShowDebugMenu(bool show)
 {
     int debugMenu = GetMenuBar()->FindMenu(_("&Debug"));
     if (show && debugMenu == wxNOT_FOUND) {
@@ -182,13 +182,13 @@ void wxWebFrame::ShowDebugMenu(bool show)
 
 // event handlers
 
-void wxWebFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
+void wxWebBrowserShell::OnQuit(wxCommandEvent& WXUNUSED(event))
 {
     // true is to force the frame to close
     Close(true);
 }
 
-void wxWebFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
+void wxWebBrowserShell::OnAbout(wxCommandEvent& WXUNUSED(event))
 {
     wxString msg;
     msg.Printf(_T("This is the About dialog of the wxWebKit sample.\n")
@@ -198,7 +198,7 @@ void wxWebFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
 
 }
 
-void wxWebFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event))
+void wxWebBrowserShell::OnLoadFile(wxCommandEvent& WXUNUSED(event))
 {
     wxFileDialog* dialog = new wxFileDialog(this, wxT("Choose a file"));
     if (dialog->ShowModal() == wxID_OK) {  
@@ -209,7 +209,7 @@ void wxWebFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event))
     }
 }
 
-void wxWebFrame::OnLoadEvent(wxWebViewLoadEvent& event)
+void wxWebBrowserShell::OnLoadEvent(wxWebViewLoadEvent& event)
 {
     if (GetStatusBar() != NULL){
         if (event.GetState() == wxWEBVIEW_LOAD_NEGOTIATING) {
@@ -229,7 +229,7 @@ void wxWebFrame::OnLoadEvent(wxWebViewLoadEvent& event)
     }
 }
 
-void wxWebFrame::OnBeforeLoad(wxWebViewBeforeLoadEvent& myEvent)
+void wxWebBrowserShell::OnBeforeLoad(wxWebViewBeforeLoadEvent& myEvent)
 {
     if (m_checkBeforeLoad) {
         int reply = wxMessageBox(_("Would you like to continue loading ") + myEvent.GetURL() + wxT("?"), _("Continue Loading?"), wxYES_NO); 
@@ -239,44 +239,44 @@ void wxWebFrame::OnBeforeLoad(wxWebViewBeforeLoadEvent& myEvent)
     }
 }
 
-void wxWebFrame::OnAddressBarEnter(wxCommandEvent& event)
+void wxWebBrowserShell::OnAddressBarEnter(wxCommandEvent& event)
 {
     if (webview)
         webview->LoadURL(addressBar->GetValue());
 }
 
-void wxWebFrame::OnSearchCtrlEnter(wxCommandEvent& event)
+void wxWebBrowserShell::OnSearchCtrlEnter(wxCommandEvent& event)
 {
     if (webview) {
         webview->LoadURL(wxString::Format(wxT("http://www.google.com/search?rls=en&q=%s&ie=UTF-8&oe=UTF-8"), searchCtrl->GetValue().wc_str()));
     }
 }
 
-void wxWebFrame::OnBack(wxCommandEvent& event)
+void wxWebBrowserShell::OnBack(wxCommandEvent& event)
 {
     if (webview)
         webview->GoBack();
 }
 
-void wxWebFrame::OnForward(wxCommandEvent& event)
+void wxWebBrowserShell::OnForward(wxCommandEvent& event)
 {
     if (webview)
         webview->GoForward();
 }
 
-void wxWebFrame::OnStop(wxCommandEvent& myEvent)
+void wxWebBrowserShell::OnStop(wxCommandEvent& myEvent)
 {
     if (webview)
         webview->Stop();
 }
 
-void wxWebFrame::OnReload(wxCommandEvent& myEvent)
+void wxWebBrowserShell::OnReload(wxCommandEvent& myEvent)
 {
     if (webview)
         webview->Reload();
 }
 
-void wxWebFrame::OnMakeTextLarger(wxCommandEvent& myEvent)
+void wxWebBrowserShell::OnMakeTextLarger(wxCommandEvent& myEvent)
 {
     if (webview) {
         if (webview->CanIncreaseTextSize())
@@ -284,7 +284,7 @@ void wxWebFrame::OnMakeTextLarger(wxCommandEvent& myEvent)
     }
 }
 
-void wxWebFrame::OnMakeTextSmaller(wxCommandEvent& myEvent)
+void wxWebBrowserShell::OnMakeTextSmaller(wxCommandEvent& myEvent)
 {
     if (webview) {
         if (webview->CanDecreaseTextSize())
@@ -292,33 +292,33 @@ void wxWebFrame::OnMakeTextSmaller(wxCommandEvent& myEvent)
     }
 }
 
-void wxWebFrame::OnGetSource(wxCommandEvent& myEvent)
+void wxWebBrowserShell::OnGetSource(wxCommandEvent& myEvent)
 {
     if (webview) {
-        wxPageSourceViewFrame* wxWebFrame = new wxPageSourceViewFrame(webview->GetPageSource());
-        wxWebFrame->Show();
+        wxPageSourceViewFrame* pageSourceFrame = new wxPageSourceViewFrame(webview->GetPageSource());
+        pageSourceFrame->Show();
     }
 }
 
-void wxWebFrame::OnSetSource(wxCommandEvent& event)
+void wxWebBrowserShell::OnSetSource(wxCommandEvent& event)
 {
     if (webview)
         webview->SetPageSource(wxString(wxT("<p>Hello World!</p>")));
 }
 
-void wxWebFrame::OnBrowse(wxCommandEvent& event)
+void wxWebBrowserShell::OnBrowse(wxCommandEvent& event)
 {
     if (webview)
         webview->MakeEditable(!event.IsChecked());
 }
 
-void wxWebFrame::OnEdit(wxCommandEvent& event)
+void wxWebBrowserShell::OnEdit(wxCommandEvent& event)
 {
     if (webview)
         webview->MakeEditable(event.IsChecked());
 }
 
-void wxWebFrame::OnRunScript(wxCommandEvent& myEvent){
+void wxWebBrowserShell::OnRunScript(wxCommandEvent& myEvent){
     if (webview) {
         wxTextEntryDialog* dialog = new wxTextEntryDialog(this, _("Type in a JavaScript to exectute."));
         if (dialog->ShowModal() == wxID_OK)
similarity index 91%
rename from WebKit/wx/WebFrame.h
rename to WebKit/wx/WebBrowserShell.h
index 046a650cea88ae17c00987a66d6510cfcd731ac4..9b48314248750f69b6be7c80a4e2234dc9597b33 100644 (file)
@@ -25,8 +25,8 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
  
-#ifndef WXWEBFRAME_H
-#define WXWEBFRAME_H
+#ifndef WXWEBBROWSERSHELL_H
+#define WXWEBBROWSERSHELL_H
 
 #include "wx/wxprec.h"
 #ifndef WX_PRECOMP
 #include "WebView.h"
 #include <wx/srchctrl.h>
 
-class WXDLLIMPEXP_WEBKIT wxWebFrame : public wxFrame
+class WXDLLIMPEXP_WEBKIT wxWebBrowserShell : public wxFrame
 {
 public:
     // ctor(s)
 #if SWIG
-    %pythonAppend wxWebFrame "self._setOORInfo(self)"
+    %pythonAppend wxWebBrowserShell "self._setOORInfo(self)"
 #endif
-    wxWebFrame(const wxString& title);
+    wxWebBrowserShell(const wxString& title);
 
 #ifndef SWIG
-    ~wxWebFrame();
+    ~wxWebBrowserShell();
 #endif
 
     void ShowDebugMenu(bool show = true);
@@ -95,4 +95,4 @@ public:
     wxPageSourceViewFrame(const wxString& source);
 };
 
-#endif // ifndef WXWEBFRAME_H
+#endif // ifndef WXWEBBROWSERSHELL_H
index 579e3f926609056dacbcc0b3b6f8c3e6f78499ed..f5d41549b304f15daaab1578f8da2e63d5705651 100644 (file)
@@ -40,7 +40,7 @@
 #endif
 #include <wx/textdlg.h>
 
-#include "WebFrame.h"
+#include "WebBrowserShell.h"
 #include "WebView.h"
 #include "WebViewPrivate.h"
 
@@ -112,7 +112,7 @@ Page* ChromeClientWx::createWindow(Frame*, const FrameLoadRequest& request, cons
     // when that event is not handled.
     
     Page* myPage = 0;
-    wxWebFrame* newFrame = new wxWebFrame(wxTheApp->GetAppName());
+    wxWebBrowserShell* newFrame = new wxWebBrowserShell(wxTheApp->GetAppName());
     
     if (newFrame->webview) {
         newFrame->webview->LoadURL(request.resourceRequest().url().string());
index 2aec8a6974b4b16f3dd5213d2ec7802411f31e4c..f5637f64e82ea0debc98c6e05e60ff70f360a961 100644 (file)
@@ -29,7 +29,7 @@
 #include "wx/wxPython/wxPython.h"
 #include "wx/wxPython/pyclasses.h"
 #include "WebView.h"
-#include "WebFrame.h"
+#include "WebBrowserShell.h"
 %}
 
 //---------------------------------------------------------------------------
 %import windows.i
 
 MustHaveApp(wxWebView);
-MustHaveApp(wxWebFrame);
+MustHaveApp(wxWebBrowserShell);
 
 %include WebView.h
-%include WebFrame.h
+%include WebBrowserShell.h
 
 %constant wxEventType wxEVT_WEBVIEW_BEFORE_LOAD;
 %constant wxEventType wxEVT_WEBVIEW_LOAD;
index e89911cf8185b8c0fb971ad4dae6508a130d95d1..e58a2d18a87b6ab53aadb642e1665cec1aa9aae2 100644 (file)
@@ -75,7 +75,7 @@ This file builds the wxWebKit library.
             WebKitSupport/InspectorClientWx.cpp
             
             WebView.cpp
-            WebFrame.cpp
+            WebBrowserShell.cpp
         </sources>   
     </dll>