Changeset 33957 in webkit


Ignore:
Timestamp:
May 20, 2008 10:47:44 PM (16 years ago)
Author:
kevino@webkit.org
Message:

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

Location:
trunk/WebKit/wx
Files:
4 edited
2 moved

Legend:

Unmodified
Added
Removed
  • trunk/WebKit/wx/ChangeLog

    r33932 r33957  
     12008-05-16  Kevin Ollivier  <kevino@theolliviers.com>
     2
     3        Reviewed by Darin Adler.
     4       
     5        Rename wxWebFrame -> wxWebBrowserShell in preparation to introduce a WebFrame
     6        counterpart in wx port. (Frame typically means 'top level window' in wx terms.)
     7       
     8        https://bugs.webkit.org/show_bug.cgi?id=19041
     9
     10        * WebBrowserShell.cpp: Copied from WebKit/wx/WebFrame.cpp.
     11        (wxWebBrowserShell::wxWebBrowserShell):
     12        (wxWebBrowserShell::~wxWebBrowserShell):
     13        (wxWebBrowserShell::ShowDebugMenu):
     14        (wxWebBrowserShell::OnQuit):
     15        (wxWebBrowserShell::OnAbout):
     16        (wxWebBrowserShell::OnLoadFile):
     17        (wxWebBrowserShell::OnLoadEvent):
     18        (wxWebBrowserShell::OnBeforeLoad):
     19        (wxWebBrowserShell::OnAddressBarEnter):
     20        (wxWebBrowserShell::OnSearchCtrlEnter):
     21        (wxWebBrowserShell::OnBack):
     22        (wxWebBrowserShell::OnForward):
     23        (wxWebBrowserShell::OnStop):
     24        (wxWebBrowserShell::OnReload):
     25        (wxWebBrowserShell::OnMakeTextLarger):
     26        (wxWebBrowserShell::OnMakeTextSmaller):
     27        (wxWebBrowserShell::OnGetSource):
     28        (wxWebBrowserShell::OnSetSource):
     29        (wxWebBrowserShell::OnBrowse):
     30        (wxWebBrowserShell::OnEdit):
     31        (wxWebBrowserShell::OnRunScript):
     32        * WebBrowserShell.h: Copied from WebKit/wx/WebFrame.h.
     33        * WebFrame.cpp: Removed.
     34        * WebFrame.h: Removed.
     35        * WebKitSupport/ChromeClientWx.cpp:
     36        (WebCore::ChromeClientWx::createWindow):
     37        * bindings/python/webview.i:
     38        * wxwebkit.bkl:
     39
    1402008-05-20  Kevin Ollivier  <kevino@theolliviers.com>
    241
  • trunk/WebKit/wx/WebBrowserShell.cpp

    r33050 r33957  
    3737
    3838#include "WebView.h"
    39 #include "WebFrame.h"
     39#include "WebBrowserShell.h"
    4040#include "WebViewPrivate.h"
    4141
     
    6767};
    6868
    69 BEGIN_EVENT_TABLE(wxWebFrame, wxFrame)
    70     EVT_MENU(wxID_EXIT,  wxWebFrame::OnQuit)
    71     EVT_MENU(wxID_ABOUT, wxWebFrame::OnAbout)
    72     EVT_MENU(ID_LOADFILE, wxWebFrame::OnLoadFile)
    73     EVT_TEXT_ENTER(ID_TEXTCTRL, wxWebFrame::OnAddressBarEnter)
    74     EVT_TEXT_ENTER(ID_SEARCHCTRL, wxWebFrame::OnSearchCtrlEnter)
    75     EVT_WEBVIEW_LOAD(ID_WEBVIEW, wxWebFrame::OnLoadEvent)
    76     EVT_WEBVIEW_BEFORE_LOAD(ID_WEBVIEW, wxWebFrame::OnBeforeLoad)
    77     EVT_MENU(ID_BACK, wxWebFrame::OnBack)
    78     EVT_MENU(ID_FORWARD, wxWebFrame::OnForward)
    79     EVT_MENU(ID_STOP, wxWebFrame::OnStop)
    80     EVT_MENU(ID_RELOAD, wxWebFrame::OnReload)
    81     EVT_MENU(ID_MAKE_TEXT_LARGER, wxWebFrame::OnMakeTextLarger)
    82     EVT_MENU(ID_MAKE_TEXT_SMALLER, wxWebFrame::OnMakeTextSmaller)
    83     EVT_MENU(ID_GET_SOURCE, wxWebFrame::OnGetSource)
    84     EVT_MENU(ID_SET_SOURCE, wxWebFrame::OnSetSource)
    85     EVT_MENU(ID_BROWSE, wxWebFrame::OnBrowse)
    86     EVT_MENU(ID_EDIT, wxWebFrame::OnEdit)
    87     EVT_MENU(ID_RUN_SCRIPT, wxWebFrame::OnRunScript)
     69BEGIN_EVENT_TABLE(wxWebBrowserShell, wxFrame)
     70    EVT_MENU(wxID_EXIT,  wxWebBrowserShell::OnQuit)
     71    EVT_MENU(wxID_ABOUT, wxWebBrowserShell::OnAbout)
     72    EVT_MENU(ID_LOADFILE, wxWebBrowserShell::OnLoadFile)
     73    EVT_TEXT_ENTER(ID_TEXTCTRL, wxWebBrowserShell::OnAddressBarEnter)
     74    EVT_TEXT_ENTER(ID_SEARCHCTRL, wxWebBrowserShell::OnSearchCtrlEnter)
     75    EVT_WEBVIEW_LOAD(ID_WEBVIEW, wxWebBrowserShell::OnLoadEvent)
     76    EVT_WEBVIEW_BEFORE_LOAD(ID_WEBVIEW, wxWebBrowserShell::OnBeforeLoad)
     77    EVT_MENU(ID_BACK, wxWebBrowserShell::OnBack)
     78    EVT_MENU(ID_FORWARD, wxWebBrowserShell::OnForward)
     79    EVT_MENU(ID_STOP, wxWebBrowserShell::OnStop)
     80    EVT_MENU(ID_RELOAD, wxWebBrowserShell::OnReload)
     81    EVT_MENU(ID_MAKE_TEXT_LARGER, wxWebBrowserShell::OnMakeTextLarger)
     82    EVT_MENU(ID_MAKE_TEXT_SMALLER, wxWebBrowserShell::OnMakeTextSmaller)
     83    EVT_MENU(ID_GET_SOURCE, wxWebBrowserShell::OnGetSource)
     84    EVT_MENU(ID_SET_SOURCE, wxWebBrowserShell::OnSetSource)
     85    EVT_MENU(ID_BROWSE, wxWebBrowserShell::OnBrowse)
     86    EVT_MENU(ID_EDIT, wxWebBrowserShell::OnEdit)
     87    EVT_MENU(ID_RUN_SCRIPT, wxWebBrowserShell::OnRunScript)
    8888END_EVENT_TABLE()
    8989
    9090
    91 wxWebFrame::wxWebFrame(const wxString& title) :
     91wxWebBrowserShell::wxWebBrowserShell(const wxString& title) :
    9292        wxFrame(NULL, wxID_ANY, title, wxDefaultPosition, wxSize(600, 500)),
    9393        m_checkBeforeLoad(false)
     
    162162}
    163163
    164 wxWebFrame::~wxWebFrame()
     164wxWebBrowserShell::~wxWebBrowserShell()
    165165{
    166166    if (m_debugMenu && GetMenuBar()->FindMenu(_("&Debug")) == wxNOT_FOUND)
     
    168168}
    169169
    170 void wxWebFrame::ShowDebugMenu(bool show)
     170void wxWebBrowserShell::ShowDebugMenu(bool show)
    171171{
    172172    int debugMenu = GetMenuBar()->FindMenu(_("&Debug"));
     
    183183// event handlers
    184184
    185 void wxWebFrame::OnQuit(wxCommandEvent& WXUNUSED(event))
     185void wxWebBrowserShell::OnQuit(wxCommandEvent& WXUNUSED(event))
    186186{
    187187    // true is to force the frame to close
     
    189189}
    190190
    191 void wxWebFrame::OnAbout(wxCommandEvent& WXUNUSED(event))
     191void wxWebBrowserShell::OnAbout(wxCommandEvent& WXUNUSED(event))
    192192{
    193193    wxString msg;
     
    199199}
    200200
    201 void wxWebFrame::OnLoadFile(wxCommandEvent& WXUNUSED(event))
     201void wxWebBrowserShell::OnLoadFile(wxCommandEvent& WXUNUSED(event))
    202202{
    203203    wxFileDialog* dialog = new wxFileDialog(this, wxT("Choose a file"));
     
    210210}
    211211
    212 void wxWebFrame::OnLoadEvent(wxWebViewLoadEvent& event)
     212void wxWebBrowserShell::OnLoadEvent(wxWebViewLoadEvent& event)
    213213{
    214214    if (GetStatusBar() != NULL){
     
    230230}
    231231
    232 void wxWebFrame::OnBeforeLoad(wxWebViewBeforeLoadEvent& myEvent)
     232void wxWebBrowserShell::OnBeforeLoad(wxWebViewBeforeLoadEvent& myEvent)
    233233{
    234234    if (m_checkBeforeLoad) {
     
    240240}
    241241
    242 void wxWebFrame::OnAddressBarEnter(wxCommandEvent& event)
     242void wxWebBrowserShell::OnAddressBarEnter(wxCommandEvent& event)
    243243{
    244244    if (webview)
     
    246246}
    247247
    248 void wxWebFrame::OnSearchCtrlEnter(wxCommandEvent& event)
     248void wxWebBrowserShell::OnSearchCtrlEnter(wxCommandEvent& event)
    249249{
    250250    if (webview) {
     
    253253}
    254254
    255 void wxWebFrame::OnBack(wxCommandEvent& event)
     255void wxWebBrowserShell::OnBack(wxCommandEvent& event)
    256256{
    257257    if (webview)
     
    259259}
    260260
    261 void wxWebFrame::OnForward(wxCommandEvent& event)
     261void wxWebBrowserShell::OnForward(wxCommandEvent& event)
    262262{
    263263    if (webview)
     
    265265}
    266266
    267 void wxWebFrame::OnStop(wxCommandEvent& myEvent)
     267void wxWebBrowserShell::OnStop(wxCommandEvent& myEvent)
    268268{
    269269    if (webview)
     
    271271}
    272272
    273 void wxWebFrame::OnReload(wxCommandEvent& myEvent)
     273void wxWebBrowserShell::OnReload(wxCommandEvent& myEvent)
    274274{
    275275    if (webview)
     
    277277}
    278278
    279 void wxWebFrame::OnMakeTextLarger(wxCommandEvent& myEvent)
     279void wxWebBrowserShell::OnMakeTextLarger(wxCommandEvent& myEvent)
    280280{
    281281    if (webview) {
     
    285285}
    286286
    287 void wxWebFrame::OnMakeTextSmaller(wxCommandEvent& myEvent)
     287void wxWebBrowserShell::OnMakeTextSmaller(wxCommandEvent& myEvent)
    288288{
    289289    if (webview) {
     
    293293}
    294294
    295 void wxWebFrame::OnGetSource(wxCommandEvent& myEvent)
    296 {
    297     if (webview) {
    298         wxPageSourceViewFrame* wxWebFrame = new wxPageSourceViewFrame(webview->GetPageSource());
    299         wxWebFrame->Show();
    300     }
    301 }
    302 
    303 void wxWebFrame::OnSetSource(wxCommandEvent& event)
     295void wxWebBrowserShell::OnGetSource(wxCommandEvent& myEvent)
     296{
     297    if (webview) {
     298        wxPageSourceViewFrame* pageSourceFrame = new wxPageSourceViewFrame(webview->GetPageSource());
     299        pageSourceFrame->Show();
     300    }
     301}
     302
     303void wxWebBrowserShell::OnSetSource(wxCommandEvent& event)
    304304{
    305305    if (webview)
     
    307307}
    308308
    309 void wxWebFrame::OnBrowse(wxCommandEvent& event)
     309void wxWebBrowserShell::OnBrowse(wxCommandEvent& event)
    310310{
    311311    if (webview)
     
    313313}
    314314
    315 void wxWebFrame::OnEdit(wxCommandEvent& event)
     315void wxWebBrowserShell::OnEdit(wxCommandEvent& event)
    316316{
    317317    if (webview)
     
    319319}
    320320
    321 void wxWebFrame::OnRunScript(wxCommandEvent& myEvent){
     321void wxWebBrowserShell::OnRunScript(wxCommandEvent& myEvent){
    322322    if (webview) {
    323323        wxTextEntryDialog* dialog = new wxTextEntryDialog(this, _("Type in a JavaScript to exectute."));
  • trunk/WebKit/wx/WebBrowserShell.h

    r33050 r33957  
    2626 */
    2727 
    28 #ifndef WXWEBFRAME_H
    29 #define WXWEBFRAME_H
     28#ifndef WXWEBBROWSERSHELL_H
     29#define WXWEBBROWSERSHELL_H
    3030
    3131#include "wx/wxprec.h"
     
    3737#include <wx/srchctrl.h>
    3838
    39 class WXDLLIMPEXP_WEBKIT wxWebFrame : public wxFrame
     39class WXDLLIMPEXP_WEBKIT wxWebBrowserShell : public wxFrame
    4040{
    4141public:
    4242    // ctor(s)
    4343#if SWIG
    44     %pythonAppend wxWebFrame "self._setOORInfo(self)"
     44    %pythonAppend wxWebBrowserShell "self._setOORInfo(self)"
    4545#endif
    46     wxWebFrame(const wxString& title);
     46    wxWebBrowserShell(const wxString& title);
    4747
    4848#ifndef SWIG
    49     ~wxWebFrame();
     49    ~wxWebBrowserShell();
    5050#endif
    5151
     
    9696};
    9797
    98 #endif // ifndef WXWEBFRAME_H
     98#endif // ifndef WXWEBBROWSERSHELL_H
  • trunk/WebKit/wx/WebKitSupport/ChromeClientWx.cpp

    r29698 r33957  
    4141#include <wx/textdlg.h>
    4242
    43 #include "WebFrame.h"
     43#include "WebBrowserShell.h"
    4444#include "WebView.h"
    4545#include "WebViewPrivate.h"
     
    113113   
    114114    Page* myPage = 0;
    115     wxWebFrame* newFrame = new wxWebFrame(wxTheApp->GetAppName());
     115    wxWebBrowserShell* newFrame = new wxWebBrowserShell(wxTheApp->GetAppName());
    116116   
    117117    if (newFrame->webview) {
  • trunk/WebKit/wx/bindings/python/webview.i

    r32863 r33957  
    3030#include "wx/wxPython/pyclasses.h"
    3131#include "WebView.h"
    32 #include "WebFrame.h"
     32#include "WebBrowserShell.h"
    3333%}
    3434
     
    3939
    4040MustHaveApp(wxWebView);
    41 MustHaveApp(wxWebFrame);
     41MustHaveApp(wxWebBrowserShell);
    4242
    4343%include WebView.h
    44 %include WebFrame.h
     44%include WebBrowserShell.h
    4545
    4646%constant wxEventType wxEVT_WEBVIEW_BEFORE_LOAD;
  • trunk/WebKit/wx/wxwebkit.bkl

    r31091 r33957  
    7676           
    7777            WebView.cpp
    78             WebFrame.cpp
     78            WebBrowserShell.cpp
    7979        </sources>   
    8080    </dll>
Note: See TracChangeset for help on using the changeset viewer.