From 02b72bee46ca5e1a9a5ce3445b844a927a4aa962 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 11 May 2014 13:09:00 +0800 Subject: [PATCH 001/275] Integrate wxWebChromium to wxwidgets Also add webview_chromium usage samples. --- build/bakefiles/files.bkl | 7 + build/bakefiles/multilib.bkl | 1 + include/wx/webview_chromium.h | 28 + include/wx/webview_chromium3.h | 266 ++++ samples/webview_chromium/refresh.xpm | 234 ++++ samples/webview_chromium/stop.xpm | 331 +++++ samples/webview_chromium/webview.cpp | 1078 +++++++++++++++++ samples/webview_chromium/webview_chromium.bkl | 44 + samples/webview_chromium/wxlogo.xpm | 84 ++ src/common/webview_chromium3.cpp | 677 +++++++++++ 10 files changed, 2750 insertions(+) create mode 100644 include/wx/webview_chromium.h create mode 100644 include/wx/webview_chromium3.h create mode 100644 samples/webview_chromium/refresh.xpm create mode 100644 samples/webview_chromium/stop.xpm create mode 100644 samples/webview_chromium/webview.cpp create mode 100644 samples/webview_chromium/webview_chromium.bkl create mode 100644 samples/webview_chromium/wxlogo.xpm create mode 100644 src/common/webview_chromium3.cpp diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 0f38e0952f..181fda3d25 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3098,6 +3098,10 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! + + + + src/msw/webview_ie.cpp @@ -3110,6 +3114,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/common/webview.cpp src/common/webviewarchivehandler.cpp src/common/webviewfshandler.cpp + src/common/webview_chromium3.cpp $(WEBVIEW_SRC_PLATFORM) @@ -3135,6 +3140,8 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/webview.h wx/webviewarchivehandler.h wx/webviewfshandler.h + wx/webview_chromium.h + wx/webview_chromium3.h $(WEBVIEW_HDR_PLATFORM) diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index 3e3a1e8396..7bccf7ad1a 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -192,6 +192,7 @@ cond="SHARED=='0' and USE_GUI=='1' and USE_WEBVIEW=='1' and MONOLITHIC=='0'"> $(WEBVIEW_SRC) $(WEBVIEW_HDR) + $(CEF_INCLUDE_DIR) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h new file mode 100644 index 0000000000..4b599589cc --- /dev/null +++ b/include/wx/webview_chromium.h @@ -0,0 +1,28 @@ +///////////////////////////////////////////////////////////////////////////// +// Author: Steven Lamerton +// Copyright: (c) 2013 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WEBVIEWCHROMIUM_H_ +#define _WX_WEBVIEWCHROMIUM_H_ + +#include +#include + +#if !defined(CEF_VERSION_MAJOR) || \ + (defined(CEF_VERSION_MAJOR) && CEF_VERSION_MAJOR == 1) +#define CEF_API 1 +#elif defined(CEF_VERSION_MAJOR) && CEF_VERSION_MAJOR == 3 +#define CEF_API 3 +#else +#error "Could not find CEF" +#endif + +#if CEF_API == 1 +#include "webview_chromium1.h" +#elif CEF_API == 3 +#include "webview_chromium3.h" +#endif + +#endif // _WX_WEBVIEWCHROMIUM_H_ diff --git a/include/wx/webview_chromium3.h b/include/wx/webview_chromium3.h new file mode 100644 index 0000000000..74f6d9b0d5 --- /dev/null +++ b/include/wx/webview_chromium3.h @@ -0,0 +1,266 @@ +///////////////////////////////////////////////////////////////////////////// +// Author: Steven Lamerton +// Copyright: (c) 2013 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#ifndef _WX_WEBVIEWCHROMIUM3_H_ +#define _WX_WEBVIEWCHROMIUM3_H_ + +//#if CEF_API == 3 + +#include +#include +#include +#include +#include +#include + +#ifdef __VISUALC__ +#pragma warning(push) +#pragma warning(disable:4100) +#endif + +#include +#include + +#ifdef __VISUALC__ +#pragma warning(pop) +#endif + +extern const char wxWebViewBackendChromium[]; + +class wxWebViewChromium; + +// ClientHandler implementation. +class ClientHandler : public CefClient, + public CefContextMenuHandler, + public CefDisplayHandler, + public CefLifeSpanHandler, + public CefLoadHandler +{ +public: + ClientHandler() {}; + virtual ~ClientHandler() {}; + + virtual CefRefPtr GetContextMenuHandler() { return this; } + virtual CefRefPtr GetLifeSpanHandler() { return this; } + virtual CefRefPtr GetLoadHandler() { return this; } + virtual CefRefPtr GetDisplayHandler() { return this; } + + // CefDisplayHandler methods + virtual void OnLoadingStateChange(CefRefPtr browser, + bool isLoading, bool canGoBack, + bool canGoForward); + virtual void OnAddressChange(CefRefPtr browser, + CefRefPtr frame, + const CefString& url); + virtual void OnTitleChange(CefRefPtr browser, + const CefString& title); + virtual bool OnConsoleMessage(CefRefPtr browser, + const CefString& message, + const CefString& source, + int line); + + // CefContextMenuHandler methods + virtual void OnBeforeContextMenu(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr params, + CefRefPtr model); + virtual bool OnContextMenuCommand(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr params, + int command_id, + CefContextMenuHandler::EventFlags event_flags); + virtual void OnContextMenuDismissed(CefRefPtr browser, + CefRefPtr frame); + + // CefLifeSpanHandler methods + virtual bool OnBeforePopup(CefRefPtr browser, + CefRefPtr frame, + const CefString& target_url, + const CefString& target_frame_name, + const CefPopupFeatures& popupFeatures, + CefWindowInfo& windowInfo, + CefRefPtr& client, + CefBrowserSettings& settings, + bool* no_javascript_access); + virtual void OnAfterCreated(CefRefPtr browser); + virtual bool DoClose(CefRefPtr browser); + virtual void OnBeforeClose(CefRefPtr browser); + + // CefLoadHandler methods + virtual void OnLoadStart(CefRefPtr browser, + CefRefPtr frame); + virtual void OnLoadEnd(CefRefPtr browser, + CefRefPtr frame, + int httpStatusCode); + virtual void OnLoadError(CefRefPtr browser, + CefRefPtr frame, + ErrorCode errorCode, + const CefString& errorText, + const CefString& failedUrl); + + CefRefPtr GetBrowser() { return m_browser; } + + void SetWebView(wxWebViewChromium *webview) { m_webview = webview; } + +private: + CefRefPtr m_browser; + wxWebViewChromium *m_webview; + int m_browserId; + + IMPLEMENT_REFCOUNTING(ClientHandler); +}; + + +class WXDLLIMPEXP_WEBVIEW wxWebViewChromium : public wxWebView +{ +public: + + wxWebViewChromium() {} + + wxWebViewChromium(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { + Create(parent, id, url, pos, size, style, name); + } + + ~wxWebViewChromium(); + + void OnSize(wxSizeEvent &event); + + void SetPageSource(const wxString& pageSource); + + void SetPageText(const wxString& pageText); + + bool Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr); + + virtual void LoadURL(const wxString& url); + virtual void LoadHistoryItem(wxSharedPtr item); + virtual wxVector > GetBackwardHistory(); + virtual wxVector > GetForwardHistory(); + + virtual bool CanGoForward() const; + virtual bool CanGoBack() const; + virtual void GoBack(); + virtual void GoForward(); + virtual void ClearHistory(); + virtual void EnableHistory(bool enable = true); + virtual void Stop(); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); + + virtual wxString GetPageSource() const; + virtual wxString GetPageText() const; + + virtual bool IsBusy() const; + virtual wxString GetCurrentURL() const; + virtual wxString GetCurrentTitle() const; + + virtual void SetZoomType(wxWebViewZoomType type); + virtual wxWebViewZoomType GetZoomType() const; + virtual bool CanSetZoomType(wxWebViewZoomType type) const; + + virtual void Print(); + + virtual wxWebViewZoom GetZoom() const; + virtual void SetZoom(wxWebViewZoom zoom); + + virtual void* GetNativeBackend() const; + + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) { return wxNOT_FOUND; } + + //Clipboard functions + virtual bool CanCut() const { return true; } + virtual bool CanCopy() const { return true; } + virtual bool CanPaste() const { return true; } + virtual void Cut(); + virtual void Copy(); + virtual void Paste(); + + //Undo / redo functionality + virtual bool CanUndo() const { return true; } + virtual bool CanRedo() const { return true; } + virtual void Undo(); + virtual void Redo(); + + //Editing functions + virtual void SetEditable(bool enable = true); + virtual bool IsEditable() const { return false; } + + //Selection + virtual void SelectAll(); + virtual bool HasSelection() const { return false; } + virtual void DeleteSelection(); + virtual wxString GetSelectedText() const { return ""; } + virtual wxString GetSelectedSource() const { return ""; } + virtual void ClearSelection(); + + virtual void RunScript(const wxString& javascript); + + //Virtual Filesystem Support + virtual void RegisterHandler(wxSharedPtr handler); + + static bool StartUp(int &code, const wxString &path = ""); + // If using a separate subprocess then return the result of this function + static int StartUpSubprocess(); + static void Shutdown(); + +protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + +private: + //History related variables, we currently use our own implementation + wxVector > m_historyList; + int m_historyPosition; + bool m_historyLoadingFromList; + bool m_historyEnabled; + + //We need to store the title and zoom ourselves + wxString m_title; + wxWebViewZoom m_zoomLevel; + + //The timer calls the CEF event loop + wxTimer *m_timer; + + // Current main frame page source + wxString m_pageSource; + + // The text of the current page + wxString m_pageText; + + //We also friend ClientHandler so it can access the history + friend class ClientHandler; + CefRefPtr m_clientHandler; + + wxDECLARE_DYNAMIC_CLASS(wxWebViewChromium); +}; + +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryChromium : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewChromium; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewChromium(parent, id, url, pos, size, style, name); } +}; + +//#endif + +#endif // _WX_WEBVIEWCHROMIUM3_H_ diff --git a/samples/webview_chromium/refresh.xpm b/samples/webview_chromium/refresh.xpm new file mode 100644 index 0000000000..d976c2b7e7 --- /dev/null +++ b/samples/webview_chromium/refresh.xpm @@ -0,0 +1,234 @@ +/* XPM */ +static const char * refresh_xpm[] = { +"24 24 207 2", +" c None", +". c #3162A2", +"+ c #507BB3", +"@ c #6A90C0", +"# c #7296C4", +"$ c #7397C4", +"% c #7094C2", +"& c #648BBD", +"* c #507CB3", +"= c #3061A2", +"- c #8EACD1", +"; c #B3CBE4", +"> c #B7CEE6", +", c #B8CEE6", +"' c #B5CDE5", +") c #B4CBE5", +"! c #B0C9E3", +"~ c #AEC6E1", +"{ c #9FBBDB", +"] c #648DBE", +"^ c #2F60A2", +"/ c #3262A4", +"( c #3364A3", +"_ c #3C6BA8", +": c #A7C0DD", +"< c #C1D6EA", +"[ c #BAD0E7", +"} c #B6CDE5", +"| c #B6CCE6", +"1 c #B5CDE6", +"2 c #B3CBE5", +"3 c #AFC8E3", +"4 c #AAC5E2", +"5 c #ABC6E2", +"6 c #A0BCDB", +"7 c #4975AF", +"8 c #3666A5", +"9 c #89ACD3", +"0 c #2C5EA0", +"a c #82A3CB", +"b c #B5CCE4", +"c c #7095C3", +"d c #658CBC", +"e c #678EBE", +"f c #7196C2", +"g c #84A4CC", +"h c #A9C3E0", +"i c #B8CFE7", +"j c #ACC6E3", +"k c #A0BEDE", +"l c #9CBCDD", +"m c #9EBDDE", +"n c #6C93C1", +"o c #7B9FCA", +"p c #ABC7E3", +"q c #2B5DA0", +"r c #4976AE", +"s c #8EADD0", +"t c #4975AE", +"u c #3667A6", +"v c #3666A6", +"w c #4170AB", +"x c #5B83B6", +"y c #9BB9DA", +"z c #97B9DC", +"A c #7EA7D3", +"B c #7CA5D2", +"C c #88AED6", +"D c #8AAFD6", +"E c #A4C1E0", +"F c #406DAB", +"G c #4F7BB2", +"H c #4A77B3", +"I c #4C79B4", +"J c #2E5EA2", +"K c #6F95C3", +"L c #95B6D9", +"M c #7FA8D3", +"N c #76A1D0", +"O c #709DCE", +"P c #2B5DA1", +"Q c #3667A5", +"R c #4D7AB4", +"S c #648DC3", +"T c #4A78B3", +"U c #3262A2", +"V c #2C5FA0", +"W c #6B91C0", +"X c #97B8DB", +"Y c #74A0CF", +"Z c #709ECE", +"` c #ACC7E3", +" . c #2D5EA0", +".. c #3767A6", +"+. c #5985BD", +"@. c #78A3D0", +"#. c #6C9BCC", +"$. c #AEC9E5", +"%. c #3263A3", +"&. c #3768A7", +"*. c #9BB8DA", +"=. c #9CB9DA", +"-. c #9CBADA", +";. c #9FBBDC", +">. c #A8C1DF", +",. c #2D5FA0", +"'. c #22569B", +"). c #23579C", +"!. c #21569A", +"~. c #21559B", +"{. c #275A9E", +"]. c #3364A4", +"^. c #24589C", +"/. c #24579C", +"(. c #416FAB", +"_. c #C0D3E8", +":. c #B8CCE4", +"<. c #B5CBE3", +"[. c #AFC7E1", +"}. c #B0C8E2", +"|. c #88A9CF", +"1. c #4471AC", +"2. c #B9D1E8", +"3. c #94B6DA", +"4. c #95B7DB", +"5. c #A3C1DF", +"6. c #A4BEDC", +"7. c #2D60A0", +"8. c #BBD1E9", +"9. c #BCD1E8", +"0. c #416EA9", +"a. c #3868A7", +"b. c #BAD1E9", +"c. c #96B7DB", +"d. c #98B9DC", +"e. c #A2C0DF", +"f. c #AAC4DF", +"g. c #5F88BA", +"h. c #80A8D7", +"i. c #CDDCEC", +"j. c #7A9FC8", +"k. c #4273B1", +"l. c #3465A4", +"m. c #4371AC", +"n. c #B9D1E9", +"o. c #B4CCE5", +"p. c #9DBCDD", +"q. c #8EB2D8", +"r. c #91B3D9", +"s. c #719AC8", +"t. c #4171AC", +"u. c #3A6AA8", +"v. c #3A75BD", +"w. c #9CBBDB", +"x. c #608BC1", +"y. c #3A6EAD", +"z. c #4C80BB", +"A. c #3365A4", +"B. c #C6DAED", +"C. c #6F94C1", +"D. c #8CABD1", +"E. c #9BBBDD", +"F. c #6C9ACD", +"G. c #6596CA", +"H. c #709DCF", +"I. c #7AA4D2", +"J. c #6A96C8", +"K. c #5885BB", +"L. c #4F7EB7", +"M. c #497AB6", +"N. c #487AB6", +"O. c #4275B5", +"P. c #4C7FBB", +"Q. c #578BC6", +"R. c #396CAA", +"S. c #789CC6", +"T. c #5681B6", +"U. c #8AAFD7", +"V. c #77A2D1", +"W. c #6496CA", +"X. c #6294C9", +"Y. c #6395CA", +"Z. c #5F92C9", +"`. c #5C8FC7", +" + c #598DC6", +".+ c #588DC7", +"++ c #4175B2", +"@+ c #31619F", +"#+ c #6089BB", +"$+ c #77A0CE", +"%+ c #6E9CCD", +"&+ c #6696CA", +"*+ c #6193C9", +"=+ c #5F91C8", +"-+ c #5C90C7", +";+ c #5A8EC6", +">+ c #558AC3", +",+ c #4072AF", +"'+ c #27528A", +")+ c #2A5285", +"!+ c #3C6599", +"~+ c #4B77B0", +"{+ c #4E7DB6", +"]+ c #4C7CB7", +"^+ c #4877B2", +"/+ c #3B69A2", +"(+ c #3361A0", +" ", +" . + @ # $ % & * ", +" = - ; > , ' ) ! ~ { ] ^ / ( ", +" _ : < [ } | 1 2 3 4 5 > 6 7 8 9 0 ", +" a b a c d e f g h i j k l m n o p q ", +" r s t u v w x y z A B C D E q ", +" F G H I J K L M N O 4 P ", +" Q R S T U V W X Y Z ` . ", +" ..+. t L @.Z #.$.0 ", +" %. &.{ *.=.-.;.>.,. ", +" '.).!.~.~.{.]. %.^./.^./.).'. ", +" (._.:.<.[.}.|.V ]. ", +" 1.2.3.4.5.6.7. %. ", +" 1.8.X l 9.0. a.( ", +" 1.b.c.d.e.f.g. h.i.j.k.l. ", +" m.n.o.p.3.q.r.s.t.u. v.w.x.y.z.A. ", +" m.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R. ", +" (.S. T.U.V.W.X.Y.Y.X.Z.`. +.+++ ", +" ]. @+#+$+%+&+*+=+-+;+>+,+ ", +" '+)+!+~+{+]+^+/+(+ ", +" ", +" ", +" ", +" "}; diff --git a/samples/webview_chromium/stop.xpm b/samples/webview_chromium/stop.xpm new file mode 100644 index 0000000000..ab0c179adc --- /dev/null +++ b/samples/webview_chromium/stop.xpm @@ -0,0 +1,331 @@ +/* XPM */ +static const char * stop_xpm[] = { +"24 24 304 2", +" c None", +". c #920F0F", +"+ c #931212", +"@ c #931111", +"# c #8F0909", +"$ c #981414", +"% c #DC6666", +"& c #F07575", +"* c #EF7272", +"= c #EE7171", +"- c #EE6F6F", +"; c #EE6D6D", +"> c #EE6C6C", +", c #E46969", +"' c #980F0F", +") c #8E0606", +"! c #EA7B7B", +"~ c #E25858", +"{ c #D84040", +"] c #D83F3F", +"^ c #D83E3E", +"/ c #D83D3D", +"( c #D73C3C", +"_ c #D73A3A", +": c #DD4A4A", +"< c #EC7272", +"[ c #950909", +"} c #9A1616", +"| c #EB7C7C", +"1 c #E15959", +"2 c #D74040", +"3 c #D94444", +"4 c #D94343", +"5 c #D94242", +"6 c #D94141", +"7 c #D93F3F", +"8 c #D73D3D", +"9 c #D73939", +"0 c #DD4747", +"a c #E96D6D", +"b c #A21818", +"c c #9D1717", +"d c #DC6868", +"e c #E25959", +"f c #D94545", +"g c #D84545", +"h c #DA4545", +"i c #D84242", +"j c #D84141", +"k c #D63D3D", +"l c #D73B3B", +"m c #D63838", +"n c #DC4747", +"o c #D95555", +"p c #9D1414", +"q c #940909", +"r c #E15757", +"s c #DC4848", +"t c #F64949", +"u c #D94747", +"v c #D94646", +"w c #D73F3F", +"x c #EA4141", +"y c #E53D3D", +"z c #D53A3A", +"A c #D43838", +"B c #DB4747", +"C c #E66161", +"D c #920606", +"E c #9D1818", +"F c #EC7C7C", +"G c #DF5353", +"H c #DC4545", +"I c #F15A5A", +"J c #EEB2B2", +"K c #F55757", +"L c #DB4545", +"M c #EA4545", +"N c #F38383", +"O c #F27979", +"P c #DC3D3D", +"Q c #D33838", +"R c #D13535", +"S c #D84343", +"T c #E35C5C", +"U c #980E0E", +"V c #BD4949", +"W c #E25656", +"X c #D74343", +"Y c #F44F4F", +"Z c #EBBFBF", +"` c #E4EBEB", +" . c #EBC7C7", +".. c #F15D5D", +"+. c #DB4141", +"@. c #EA4747", +"#. c #F09C9C", +"$. c #E4EFEF", +"%. c #E5DDDD", +"&. c #FC5858", +"*. c #D53939", +"=. c #D13737", +"-. c #CE3333", +";. c #B93434", +">. c #DC4949", +",. c #E34545", +"'. c #F48F8F", +"). c #E7E6E6", +"!. c #E8E9E9", +"~. c #EDCBCB", +"{. c #F45A5A", +"]. c #EA4C4C", +"^. c #F2A3A3", +"/. c #E9E9E9", +"(. c #E7E9E9", +"_. c #F0B0B0", +":. c #E74848", +"<. c #CF3636", +"[. c #CE3535", +"}. c #D23A3A", +"|. c #BC4949", +"1. c #DD4848", +"2. c #E74444", +"3. c #F29E9E", +"4. c #EAE9E9", +"5. c #EBF0F0", +"6. c #F0CECE", +"7. c #F79191", +"8. c #EAF4F4", +"9. c #EBECEC", +"0. c #EFC4C4", +"a. c #EA4B4B", +"b. c #D13939", +"c. c #CF3737", +"d. c #CD3434", +"e. c #D13A3A", +"f. c #B83333", +"g. c #D73E3E", +"h. c #E74646", +"i. c #F59E9E", +"j. c #EFE8E8", +"k. c #EEF1F1", +"l. c #EEF5F5", +"m. c #F3BABA", +"n. c #EA5050", +"o. c #D23B3B", +"p. c #D03A3A", +"q. c #CF3939", +"r. c #CC3535", +"s. c #CA3131", +"t. c #B83232", +"u. c #BD4848", +"v. c #D83A3A", +"w. c #F05D5D", +"x. c #F5BEBE", +"y. c #F1F2F2", +"z. c #F2E6E6", +"A. c #FE7A7A", +"B. c #CF3434", +"C. c #C92121", +"D. c #C61212", +"E. c #C10707", +"F. c #C00505", +"G. c #BE0404", +"H. c #C30C0C", +"I. c #B72222", +"J. c #BC4848", +"K. c #DC4343", +"L. c #D73838", +"M. c #E95A5A", +"N. c #F8ADAD", +"O. c #F2F9F9", +"P. c #F3F3F3", +"Q. c #F4F2F2", +"R. c #F3F7F7", +"S. c #F2D5D5", +"T. c #F05050", +"U. c #C30000", +"V. c #BF0000", +"W. c #BE0000", +"X. c #BD0000", +"Y. c #BB0000", +"Z. c #C00707", +"`. c #B71F1F", +" + c #BC4646", +".+ c #DC4141", +"++ c #D63636", +"@+ c #D63737", +"#+ c #EA5C5C", +"$+ c #F6B9B9", +"%+ c #F4FAFA", +"&+ c #F9C5C5", +"*+ c #FCACAC", +"=+ c #F4F0F0", +"-+ c #F1F6F6", +";+ c #EB5F5F", +">+ c #C00101", +",+ c #B90000", +"'+ c #BF0707", +")+ c #B61D1D", +"!+ c #BC4545", +"~+ c #DA3E3E", +"{+ c #D73535", +"]+ c #D63434", +"^+ c #EA6363", +"/+ c #F5BFBF", +"(+ c #F1F1F1", +"_+ c #F5F6F6", +":+ c #FAC9C9", +"<+ c #DF3C3C", +"[+ c #D21B1B", +"}+ c #FBADAD", +"|+ c #F5F4F4", +"1+ c #F2F2F2", +"2+ c #F1D7D7", +"3+ c #F07373", +"4+ c #B80000", +"5+ c #BD0707", +"6+ c #B61C1C", +"7+ c #B53B3B", +"8+ c #E75D5D", +"9+ c #D63333", +"0+ c #D53333", +"a+ c #D42F2F", +"b+ c #F58686", +"c+ c #F3D4D4", +"d+ c #F2F3F3", +"e+ c #F6D3D3", +"f+ c #E44343", +"g+ c #C40000", +"h+ c #C20000", +"i+ c #D82C2C", +"j+ c #F7B7B7", +"k+ c #F0E9E9", +"l+ c #FA8F8F", +"m+ c #BE0A0A", +"n+ c #B70000", +"o+ c #B60000", +"p+ c #C20C0C", +"q+ c #B41919", +"r+ c #8B0101", +"s+ c #C44848", +"t+ c #EC5F5F", +"u+ c #D52A2A", +"v+ c #D22424", +"w+ c #CE1C1C", +"x+ c #E96969", +"y+ c #FBC4C4", +"z+ c #E44949", +"A+ c #C40101", +"B+ c #C10000", +"C+ c #D53131", +"D+ c #FBBEBE", +"E+ c #F09292", +"F+ c #C00E0E", +"G+ c #B50000", +"H+ c #C71212", +"I+ c #980707", +"J+ c #890101", +"K+ c #B52828", +"L+ c #E63D3D", +"M+ c #C90202", +"N+ c #C70000", +"O+ c #C80505", +"P+ c #D32424", +"Q+ c #C61B1B", +"R+ c #C11111", +"S+ c #C81313", +"T+ c #8C0101", +"U+ c #880000", +"V+ c #BE2E2E", +"W+ c #DC2D2D", +"X+ c #C50000", +"Y+ c #BC0000", +"Z+ c #C30D0D", +"`+ c #CE2424", +" @ c #850000", +".@ c #BE2B2B", +"+@ c #E33434", +"@@ c #C00000", +"#@ c #CC1616", +"$@ c #CB2222", +"%@ c #910404", +"&@ c #790000", +"*@ c #B21D1D", +"=@ c #E03131", +"-@ c #B40000", +";@ c #CD1818", +">@ c #C61F1F", +",@ c #830000", +"'@ c #730000", +")@ c #B92525", +"!@ c #E14444", +"~@ c #E04141", +"{@ c #DF3F3F", +"]@ c #DE3C3C", +"^@ c #DE3A3A", +"/@ c #DE3737", +"(@ c #DD3535", +"_@ c #DD3232", +":@ c #C42121", +"<@ c #7E0000", +"[@ c #720000", +"}@ c #770000", +" . + + + + + + @ @ # ", +" $ % & * * * = - ; > , ' ", +" ) ! ~ { { { ] ^ / ( _ : < [ ", +" } | 1 2 3 3 4 5 6 7 ^ 8 9 0 a b ", +" c d e 6 f g f h 4 i j 7 k l m n o p ", +" q | r 4 f s t u v h i 6 w x y z A B C D ", +" E F G w 4 H I J K L f i j M N O P Q R S T U ", +" V W / 6 X Y Z ` ...+.j @.#.$.%.&.*.=.-.f ;. ", +" V >.7 { i ,.'.).!.~.{.].^./.(._.:.=.<.[.}.;. ", +" |.1.^ ] 7 { 2.3.4.5.6.7.8.9.0.a.b.c.[.d.e.f. ", +" |.0 ( 8 ^ ] g.h.i.j.k.l.k.m.n.o.p.q.r.s.<.t. ", +" u.H v.l ( / / *.w.x.y.y.z.A.B.C.D.E.F.G.H.I. ", +" J.K.L.9 _ _ _ M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. ", +" +.+++@+L.@+#+$+O.%+&+*+=+-+S.;+>+X.Y.,+'+)+ ", +" !+~+{+{+]+^+/+(+_+:+<+[+}+|+1+2+3+Y.,+4+5+6+ ", +" 7+8+9+0+a+b+c+d+e+f+g+h+i+j+P.k+l+m+n+o+p+q+ ", +" r+s+t+u+v+w+x+y+z+A+h+B+X.C+D+E+F+n+G+H+v+I+ ", +" J+K+L+M+N+O+P+A+h+B+V.X.Y.Q+R+4+o+S+v+T+ ", +" U+V+W+N+X+U.h+B+V.X.Y+Y.,+4+o+Z+`+T+ ", +" @.@+@A+h+@@W.X.Y+Y.,+4+G+#@$@%@ ", +" &@*@=@V.Y+Y.,+4+o+G+-@;@>@,@ ", +" '@)@!@~@{@]@^@/@(@_@:@<@ ", +" [@&@&@&@&@&@&@&@&@}@ ", +" "}; diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp new file mode 100644 index 0000000000..ae53a256ca --- /dev/null +++ b/samples/webview_chromium/webview.cpp @@ -0,0 +1,1078 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: webview.cpp +// Purpose: wxWebView sample +// Author: Marianne Gagnon +// Id: $Id: webview.cpp 73453 2013-02-01 09:38:53Z SJL $ +// Copyright: (c) 2010 Marianne Gagnon, Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +// ---------------------------------------------------------------------------- +// headers +// ---------------------------------------------------------------------------- + +// For compilers that support precompilation, includes "wx/wx.h". +#include "wx/wxprec.h" + +#ifdef __BORLANDC__ + #pragma hdrstop +#endif + +#ifndef WX_PRECOMP + #include "wx/wx.h" +#endif + +#if !wxUSE_WEBVIEW_WEBKIT && !wxUSE_WEBVIEW_IE +#error "A wxWebView backend is required by this sample" +#endif + +#include "wx/artprov.h" +#include "wx/cmdline.h" +#include "wx/notifmsg.h" +#include "wx/settings.h" +#include "wx/webview.h" +#include "wx/webviewarchivehandler.h" +#include "wx/webviewfshandler.h" +#include "wx/infobar.h" +#include "wx/filesys.h" +#include "wx/fs_arc.h" +#include "wx/fs_mem.h" + +#include "wx/webview_chromium.h" + +#ifndef wxHAS_IMAGES_IN_RESOURCES + #include "../sample.xpm" +#endif + +#if wxUSE_STC +#include "wx/stc/stc.h" +#else +#error "wxStyledTextControl is needed by this sample" +#endif + +#if defined(__WXMSW__) || defined(__WXOSX__) +#include "stop.xpm" +#include "refresh.xpm" +#endif + +#include "wxlogo.xpm" + + +//We map menu items to their history items +WX_DECLARE_HASH_MAP(int, wxSharedPtr, + wxIntegerHash, wxIntegerEqual, wxMenuHistoryMap); + +class WebApp : public wxApp +{ +public: + WebApp() : + m_url("http://www.wxwidgets.org") + { + } + + virtual bool OnInit(); + virtual int OnExit(); + /* +#if wxUSE_CMDLINE_PARSER + virtual void OnInitCmdLine(wxCmdLineParser& parser) + { + wxApp::OnInitCmdLine(parser); + + parser.AddParam("URL to open", + wxCMD_LINE_VAL_STRING, + wxCMD_LINE_PARAM_OPTIONAL); + } + + virtual bool OnCmdLineParsed(wxCmdLineParser& parser) + { + if ( !wxApp::OnCmdLineParsed(parser) ) + return false; + + if ( parser.GetParamCount() ) + m_url = parser.GetParam(0); + + return true; + } +#endif // wxUSE_CMDLINE_PARSER + */ +private: + wxString m_url; +}; + +class WebFrame : public wxFrame +{ +public: + WebFrame(const wxString& url); + virtual ~WebFrame(); + + void UpdateState(); + void OnIdle(wxIdleEvent& evt); + void OnUrl(wxCommandEvent& evt); + void OnBack(wxCommandEvent& evt); + void OnForward(wxCommandEvent& evt); + void OnStop(wxCommandEvent& evt); + void OnReload(wxCommandEvent& evt); + void OnClearHistory(wxCommandEvent& evt); + void OnEnableHistory(wxCommandEvent& evt); + void OnNavigationRequest(wxWebViewEvent& evt); + void OnNavigationComplete(wxWebViewEvent& evt); + void OnDocumentLoaded(wxWebViewEvent& evt); + void OnNewWindow(wxWebViewEvent& evt); + void OnTitleChanged(wxWebViewEvent& evt); + void OnViewSourceRequest(wxCommandEvent& evt); + void OnViewTextRequest(wxCommandEvent& evt); + void OnToolsClicked(wxCommandEvent& evt); + void OnSetZoom(wxCommandEvent& evt); + void OnError(wxWebViewEvent& evt); + void OnPrint(wxCommandEvent& evt); + void OnCut(wxCommandEvent& evt); + void OnCopy(wxCommandEvent& evt); + void OnPaste(wxCommandEvent& evt); + void OnUndo(wxCommandEvent& evt); + void OnRedo(wxCommandEvent& evt); + void OnMode(wxCommandEvent& evt); + void OnZoomLayout(wxCommandEvent& evt); + void OnHistory(wxCommandEvent& evt); + void OnScrollLineUp(wxCommandEvent&) { m_browser->LineUp(); } + void OnScrollLineDown(wxCommandEvent&) { m_browser->LineDown(); } + void OnScrollPageUp(wxCommandEvent&) { m_browser->PageUp(); } + void OnScrollPageDown(wxCommandEvent&) { m_browser->PageDown(); } + void OnRunScript(wxCommandEvent& evt); + void OnClearSelection(wxCommandEvent& evt); + void OnDeleteSelection(wxCommandEvent& evt); + void OnSelectAll(wxCommandEvent& evt); + void OnLoadScheme(wxCommandEvent& evt); + void OnUseMemoryFS(wxCommandEvent& evt); + void OnFind(wxCommandEvent& evt); + void OnFindDone(wxCommandEvent& evt); + void OnFindText(wxCommandEvent& evt); + void OnFindOptions(wxCommandEvent& evt); + void OnEnableContextMenu(wxCommandEvent& evt); + +private: + wxTextCtrl* m_url; + wxWebView* m_browser; + + wxToolBar* m_toolbar; + wxToolBarToolBase* m_toolbar_back; + wxToolBarToolBase* m_toolbar_forward; + wxToolBarToolBase* m_toolbar_stop; + wxToolBarToolBase* m_toolbar_reload; + wxToolBarToolBase* m_toolbar_tools; + + wxToolBarToolBase* m_find_toolbar_done; + wxToolBarToolBase* m_find_toolbar_next; + wxToolBarToolBase* m_find_toolbar_previous; + wxToolBarToolBase* m_find_toolbar_options; + wxMenuItem* m_find_toolbar_wrap; + wxMenuItem* m_find_toolbar_highlight; + wxMenuItem* m_find_toolbar_matchcase; + wxMenuItem* m_find_toolbar_wholeword; + + wxMenu* m_tools_menu; + wxMenu* m_tools_history_menu; + wxMenuItem* m_tools_layout; + wxMenuItem* m_tools_tiny; + wxMenuItem* m_tools_small; + wxMenuItem* m_tools_medium; + wxMenuItem* m_tools_large; + wxMenuItem* m_tools_largest; + wxMenuItem* m_tools_handle_navigation; + wxMenuItem* m_tools_handle_new_window; + wxMenuItem* m_tools_enable_history; + wxMenuItem* m_edit_cut; + wxMenuItem* m_edit_copy; + wxMenuItem* m_edit_paste; + wxMenuItem* m_edit_undo; + wxMenuItem* m_edit_redo; + wxMenuItem* m_edit_mode; + wxMenuItem* m_scroll_line_up; + wxMenuItem* m_scroll_line_down; + wxMenuItem* m_scroll_page_up; + wxMenuItem* m_scroll_page_down; + wxMenuItem* m_selection_clear; + wxMenuItem* m_selection_delete; + wxMenuItem* m_find; + wxMenuItem* m_context_menu; + + wxInfoBar *m_info; + wxStaticText* m_info_text; + wxTextCtrl* m_find_ctrl; + wxToolBar* m_find_toolbar; + + wxMenuHistoryMap m_histMenuItems; + wxString m_findText; + int m_findFlags, m_findCount; +}; + +class SourceViewDialog : public wxDialog +{ +public: + SourceViewDialog(wxWindow* parent, wxString source); +}; + +IMPLEMENT_APP(WebApp) + +// ============================================================================ +// implementation +// ============================================================================ + +bool WebApp::OnInit() +{ + // We spawn a separate subprocess + int code = 0; + if(!wxWebViewChromium::StartUp(code, "subprocess.exe")) + exit(code); + + if ( !wxApp::OnInit() ) + return false; + + //Required for virtual file system archive and memory support + wxFileSystem::AddHandler(new wxArchiveFSHandler); + wxFileSystem::AddHandler(new wxMemoryFSHandler); + + // Create the memory files + wxImage::AddHandler(new wxPNGHandler); + wxMemoryFSHandler::AddFile("logo.png", + wxBitmap(wxlogo_xpm), wxBITMAP_TYPE_PNG); + wxMemoryFSHandler::AddFile("page1.htm", + "File System Example" + "" + "

Page 1

" + "

" + "

Some text about Page 2.

"); + wxMemoryFSHandler::AddFile("page2.htm", + "File System Example" + "" + "

Page 2

" + "

Page 1 was better.

"); + wxMemoryFSHandler::AddFile("test.css", "h1 {color: red;}"); + + WebFrame *frame = new WebFrame(m_url); + frame->Show(); + + return true; +} + +int WebApp::OnExit() +{ + wxWebViewChromium::Shutdown(); + return wxApp::OnExit(); +} + +WebFrame::WebFrame(const wxString& url) : + wxFrame(NULL, wxID_ANY, "wxWebView Sample") +{ + // set the frame icon + SetIcon(wxICON(sample)); + SetTitle("wxWebView Sample"); + + wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); + + // Create the toolbar + m_toolbar = CreateToolBar(wxTB_TEXT); + m_toolbar->SetToolBitmapSize(wxSize(32, 32)); + + wxBitmap back = wxArtProvider::GetBitmap(wxART_GO_BACK , wxART_TOOLBAR); + wxBitmap forward = wxArtProvider::GetBitmap(wxART_GO_FORWARD , wxART_TOOLBAR); + #ifdef __WXGTK__ + wxBitmap stop = wxArtProvider::GetBitmap("gtk-stop", wxART_TOOLBAR); + #else + wxBitmap stop = wxBitmap(stop_xpm); + #endif + #ifdef __WXGTK__ + wxBitmap refresh = wxArtProvider::GetBitmap("gtk-refresh", wxART_TOOLBAR); + #else + wxBitmap refresh = wxBitmap(refresh_xpm); + #endif + + m_toolbar_back = m_toolbar->AddTool(wxID_ANY, _("Back"), back); + m_toolbar_forward = m_toolbar->AddTool(wxID_ANY, _("Forward"), forward); + m_toolbar_stop = m_toolbar->AddTool(wxID_ANY, _("Stop"), stop); + m_toolbar_reload = m_toolbar->AddTool(wxID_ANY, _("Reload"), refresh); + m_url = new wxTextCtrl(m_toolbar, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(400, -1), wxTE_PROCESS_ENTER ); + m_toolbar->AddControl(m_url, _("URL")); + m_toolbar_tools = m_toolbar->AddTool(wxID_ANY, _("Menu"), wxBitmap(wxlogo_xpm)); + + m_toolbar->Realize(); + + // Set find values. + m_findFlags = wxWEBVIEW_FIND_DEFAULT; + m_findText = wxEmptyString; + m_findCount = 0; + + // Create panel for find toolbar. + wxPanel* panel = new wxPanel(this); + topsizer->Add(panel, wxSizerFlags().Expand()); + + // Create sizer for panel. + wxBoxSizer* panel_sizer = new wxBoxSizer(wxVERTICAL); + panel->SetSizer(panel_sizer); + + // Create the find toolbar. + m_find_toolbar = new wxToolBar(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL|wxTB_TEXT|wxTB_HORZ_LAYOUT); + m_find_toolbar->Hide(); + panel_sizer->Add(m_find_toolbar, wxSizerFlags().Expand()); + + // Create find control. + m_find_ctrl = new wxTextCtrl(m_find_toolbar, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(140,-1), wxTE_PROCESS_ENTER); + + + //Find options menu + wxMenu* findmenu = new wxMenu; + m_find_toolbar_wrap = findmenu->AppendCheckItem(wxID_ANY,"Wrap"); + m_find_toolbar_matchcase = findmenu->AppendCheckItem(wxID_ANY,"Match Case"); + m_find_toolbar_wholeword = findmenu->AppendCheckItem(wxID_ANY,"Entire Word"); + m_find_toolbar_highlight = findmenu->AppendCheckItem(wxID_ANY,"Highlight"); + // Add find toolbar tools. + m_find_toolbar->SetToolSeparation(7); + m_find_toolbar_done = m_find_toolbar->AddTool(wxID_ANY, "Close", wxArtProvider::GetBitmap(wxART_CROSS_MARK)); + m_find_toolbar->AddSeparator(); + m_find_toolbar->AddControl(m_find_ctrl, "Find"); + m_find_toolbar->AddSeparator(); + m_find_toolbar_next = m_find_toolbar->AddTool(wxID_ANY, "Next", wxArtProvider::GetBitmap(wxART_GO_DOWN, wxART_TOOLBAR, wxSize(16,16))); + m_find_toolbar_previous = m_find_toolbar->AddTool(wxID_ANY, "Previous", wxArtProvider::GetBitmap(wxART_GO_UP, wxART_TOOLBAR, wxSize(16,16))); + m_find_toolbar->AddSeparator(); + m_find_toolbar_options = m_find_toolbar->AddTool(wxID_ANY, "Options", wxArtProvider::GetBitmap(wxART_PLUS, wxART_TOOLBAR, wxSize(16,16)), "", wxITEM_DROPDOWN); + m_find_toolbar_options->SetDropdownMenu(findmenu); + m_find_toolbar->Realize(); + + // Create the info panel + m_info = new wxInfoBar(this); + topsizer->Add(m_info, wxSizerFlags().Expand()); + + // Create the webview + wxWebView::RegisterFactory(wxWebViewBackendChromium, wxSharedPtr + (new wxWebViewFactoryChromium)); + + m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxSize(300, 300), wxWebViewBackendChromium); + topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1)); + + //We register the wxfs:// protocol for testing purposes + m_browser->RegisterHandler(wxSharedPtr(new wxWebViewArchiveHandler("wxfs"))); + //And the memory: file system + m_browser->RegisterHandler(wxSharedPtr(new wxWebViewFSHandler("memory"))); + + SetSizer(topsizer); + + //Set a more sensible size for web browsing + SetSize(wxSize(800, 600)); + + // Create a log window + new wxLogWindow(this, _("Logging"), true, false); + + // Create the Tools menu + m_tools_menu = new wxMenu(); + wxMenuItem* print = m_tools_menu->Append(wxID_ANY , _("Print")); + wxMenuItem* viewSource = m_tools_menu->Append(wxID_ANY , _("View Source")); + wxMenuItem* viewText = m_tools_menu->Append(wxID_ANY, _("View Text")); + m_tools_menu->AppendSeparator(); + m_tools_layout = m_tools_menu->AppendCheckItem(wxID_ANY, _("Use Layout Zoom")); + m_tools_tiny = m_tools_menu->AppendCheckItem(wxID_ANY, _("Tiny")); + m_tools_small = m_tools_menu->AppendCheckItem(wxID_ANY, _("Small")); + m_tools_medium = m_tools_menu->AppendCheckItem(wxID_ANY, _("Medium")); + m_tools_large = m_tools_menu->AppendCheckItem(wxID_ANY, _("Large")); + m_tools_largest = m_tools_menu->AppendCheckItem(wxID_ANY, _("Largest")); + m_tools_menu->AppendSeparator(); + m_tools_handle_navigation = m_tools_menu->AppendCheckItem(wxID_ANY, _("Handle Navigation")); + m_tools_handle_new_window = m_tools_menu->AppendCheckItem(wxID_ANY, _("Handle New Windows")); + m_tools_menu->AppendSeparator(); + + //Find + m_find = m_tools_menu->Append(wxID_ANY, _("Find")); + m_tools_menu->AppendSeparator(); + + //History menu + m_tools_history_menu = new wxMenu(); + wxMenuItem* clearhist = m_tools_history_menu->Append(wxID_ANY, _("Clear History")); + m_tools_enable_history = m_tools_history_menu->AppendCheckItem(wxID_ANY, _("Enable History")); + m_tools_history_menu->AppendSeparator(); + + m_tools_menu->AppendSubMenu(m_tools_history_menu, "History"); + + //Create an editing menu + wxMenu* editmenu = new wxMenu(); + m_edit_cut = editmenu->Append(wxID_ANY, _("Cut")); + m_edit_copy = editmenu->Append(wxID_ANY, _("Copy")); + m_edit_paste = editmenu->Append(wxID_ANY, _("Paste")); + editmenu->AppendSeparator(); + m_edit_undo = editmenu->Append(wxID_ANY, _("Undo")); + m_edit_redo = editmenu->Append(wxID_ANY, _("Redo")); + editmenu->AppendSeparator(); + m_edit_mode = editmenu->AppendCheckItem(wxID_ANY, _("Edit Mode")); + + m_tools_menu->AppendSeparator(); + m_tools_menu->AppendSubMenu(editmenu, "Edit"); + + wxMenu* scroll_menu = new wxMenu; + m_scroll_line_up = scroll_menu->Append(wxID_ANY, "Line &up"); + m_scroll_line_down = scroll_menu->Append(wxID_ANY, "Line &down"); + m_scroll_page_up = scroll_menu->Append(wxID_ANY, "Page u&p"); + m_scroll_page_down = scroll_menu->Append(wxID_ANY, "Page d&own"); + m_tools_menu->AppendSubMenu(scroll_menu, "Scroll"); + + wxMenuItem* script = m_tools_menu->Append(wxID_ANY, _("Run Script")); + + //Selection menu + wxMenu* selection = new wxMenu(); + m_selection_clear = selection->Append(wxID_ANY, _("Clear Selection")); + m_selection_delete = selection->Append(wxID_ANY, _("Delete Selection")); + wxMenuItem* selectall = selection->Append(wxID_ANY, _("Select All")); + + editmenu->AppendSubMenu(selection, "Selection"); + + wxMenuItem* loadscheme = m_tools_menu->Append(wxID_ANY, _("Custom Scheme Example")); + wxMenuItem* usememoryfs = m_tools_menu->Append(wxID_ANY, _("Memory File System Example")); + + m_context_menu = m_tools_menu->AppendCheckItem(wxID_ANY, _("Enable Context Menu")); + + //By default we want to handle navigation and new windows + m_tools_handle_navigation->Check(); + m_tools_handle_new_window->Check(); + m_tools_enable_history->Check(); + if(!m_browser->CanSetZoomType(wxWEBVIEW_ZOOM_TYPE_LAYOUT)) + m_tools_layout->Enable(false); + + + // Connect the toolbar events + Connect(m_toolbar_back->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler(WebFrame::OnBack), NULL, this ); + Connect(m_toolbar_forward->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler(WebFrame::OnForward), NULL, this ); + Connect(m_toolbar_stop->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler(WebFrame::OnStop), NULL, this ); + Connect(m_toolbar_reload->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler(WebFrame::OnReload),NULL, this ); + Connect(m_toolbar_tools->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler(WebFrame::OnToolsClicked), NULL, this ); + + Connect(m_url->GetId(), wxEVT_COMMAND_TEXT_ENTER, + wxCommandEventHandler(WebFrame::OnUrl), NULL, this ); + + // Connect find toolbar events. + Connect(m_find_toolbar_done->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler(WebFrame::OnFindDone), NULL, this ); + Connect(m_find_toolbar_next->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); + Connect(m_find_toolbar_previous->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); + + // Connect find control events. + Connect(m_find_ctrl->GetId(), wxEVT_COMMAND_TEXT_UPDATED, + wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); + Connect(m_find_ctrl->GetId(), wxEVT_COMMAND_TEXT_ENTER, + wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); + + // Connect the webview events + Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_NAVIGATING, + wxWebViewEventHandler(WebFrame::OnNavigationRequest), NULL, this); + Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_NAVIGATED, + wxWebViewEventHandler(WebFrame::OnNavigationComplete), NULL, this); + Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_LOADED, + wxWebViewEventHandler(WebFrame::OnDocumentLoaded), NULL, this); + Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_ERROR, + wxWebViewEventHandler(WebFrame::OnError), NULL, this); + Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_NEWWINDOW, + wxWebViewEventHandler(WebFrame::OnNewWindow), NULL, this); + Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, + wxWebViewEventHandler(WebFrame::OnTitleChanged), NULL, this); + + // Connect the menu events + Connect(viewSource->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnViewSourceRequest), NULL, this ); + Connect(viewText->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnViewTextRequest), NULL, this ); + Connect(print->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnPrint), NULL, this ); + Connect(m_tools_layout->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnZoomLayout), NULL, this ); + Connect(m_tools_tiny->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); + Connect(m_tools_small->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); + Connect(m_tools_medium->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); + Connect(m_tools_large->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); + Connect(m_tools_largest->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); + Connect(clearhist->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnClearHistory), NULL, this ); + Connect(m_tools_enable_history->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnEnableHistory), NULL, this ); + Connect(m_edit_cut->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnCut), NULL, this ); + Connect(m_edit_copy->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnCopy), NULL, this ); + Connect(m_edit_paste->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnPaste), NULL, this ); + Connect(m_edit_undo->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnUndo), NULL, this ); + Connect(m_edit_redo->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnRedo), NULL, this ); + Connect(m_edit_mode->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnMode), NULL, this ); + Connect(m_scroll_line_up->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnScrollLineUp), NULL, this ); + Connect(m_scroll_line_down->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnScrollLineDown), NULL, this ); + Connect(m_scroll_page_up->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnScrollPageUp), NULL, this ); + Connect(m_scroll_page_down->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnScrollPageDown), NULL, this ); + Connect(script->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnRunScript), NULL, this ); + Connect(m_selection_clear->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnClearSelection), NULL, this ); + Connect(m_selection_delete->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnDeleteSelection), NULL, this ); + Connect(selectall->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnSelectAll), NULL, this ); + Connect(loadscheme->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnLoadScheme), NULL, this ); + Connect(usememoryfs->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnUseMemoryFS), NULL, this ); + Connect(m_find->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnFind), NULL, this ); + Connect(m_context_menu->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnEnableContextMenu), NULL, this ); + + //Connect the idle events + Connect(wxID_ANY, wxEVT_IDLE, wxIdleEventHandler(WebFrame::OnIdle), NULL, this); +} + +WebFrame::~WebFrame() +{ + delete m_tools_menu; +} + +/** + * Method that retrieves the current state from the web control and updates the GUI + * the reflect this current state. + */ +void WebFrame::UpdateState() +{ + m_toolbar->EnableTool( m_toolbar_back->GetId(), m_browser->CanGoBack() ); + m_toolbar->EnableTool( m_toolbar_forward->GetId(), m_browser->CanGoForward() ); + + if (m_browser->IsBusy()) + { + m_toolbar->EnableTool( m_toolbar_stop->GetId(), true ); + } + else + { + m_toolbar->EnableTool( m_toolbar_stop->GetId(), false ); + } + + SetTitle( m_browser->GetCurrentTitle() ); + m_url->SetValue( m_browser->GetCurrentURL() ); +} + +void WebFrame::OnIdle(wxIdleEvent& WXUNUSED(evt)) +{ + if(m_browser->IsBusy()) + { + wxSetCursor(wxCURSOR_ARROWWAIT); + m_toolbar->EnableTool(m_toolbar_stop->GetId(), true); + } + else + { + wxSetCursor(wxNullCursor); + m_toolbar->EnableTool(m_toolbar_stop->GetId(), false); + } +} + +/** + * Callback invoked when user entered an URL and pressed enter + */ +void WebFrame::OnUrl(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->LoadURL( m_url->GetValue() ); + m_browser->SetFocus(); + UpdateState(); +} + +/** + * Callback invoked when user pressed the "back" button + */ +void WebFrame::OnBack(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->GoBack(); + UpdateState(); +} + +/** + * Callback invoked when user pressed the "forward" button + */ +void WebFrame::OnForward(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->GoForward(); + UpdateState(); +} + +/** + * Callback invoked when user pressed the "stop" button + */ +void WebFrame::OnStop(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->Stop(); + UpdateState(); +} + +/** + * Callback invoked when user pressed the "reload" button + */ +void WebFrame::OnReload(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->Reload(); + UpdateState(); +} + +void WebFrame::OnClearHistory(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->ClearHistory(); + UpdateState(); +} + +void WebFrame::OnEnableHistory(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->EnableHistory(m_tools_enable_history->IsChecked()); + UpdateState(); +} + +void WebFrame::OnCut(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->Cut(); +} + +void WebFrame::OnCopy(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->Copy(); +} + +void WebFrame::OnPaste(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->Paste(); +} + +void WebFrame::OnUndo(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->Undo(); +} + +void WebFrame::OnRedo(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->Redo(); +} + +void WebFrame::OnMode(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->SetEditable(m_edit_mode->IsChecked()); +} + +void WebFrame::OnLoadScheme(wxCommandEvent& WXUNUSED(evt)) +{ + wxFileName helpfile("../help/doc.zip"); + helpfile.MakeAbsolute(); + wxString path = helpfile.GetFullPath(); + //Under MSW we need to flip the slashes + path.Replace("\\", "/"); + path = "wxfs:///" + path + ";protocol=zip/doc.htm"; + m_browser->LoadURL(path); +} + +void WebFrame::OnUseMemoryFS(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->LoadURL("memory:page1.htm"); +} + +void WebFrame::OnEnableContextMenu(wxCommandEvent& evt) +{ + m_browser->EnableContextMenu(evt.IsChecked()); +} + +void WebFrame::OnFind(wxCommandEvent& WXUNUSED(evt)) +{ + wxString value = m_browser->GetSelectedText(); + if(value.Len() > 150) + { + value.Truncate(150); + } + m_find_ctrl->SetValue(value); + if(!m_find_toolbar->IsShown()){ + m_find_toolbar->Show(true); + SendSizeEvent(); + } + m_find_ctrl->SelectAll(); +} + +void WebFrame::OnFindDone(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->Find(""); + m_find_toolbar->Show(false); + SendSizeEvent(); +} + +void WebFrame::OnFindText(wxCommandEvent& evt) +{ + int flags = 0; + + if(m_find_toolbar_wrap->IsChecked()) + flags |= wxWEBVIEW_FIND_WRAP; + if(m_find_toolbar_wholeword->IsChecked()) + flags |= wxWEBVIEW_FIND_ENTIRE_WORD; + if(m_find_toolbar_matchcase->IsChecked()) + flags |= wxWEBVIEW_FIND_MATCH_CASE; + if(m_find_toolbar_highlight->IsChecked()) + flags |= wxWEBVIEW_FIND_HIGHLIGHT_RESULT; + + if(m_find_toolbar_previous->GetId() == evt.GetId()) + flags |= wxWEBVIEW_FIND_BACKWARDS; + + wxString find_text = m_find_ctrl->GetValue(); + long count = m_browser->Find(find_text, flags); + + if(m_findText != find_text) + { + m_findCount = count; + m_findText = find_text; + } + + if(count != wxNOT_FOUND || find_text.IsEmpty()) + { + m_find_ctrl->SetBackgroundColour(*wxWHITE); + } + else + { + m_find_ctrl->SetBackgroundColour(wxColour(255, 101, 101)); + } + + m_find_ctrl->Refresh(); + + //Log the result, note that count is zero indexed. + if(count != m_findCount) + { + count++; + } + wxLogMessage("Searching for:%s current match:%i/%i", m_findText.c_str(), count, m_findCount); +} + +/** + * Callback invoked when there is a request to load a new page (for instance + * when the user clicks a link) + */ +void WebFrame::OnNavigationRequest(wxWebViewEvent& evt) +{ + if(m_info->IsShown()) + { + m_info->Dismiss(); + } + + wxLogMessage("%s", "Navigation request to '" + evt.GetURL() + "' (target='" + + evt.GetTarget() + "')"); + + wxASSERT(m_browser->IsBusy()); + + //If we don't want to handle navigation then veto the event and navigation + //will not take place, we also need to stop the loading animation + if(!m_tools_handle_navigation->IsChecked()) + { + evt.Veto(); + m_toolbar->EnableTool( m_toolbar_stop->GetId(), false ); + } + else + { + UpdateState(); + } +} + +/** + * Callback invoked when a navigation request was accepted + */ +void WebFrame::OnNavigationComplete(wxWebViewEvent& evt) +{ + wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'"); + UpdateState(); +} + +/** + * Callback invoked when a page is finished loading + */ +void WebFrame::OnDocumentLoaded(wxWebViewEvent& evt) +{ + //Only notify if the document is the main frame, not a subframe + if(evt.GetURL() == m_browser->GetCurrentURL()) + { + wxLogMessage("%s", "Document loaded; url='" + evt.GetURL() + "'"); + } + UpdateState(); +} + +/** + * On new window, we veto to stop extra windows appearing + */ +void WebFrame::OnNewWindow(wxWebViewEvent& evt) +{ + wxLogMessage("%s", "New window; url='" + evt.GetURL() + "'"); + + //If we handle new window events then just load them in this window as we + //are a single window browser + if(m_tools_handle_new_window->IsChecked()) + m_browser->LoadURL(evt.GetURL()); + + UpdateState(); +} + +void WebFrame::OnTitleChanged(wxWebViewEvent& evt) +{ + SetTitle(evt.GetString()); + wxLogMessage("%s", "Title changed; title='" + evt.GetString() + "'"); +} + +/** + * Invoked when user selects the "View Source" menu item + */ +void WebFrame::OnViewSourceRequest(wxCommandEvent& WXUNUSED(evt)) +{ + SourceViewDialog dlg(this, m_browser->GetPageSource()); + dlg.ShowModal(); +} + +/** + * Invoked when user selects the "View Text" menu item + */ +void WebFrame::OnViewTextRequest(wxCommandEvent& WXUNUSED(evt)) +{ + wxDialog textViewDialog(this, wxID_ANY, "Page Text", + wxDefaultPosition, wxSize(700,500), + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); + wxStyledTextCtrl* text = new wxStyledTextCtrl(&textViewDialog, wxID_ANY); + text->SetText(m_browser->GetPageText()); + wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); + sizer->Add(text, 1, wxEXPAND); + SetSizer(sizer); + textViewDialog.ShowModal(); +} + +/** + * Invoked when user selects the "Menu" item + */ +void WebFrame::OnToolsClicked(wxCommandEvent& WXUNUSED(evt)) +{ + if(m_browser->GetCurrentURL() == "") + return; + + m_tools_tiny->Check(false); + m_tools_small->Check(false); + m_tools_medium->Check(false); + m_tools_large->Check(false); + m_tools_largest->Check(false); + + wxWebViewZoom zoom = m_browser->GetZoom(); + switch (zoom) + { + case wxWEBVIEW_ZOOM_TINY: + m_tools_tiny->Check(); + break; + case wxWEBVIEW_ZOOM_SMALL: + m_tools_small->Check(); + break; + case wxWEBVIEW_ZOOM_MEDIUM: + m_tools_medium->Check(); + break; + case wxWEBVIEW_ZOOM_LARGE: + m_tools_large->Check(); + break; + case wxWEBVIEW_ZOOM_LARGEST: + m_tools_largest->Check(); + break; + } + + m_edit_cut->Enable(m_browser->CanCut()); + m_edit_copy->Enable(m_browser->CanCopy()); + m_edit_paste->Enable(m_browser->CanPaste()); + + m_edit_undo->Enable(m_browser->CanUndo()); + m_edit_redo->Enable(m_browser->CanRedo()); + + m_selection_clear->Enable(m_browser->HasSelection()); + m_selection_delete->Enable(m_browser->HasSelection()); + + m_context_menu->Check(m_browser->IsContextMenuEnabled()); + + //Firstly we clear the existing menu items, then we add the current ones + wxMenuHistoryMap::const_iterator it; + for( it = m_histMenuItems.begin(); it != m_histMenuItems.end(); ++it ) + { + m_tools_history_menu->Destroy(it->first); + } + m_histMenuItems.clear(); + + wxVector > back = m_browser->GetBackwardHistory(); + wxVector > forward = m_browser->GetForwardHistory(); + + wxMenuItem* item; + + unsigned int i; + for(i = 0; i < back.size(); i++) + { + item = m_tools_history_menu->AppendRadioItem(wxID_ANY, back[i]->GetTitle()); + m_histMenuItems[item->GetId()] = back[i]; + Connect(item->GetId(), wxEVT_COMMAND_MENU_SELECTED, + wxCommandEventHandler(WebFrame::OnHistory), NULL, this ); + } + + wxString title = m_browser->GetCurrentTitle(); + if ( title.empty() ) + title = "(untitled)"; + item = m_tools_history_menu->AppendRadioItem(wxID_ANY, title); + item->Check(); + + //No need to connect the current item + m_histMenuItems[item->GetId()] = wxSharedPtr(new wxWebViewHistoryItem(m_browser->GetCurrentURL(), m_browser->GetCurrentTitle())); + + for(i = 0; i < forward.size(); i++) + { + item = m_tools_history_menu->AppendRadioItem(wxID_ANY, forward[i]->GetTitle()); + m_histMenuItems[item->GetId()] = forward[i]; + Connect(item->GetId(), wxEVT_COMMAND_TOOL_CLICKED, + wxCommandEventHandler(WebFrame::OnHistory), NULL, this ); + } + + wxPoint position = ScreenToClient( wxGetMousePosition() ); + PopupMenu(m_tools_menu, position.x, position.y); +} + +/** + * Invoked when user selects the zoom size in the menu + */ +void WebFrame::OnSetZoom(wxCommandEvent& evt) +{ + if (evt.GetId() == m_tools_tiny->GetId()) + { + m_browser->SetZoom(wxWEBVIEW_ZOOM_TINY); + } + else if (evt.GetId() == m_tools_small->GetId()) + { + m_browser->SetZoom(wxWEBVIEW_ZOOM_SMALL); + } + else if (evt.GetId() == m_tools_medium->GetId()) + { + m_browser->SetZoom(wxWEBVIEW_ZOOM_MEDIUM); + } + else if (evt.GetId() == m_tools_large->GetId()) + { + m_browser->SetZoom(wxWEBVIEW_ZOOM_LARGE); + } + else if (evt.GetId() == m_tools_largest->GetId()) + { + m_browser->SetZoom(wxWEBVIEW_ZOOM_LARGEST); + } + else + { + wxFAIL; + } +} + +void WebFrame::OnZoomLayout(wxCommandEvent& WXUNUSED(evt)) +{ + if(m_tools_layout->IsChecked()) + m_browser->SetZoomType(wxWEBVIEW_ZOOM_TYPE_LAYOUT); + else + m_browser->SetZoomType(wxWEBVIEW_ZOOM_TYPE_TEXT); +} + +void WebFrame::OnHistory(wxCommandEvent& evt) +{ + m_browser->LoadHistoryItem(m_histMenuItems[evt.GetId()]); +} + +void WebFrame::OnRunScript(wxCommandEvent& WXUNUSED(evt)) +{ + wxTextEntryDialog dialog(this, "Enter JavaScript to run.", wxGetTextFromUserPromptStr, "", wxOK|wxCANCEL|wxCENTRE|wxTE_MULTILINE); + if(dialog.ShowModal() == wxID_OK) + { + m_browser->RunScript(dialog.GetValue()); + } +} + +void WebFrame::OnClearSelection(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->ClearSelection(); +} + +void WebFrame::OnDeleteSelection(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->DeleteSelection(); +} + +void WebFrame::OnSelectAll(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->SelectAll(); +} + +/** + * Callback invoked when a loading error occurs + */ +void WebFrame::OnError(wxWebViewEvent& evt) +{ +#define WX_ERROR_CASE(type) \ + case type: \ + category = #type; \ + break; + + wxString category; + switch (evt.GetInt()) + { + WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_CONNECTION); + WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_CERTIFICATE); + WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_AUTH); + WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_SECURITY); + WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_NOT_FOUND); + WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_REQUEST); + WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_USER_CANCELLED); + WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_OTHER); + } + + wxLogMessage("%s", "Error; url='" + evt.GetURL() + "', error='" + category + " (" + evt.GetString() + ")'"); + + //Show the info bar with an error + m_info->ShowMessage(_("An error occurred loading ") + evt.GetURL() + "\n" + + "'" + category + "'", wxICON_ERROR); + + UpdateState(); +} + +/** + * Invoked when user selects "Print" from the menu + */ +void WebFrame::OnPrint(wxCommandEvent& WXUNUSED(evt)) +{ + m_browser->Print(); +} + +SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) : + wxDialog(parent, wxID_ANY, "Source Code", + wxDefaultPosition, wxSize(700,500), + wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) +{ + wxStyledTextCtrl* text = new wxStyledTextCtrl(this, wxID_ANY); + text->SetMarginWidth(1, 30); + text->SetMarginType(1, wxSTC_MARGIN_NUMBER); + text->SetText(source); + + text->StyleClearAll(); + text->SetLexer(wxSTC_LEX_HTML); + text->StyleSetForeground(wxSTC_H_DOUBLESTRING, wxColour(255,0,0)); + text->StyleSetForeground(wxSTC_H_SINGLESTRING, wxColour(255,0,0)); + text->StyleSetForeground(wxSTC_H_ENTITY, wxColour(255,0,0)); + text->StyleSetForeground(wxSTC_H_TAG, wxColour(0,150,0)); + text->StyleSetForeground(wxSTC_H_TAGUNKNOWN, wxColour(0,150,0)); + text->StyleSetForeground(wxSTC_H_ATTRIBUTE, wxColour(0,0,150)); + text->StyleSetForeground(wxSTC_H_ATTRIBUTEUNKNOWN, wxColour(0,0,150)); + text->StyleSetForeground(wxSTC_H_COMMENT, wxColour(150,150,150)); + + wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); + sizer->Add(text, 1, wxEXPAND); + SetSizer(sizer); +} diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl new file mode 100644 index 0000000000..1087b22d98 --- /dev/null +++ b/samples/webview_chromium/webview_chromium.bkl @@ -0,0 +1,44 @@ + + + + + + + + + + + + + $(CEF_INCLUDE_DIR)/Debug/,$(CEF_INCLUDE_DIR)/out/Debug/lib/ + + + + + + + + + + + + webview.cpp + + + webview + stc + adv + core + base + $(CEF_LIB_DIR) + $(CEF_INCLUDE_DIR) + libcef + libcef_dll_wrapper + ../sample.rc + + + $(LIB_SCINTILLA) + + + + diff --git a/samples/webview_chromium/wxlogo.xpm b/samples/webview_chromium/wxlogo.xpm new file mode 100644 index 0000000000..ca7708ead6 --- /dev/null +++ b/samples/webview_chromium/wxlogo.xpm @@ -0,0 +1,84 @@ +/* XPM */ +static const char * wxlogo_xpm[] = { +"24 24 57 1", +" c None", +". c #000006", +"+ c #00003F", +"@ c #00003C", +"# c #000034", +"$ c #000000", +"% c #00000E", +"& c #000085", +"* c #000079", +"= c #000081", +"- c #000070", +"; c #00000D", +"> c #8686CB", +", c #FFFFFF", +"' c #000078", +") c #000080", +"! c #00006F", +"~ c #7F7FC7", +"{ c #00007F", +"] c #000083", +"^ c #000088", +"/ c #000076", +"( c #000047", +"_ c #000040", +": c #EDED00", +"< c #FFFF00", +"[ c #202000", +"} c #0E0000", +"| c #7F0000", +"1 c #770000", +"2 c #7E0000", +"3 c #E0E000", +"4 c #FFFF88", +"5 c #FFFF3F", +"6 c #1E1E00", +"7 c #1F0000", +"8 c #FF0000", +"9 c #FFFF80", +"0 c #1E0000", +"a c #FF8686", +"b c #00000F", +"c c #000082", +"d c #FFFF7F", +"e c #FF7F7F", +"f c #000007", +"g c #000044", +"h c #00003E", +"i c #00001F", +"j c #DE0000", +"k c #E00000", +"l c #C30000", +"m c #DEDE00", +"n c #DD0000", +"o c #DDDD00", +"p c #EAEA00", +"q c #780000", +"r c #680000", +" ", +" ", +" ", +" ", +" .+@@@@@@@#$ ", +" %&*======-$ ", +" ;>,')))))!$ ", +" ;~,')){]^/ ", +" ;~,'))=(%;$$$$$$$$", +" ;~,'))=_:<<<<<<<<[", +"}|1112;~,'))=_345<<<<<<6", +"788888;>,'))=_3,9<<<<<<6", +"0a,888b&*===c_3,d<<<<<<6", +"0e,888fg__h@@i3,d<<<<<<6", +"0e,888jkkl$ $m,d<<<<<<6", +"0e,888888n$ $o,9<<<<<<6", +"0e,888888n$ $o45<<<<<<6", +"0a,888888n$ $p<<<<<<<<[", +"788888888k$ $$$$$$$$$$", +"}|qqqqqqqr$ ", +" ", +" ", +" ", +" "}; diff --git a/src/common/webview_chromium3.cpp b/src/common/webview_chromium3.cpp new file mode 100644 index 0000000000..d24e29a86d --- /dev/null +++ b/src/common/webview_chromium3.cpp @@ -0,0 +1,677 @@ +///////////////////////////////////////////////////////////////////////////// +// Author: Steven Lamerton +// Copyright: (c) 2013 Steven Lamerton +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// +#include "wx/wxprec.h" + +#include "wx/webview_chromium.h" + +#if CEF_API == 3 + +#include "wx/webview_chromium.h" + +#include +#include +#include +#include + + +#ifdef __VISUALC__ +#pragma warning(push) +#pragma warning(disable:4100) +#endif + +#include +#include +#include + +#ifdef __VISUALC__ +#pragma warning(pop) +#endif + +extern const char wxWebViewBackendChromium[] = "wxWebViewChromium"; + +wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewChromium, wxWebView); + +class wxStringVisitor : public CefStringVisitor +{ +public: + enum StringType { + PAGE_SOURCE, + PAGE_TEXT, + }; + wxStringVisitor(wxWebViewChromium* webview, StringType type) : m_webview(webview), m_type(type) {} + void Visit(const CefString& string) + { + switch(m_type) + { + case PAGE_SOURCE: + m_webview->SetPageSource(string.ToWString()); + break; + case PAGE_TEXT: + m_webview->SetPageText(string.ToWString()); + break; + } + } +private: + StringType m_type; + wxWebViewChromium *m_webview; + IMPLEMENT_REFCOUNTING(wxStringVisitor); +}; + +bool wxWebViewChromium::Create(wxWindow* parent, + wxWindowID id, + const wxString& url, + const wxPoint& pos, + const wxSize& size, + long style, + const wxString& name) +{ + if (!wxControl::Create(parent, id, pos, size, style, + wxDefaultValidator, name)) + { + return false; + } + + m_historyLoadingFromList = false; + m_historyEnabled = true; + m_historyPosition = -1; + m_zoomLevel = wxWEBVIEW_ZOOM_MEDIUM; + + CefBrowserSettings browsersettings; + CefWindowInfo info; + + m_clientHandler = new ClientHandler(); + m_clientHandler->SetWebView(this); + +#ifdef __WXMSW__ + // Initialize window info to the defaults for a child window + info.SetAsChild(GetHWND(), wxGetClientRect(this->GetHWND())); +#endif + // Creat the new child browser window, we do this async as we use a multi + // threaded message loop + +#if CHROME_VERSION_BUILD >= 1650 + CefBrowserHost::CreateBrowser(info, static_cast>(m_clientHandler), + url.ToStdString(), browsersettings, NULL); +#else + CefBrowserHost::CreateBrowser(info, static_cast>(m_clientHandler), + url.ToStdString(), browsersettings); +#endif + this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); + + return true; +} + +wxWebViewChromium::~wxWebViewChromium() +{ + CefRefPtr browser = m_clientHandler->GetBrowser(); + if(browser.get()) { + // Let the browser window know we are about to destroy it. + browser->GetHost()->ParentWindowWillClose(); + } +} + +void wxWebViewChromium::OnSize(wxSizeEvent& event) +{ + wxSize size = GetClientSize(); + +#ifdef __WXMSW__ + if(m_clientHandler && m_clientHandler->GetBrowser() && m_clientHandler->GetBrowser()->GetHost()) + { + HWND handle = m_clientHandler->GetBrowser()->GetHost()->GetWindowHandle(); + + if(handle) + { + HDWP hdwp = BeginDeferWindowPos(1); + hdwp = DeferWindowPos(hdwp, handle, NULL, 0, 0, + size.GetWidth(), size.GetHeight(), SWP_NOZORDER); + EndDeferWindowPos(hdwp); + } + } +#endif + + event.Skip(); +} + +void wxWebViewChromium::SetPageSource(const wxString& pageSource) +{ + m_pageSource = pageSource; +} + +void wxWebViewChromium::SetPageText(const wxString& pageText) +{ + m_pageText = pageText; +} + +void* wxWebViewChromium::GetNativeBackend() const +{ + return m_clientHandler->GetBrowser(); +} + +bool wxWebViewChromium::CanGoForward() const +{ + if(m_historyEnabled) + return m_historyPosition != static_cast(m_historyList.size()) - 1; + else + return false; +} + +bool wxWebViewChromium::CanGoBack() const +{ + if(m_historyEnabled) + return m_historyPosition > 0; + else + return false; +} + +void wxWebViewChromium::LoadHistoryItem(wxSharedPtr item) +{ + int pos = -1; + for(unsigned int i = 0; i < m_historyList.size(); i++) + { + //We compare the actual pointers to find the correct item + if(m_historyList[i].get() == item.get()) + pos = i; + } + wxASSERT_MSG(pos != static_cast(m_historyList.size()), + "invalid history item"); + m_historyLoadingFromList = true; + LoadURL(item->GetUrl()); + m_historyPosition = pos; +} + +wxVector > wxWebViewChromium::GetBackwardHistory() +{ + wxVector > backhist; + //As we don't have std::copy or an iterator constructor in the wxwidgets + //native vector we construct it by hand + for(int i = 0; i < m_historyPosition; i++) + { + backhist.push_back(m_historyList[i]); + } + return backhist; +} + +wxVector > wxWebViewChromium::GetForwardHistory() +{ + wxVector > forwardhist; + //As we don't have std::copy or an iterator constructor in the wxwidgets + //native vector we construct it by hand + for(int i = m_historyPosition + 1; i < static_cast(m_historyList.size()); i++) + { + forwardhist.push_back(m_historyList[i]); + } + return forwardhist; +} + +void wxWebViewChromium::GoBack() +{ + LoadHistoryItem(m_historyList[m_historyPosition - 1]); +} + +void wxWebViewChromium::GoForward() +{ + LoadHistoryItem(m_historyList[m_historyPosition + 1]); +} + +void wxWebViewChromium::LoadURL(const wxString& url) +{ + m_clientHandler->GetBrowser()->GetMainFrame()->LoadURL(url.ToStdString()); +} + +void wxWebViewChromium::ClearHistory() +{ + m_historyList.clear(); + m_historyPosition = -1; +} + +void wxWebViewChromium::EnableHistory(bool enable) +{ + m_historyEnabled = enable; +} + +void wxWebViewChromium::Stop() +{ + m_clientHandler->GetBrowser()->StopLoad(); +} + +void wxWebViewChromium::Reload(wxWebViewReloadFlags flags) +{ + if(flags == wxWEBVIEW_RELOAD_NO_CACHE) + { + m_clientHandler->GetBrowser()->ReloadIgnoreCache(); + } + else + { + m_clientHandler->GetBrowser()->Reload(); + } +} + +wxString wxWebViewChromium::GetPageSource() const +{ + //m_clientHandler->GetBrowser()->GetHost()->Find + return m_pageSource; +} + +wxString wxWebViewChromium::GetPageText() const +{ + return m_pageText; +} + +wxString wxWebViewChromium::GetCurrentURL() const +{ + return m_clientHandler->GetBrowser()->GetMainFrame()->GetURL().ToString(); +} + +wxString wxWebViewChromium::GetCurrentTitle() const +{ + return m_title; +} + +void wxWebViewChromium::Print() +{ +#if CHROME_VERSION_BUILD >= 1650 + m_clientHandler->GetBrowser()->GetHost()->Print(); +#endif +} + +void wxWebViewChromium::Cut() +{ + m_clientHandler->GetBrowser()->GetMainFrame()->Cut(); +} + +void wxWebViewChromium::Copy() +{ + m_clientHandler->GetBrowser()->GetMainFrame()->Copy(); +} + +void wxWebViewChromium::Paste() +{ + m_clientHandler->GetBrowser()->GetMainFrame()->Paste(); +} + +void wxWebViewChromium::Undo() +{ + m_clientHandler->GetBrowser()->GetMainFrame()->Undo(); +} + +void wxWebViewChromium::Redo() +{ + m_clientHandler->GetBrowser()->GetMainFrame()->Redo(); +} + +void wxWebViewChromium::SelectAll() +{ + m_clientHandler->GetBrowser()->GetMainFrame()->SelectAll(); +} + +void wxWebViewChromium::DeleteSelection() +{ + wxString jsdelete = "if (window.getSelection) { if (window.getSelection().deleteFromDocument) { window.getSelection().deleteFromDocument(); } }"; + RunScript(jsdelete); +} + +void wxWebViewChromium::ClearSelection() +{ + wxString jsclear = "if (window.getSelection) { if (window.getSelection().empty) { window.getSelection().empty(); } }"; + RunScript(jsclear); +} + +void wxWebViewChromium::RunScript(const wxString& javascript) +{ + m_clientHandler->GetBrowser()->GetMainFrame()->ExecuteJavaScript(javascript.ToStdString(), + "", 0); +} + +bool wxWebViewChromium::IsBusy() const +{ + if(m_clientHandler->GetBrowser()) + return m_clientHandler->GetBrowser()->IsLoading(); + else + return false; +} + +void wxWebViewChromium::SetEditable(bool enable) +{ + wxString mode = enable ? "\"on\"" : "\"off\""; + RunScript("document.designMode = " + mode); +} + +void wxWebViewChromium::DoSetPage(const wxString& html, const wxString& baseUrl) +{ + m_clientHandler->GetBrowser()->GetMainFrame()->LoadString(html.ToStdString(), + baseUrl.ToStdString()); +} + +wxWebViewZoom wxWebViewChromium::GetZoom() const +{ + return m_zoomLevel; +} + + +void wxWebViewChromium::SetZoom(wxWebViewZoom zoom) +{ + m_zoomLevel = zoom; + + double mapzoom; + // arbitrary way to map our common zoom enum to float zoom + switch (zoom) + { + case wxWEBVIEW_ZOOM_TINY: + mapzoom = -1.0; + break; + + case wxWEBVIEW_ZOOM_SMALL: + mapzoom = -0.5; + break; + + case wxWEBVIEW_ZOOM_MEDIUM: + mapzoom = 0.0; + break; + + case wxWEBVIEW_ZOOM_LARGE: + mapzoom = 0.5; + break; + + case wxWEBVIEW_ZOOM_LARGEST: + mapzoom = 1.0; + break; + + default: + wxASSERT(false); + } + m_clientHandler->GetBrowser()->GetHost()->SetZoomLevel(mapzoom); +} + +void wxWebViewChromium::SetZoomType(wxWebViewZoomType type) +{ + // there is only one supported zoom type at the moment so this setter + // does nothing beyond checking sanity + wxASSERT(type == wxWEBVIEW_ZOOM_TYPE_LAYOUT); +} + +wxWebViewZoomType wxWebViewChromium::GetZoomType() const +{ + return wxWEBVIEW_ZOOM_TYPE_LAYOUT; +} + +bool wxWebViewChromium::CanSetZoomType(wxWebViewZoomType type) const +{ + return type == wxWEBVIEW_ZOOM_TYPE_LAYOUT; +} + +void wxWebViewChromium::RegisterHandler(wxSharedPtr handler) +{ + // We currently don't support custom scheme handlers +} + +bool wxWebViewChromium::StartUp(int &code, const wxString &path) +{ + CefMainArgs args(wxGetInstance()); + + // If there is no subprocess then we need to execute on this process + if(path == "") + { + code = CefExecuteProcess(args, NULL); + if(code >= 0) + return false; + } + + CefSettings settings; + // We use a multithreaded message loop so we don't have to integrate + // with the wx message loop + settings.multi_threaded_message_loop = true; + CefString(&settings.browser_subprocess_path) = path.ToStdString(); + + return CefInitialize(args, settings, NULL); +} + +int wxWebViewChromium::StartUpSubprocess() +{ + CefMainArgs args(wxGetInstance()); + + return CefExecuteProcess(args, NULL); +} + +void wxWebViewChromium::Shutdown() +{ + CefShutdown(); +} + +// CefDisplayHandler methods +void ClientHandler::OnLoadingStateChange(CefRefPtr browser, bool isLoading, + bool canGoBack, bool canGoForward) +{} + +void ClientHandler::OnAddressChange(CefRefPtr browser, CefRefPtr frame, + const CefString& url) +{} + +void ClientHandler::OnTitleChange(CefRefPtr browser, const CefString& title) +{ + m_webview->m_title = title.ToWString(); + wxString target = browser->GetMainFrame()->GetName().ToString(); + + wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, m_webview->GetId(), "", target); + event.SetString(title.ToWString()); + event.SetEventObject(m_webview); + + m_webview->HandleWindowEvent(event); +} + +bool ClientHandler::OnConsoleMessage(CefRefPtr browser, const CefString& message, + const CefString& source, int line) +{ + return false; +} + + // CefContextMenuHandler methods +void ClientHandler::OnBeforeContextMenu(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr params, + CefRefPtr model) +{ + if(!m_webview->IsContextMenuEnabled()) + model->Clear(); +} + +bool ClientHandler::OnContextMenuCommand(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr params, + int command_id, + CefContextMenuHandler::EventFlags event_flags) +{ + return false; +} + +void ClientHandler::OnContextMenuDismissed(CefRefPtr browser, + CefRefPtr frame) +{} + +// CefLifeSpanHandler methods +bool ClientHandler::OnBeforePopup(CefRefPtr browser, + CefRefPtr frame, + const CefString& target_url, + const CefString& target_frame_name, + const CefPopupFeatures& popupFeatures, + CefWindowInfo& windowInfo, + CefRefPtr& client, + CefBrowserSettings& settings, + bool* no_javascript_access) +{ + wxWebViewEvent *event = new wxWebViewEvent(wxEVT_WEBVIEW_NEWWINDOW, + m_webview->GetId(), + target_url.ToString(), + target_frame_name.ToString()); + event->SetEventObject(m_webview); + // We use queue event as this function is called on the render thread + m_webview->GetEventHandler()->QueueEvent(event); + + return true; +} + +void ClientHandler::OnAfterCreated(CefRefPtr browser) +{ + if(!m_browser.get()) + { + m_browser = browser; + m_browserId = browser->GetIdentifier(); + } +} +bool ClientHandler::DoClose(CefRefPtr browser) +{ + return false; +} + +void ClientHandler::OnBeforeClose(CefRefPtr browser) +{ + if(browser->GetIdentifier() == m_browserId) + { + m_browser = NULL; + } +} + +// CefLoadHandler methods +void ClientHandler::OnLoadStart(CefRefPtr browser, + CefRefPtr frame) +{ + wxString url = frame->GetURL().ToString(); + wxString target = frame->GetName().ToString(); + + wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATING, m_webview->GetId(), url, target); + event.SetEventObject(m_webview); + + m_webview->HandleWindowEvent(event); + + if (!event.IsAllowed()) + { + // We do not yet have support for vetoing pages + } +} + +void ClientHandler::OnLoadEnd(CefRefPtr browser, + CefRefPtr frame, + int httpStatusCode) +{ + wxString url = frame->GetURL().ToString(); + wxString target = frame->GetName().ToString(); + + wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATED, m_webview->GetId(), url, target); + event.SetEventObject(m_webview); + + m_webview->HandleWindowEvent(event); + + if(frame->IsMain()) + { + //Get source code when main frame loads ended. + CefRefPtr source_visitor = new wxStringVisitor( + m_webview, wxStringVisitor::PAGE_SOURCE); + frame->GetSource(source_visitor); + + //Get page text when main frame loads ended. + CefRefPtr text_visitor = new wxStringVisitor( + m_webview, wxStringVisitor::PAGE_TEXT); + frame->GetText(text_visitor); + + //As we are complete we also add to the history list, but not if the + //page is not the main page, ie it is a subframe + if(m_webview->m_historyEnabled && !m_webview->m_historyLoadingFromList) + { + //If we are not at the end of the list, then erase everything + //between us and the end before adding the new page + if(m_webview->m_historyPosition != static_cast(m_webview->m_historyList.size()) - 1) + { + m_webview->m_historyList.erase(m_webview->m_historyList.begin() + m_webview->m_historyPosition + 1, + m_webview->m_historyList.end()); + } + wxSharedPtr item(new wxWebViewHistoryItem(url, m_webview->GetCurrentTitle())); + m_webview->m_historyList.push_back(item); + m_webview->m_historyPosition++; + } + //Reset as we are done now + m_webview->m_historyLoadingFromList = false; + + wxWebViewEvent levent(wxEVT_COMMAND_WEBVIEW_LOADED, m_webview->GetId(), url, target); + levent.SetEventObject(m_webview); + + m_webview->HandleWindowEvent(levent); + } +} + +void ClientHandler::OnLoadError(CefRefPtr browser, + CefRefPtr frame, + ErrorCode errorCode, + const CefString& errorText, + const CefString& failedUrl) +{ + //We define a macro for convenience + #define ERROR_TYPE_CASE(error, wxtype) case(error): \ + type = wxtype;\ + break + + wxWebViewNavigationError type = wxWEBVIEW_NAV_ERR_OTHER; + switch (errorCode) + { + ERROR_TYPE_CASE(ERR_FAILED, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_ABORTED, wxWEBVIEW_NAV_ERR_USER_CANCELLED); + ERROR_TYPE_CASE(ERR_INVALID_ARGUMENT, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_INVALID_HANDLE, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_FILE_NOT_FOUND, wxWEBVIEW_NAV_ERR_NOT_FOUND); + ERROR_TYPE_CASE(ERR_TIMED_OUT, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_FILE_TOO_BIG, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_UNEXPECTED, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_ACCESS_DENIED, wxWEBVIEW_NAV_ERR_AUTH); + ERROR_TYPE_CASE(ERR_NOT_IMPLEMENTED, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_CONNECTION_CLOSED, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_CONNECTION_RESET, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_CONNECTION_REFUSED, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_CONNECTION_ABORTED, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_CONNECTION_FAILED, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_NAME_NOT_RESOLVED, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_INTERNET_DISCONNECTED, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_SSL_PROTOCOL_ERROR, wxWEBVIEW_NAV_ERR_SECURITY); + ERROR_TYPE_CASE(ERR_ADDRESS_INVALID, wxWEBVIEW_NAV_ERR_REQUEST); + ERROR_TYPE_CASE(ERR_ADDRESS_UNREACHABLE, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_SSL_CLIENT_AUTH_CERT_NEEDED, wxWEBVIEW_NAV_ERR_AUTH); + ERROR_TYPE_CASE(ERR_TUNNEL_CONNECTION_FAILED, wxWEBVIEW_NAV_ERR_CONNECTION); + ERROR_TYPE_CASE(ERR_NO_SSL_VERSIONS_ENABLED, wxWEBVIEW_NAV_ERR_SECURITY); + ERROR_TYPE_CASE(ERR_SSL_VERSION_OR_CIPHER_MISMATCH, wxWEBVIEW_NAV_ERR_SECURITY); + ERROR_TYPE_CASE(ERR_SSL_RENEGOTIATION_REQUESTED, wxWEBVIEW_NAV_ERR_REQUEST); + ERROR_TYPE_CASE(ERR_CERT_COMMON_NAME_INVALID, wxWEBVIEW_NAV_ERR_CERTIFICATE); + ERROR_TYPE_CASE(ERR_CERT_DATE_INVALID, wxWEBVIEW_NAV_ERR_CERTIFICATE); + ERROR_TYPE_CASE(ERR_CERT_AUTHORITY_INVALID, wxWEBVIEW_NAV_ERR_CERTIFICATE); + ERROR_TYPE_CASE(ERR_CERT_CONTAINS_ERRORS, wxWEBVIEW_NAV_ERR_CERTIFICATE); + ERROR_TYPE_CASE(ERR_CERT_NO_REVOCATION_MECHANISM, wxWEBVIEW_NAV_ERR_CERTIFICATE); + ERROR_TYPE_CASE(ERR_CERT_UNABLE_TO_CHECK_REVOCATION, wxWEBVIEW_NAV_ERR_CERTIFICATE); + ERROR_TYPE_CASE(ERR_CERT_REVOKED, wxWEBVIEW_NAV_ERR_CERTIFICATE); + ERROR_TYPE_CASE(ERR_CERT_INVALID, wxWEBVIEW_NAV_ERR_CERTIFICATE); + ERROR_TYPE_CASE(ERR_CERT_END, wxWEBVIEW_NAV_ERR_CERTIFICATE); + ERROR_TYPE_CASE(ERR_INVALID_URL, wxWEBVIEW_NAV_ERR_REQUEST); + ERROR_TYPE_CASE(ERR_DISALLOWED_URL_SCHEME, wxWEBVIEW_NAV_ERR_REQUEST); + ERROR_TYPE_CASE(ERR_UNKNOWN_URL_SCHEME, wxWEBVIEW_NAV_ERR_REQUEST); + ERROR_TYPE_CASE(ERR_TOO_MANY_REDIRECTS, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_UNSAFE_REDIRECT, wxWEBVIEW_NAV_ERR_SECURITY); + ERROR_TYPE_CASE(ERR_UNSAFE_PORT, wxWEBVIEW_NAV_ERR_SECURITY); + ERROR_TYPE_CASE(ERR_INVALID_RESPONSE, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_INVALID_CHUNKED_ENCODING, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_METHOD_NOT_SUPPORTED, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_UNEXPECTED_PROXY_AUTH, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_EMPTY_RESPONSE, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_RESPONSE_HEADERS_TOO_BIG, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_CACHE_MISS, wxWEBVIEW_NAV_ERR_OTHER); + ERROR_TYPE_CASE(ERR_INSECURE_RESPONSE, wxWEBVIEW_NAV_ERR_SECURITY); + } + + wxString url = failedUrl.ToString(); + wxString target = frame->GetName().ToString(); + wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_ERROR, m_webview->GetId(), url, target); + event.SetEventObject(m_webview); + event.SetInt(type); + event.SetString(errorText.ToString()); + + m_webview->HandleWindowEvent(event); +} + +#endif From 450bece977aee339f8bc42facc02b8d09ef054e1 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 17 May 2014 09:29:00 +0800 Subject: [PATCH 002/275] Remove CEF1 specific code since we only focus on CEF3. --- build/bakefiles/files.bkl | 3 +- include/wx/webview_chromium.h | 259 ++++++++++++++++- include/wx/webview_chromium3.h | 266 ------------------ ...iew_chromium3.cpp => webview_chromium.cpp} | 12 +- 4 files changed, 251 insertions(+), 289 deletions(-) delete mode 100644 include/wx/webview_chromium3.h rename src/common/{webview_chromium3.cpp => webview_chromium.cpp} (99%) diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 181fda3d25..e4902249f9 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3114,7 +3114,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/common/webview.cpp src/common/webviewarchivehandler.cpp src/common/webviewfshandler.cpp - src/common/webview_chromium3.cpp + src/common/webview_chromium.cpp
$(WEBVIEW_SRC_PLATFORM) @@ -3141,7 +3141,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/webviewarchivehandler.h wx/webviewfshandler.h wx/webview_chromium.h - wx/webview_chromium3.h $(WEBVIEW_HDR_PLATFORM) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 4b599589cc..c64c2f96da 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -7,22 +7,257 @@ #ifndef _WX_WEBVIEWCHROMIUM_H_ #define _WX_WEBVIEWCHROMIUM_H_ + #include -#include +#include +#include +#include +#include +#include -#if !defined(CEF_VERSION_MAJOR) || \ - (defined(CEF_VERSION_MAJOR) && CEF_VERSION_MAJOR == 1) -#define CEF_API 1 -#elif defined(CEF_VERSION_MAJOR) && CEF_VERSION_MAJOR == 3 -#define CEF_API 3 -#else -#error "Could not find CEF" +#ifdef __VISUALC__ +#pragma warning(push) +#pragma warning(disable:4100) #endif -#if CEF_API == 1 -#include "webview_chromium1.h" -#elif CEF_API == 3 -#include "webview_chromium3.h" +#include +#include + +#ifdef __VISUALC__ +#pragma warning(pop) #endif +extern const char wxWebViewBackendChromium[]; + +class wxWebViewChromium; + +// ClientHandler implementation. +class ClientHandler : public CefClient, + public CefContextMenuHandler, + public CefDisplayHandler, + public CefLifeSpanHandler, + public CefLoadHandler +{ +public: + ClientHandler() {}; + virtual ~ClientHandler() {}; + + virtual CefRefPtr GetContextMenuHandler() { return this; } + virtual CefRefPtr GetLifeSpanHandler() { return this; } + virtual CefRefPtr GetLoadHandler() { return this; } + virtual CefRefPtr GetDisplayHandler() { return this; } + + // CefDisplayHandler methods + virtual void OnLoadingStateChange(CefRefPtr browser, + bool isLoading, bool canGoBack, + bool canGoForward); + virtual void OnAddressChange(CefRefPtr browser, + CefRefPtr frame, + const CefString& url); + virtual void OnTitleChange(CefRefPtr browser, + const CefString& title); + virtual bool OnConsoleMessage(CefRefPtr browser, + const CefString& message, + const CefString& source, + int line); + + // CefContextMenuHandler methods + virtual void OnBeforeContextMenu(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr params, + CefRefPtr model); + virtual bool OnContextMenuCommand(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr params, + int command_id, + CefContextMenuHandler::EventFlags event_flags); + virtual void OnContextMenuDismissed(CefRefPtr browser, + CefRefPtr frame); + + // CefLifeSpanHandler methods + virtual bool OnBeforePopup(CefRefPtr browser, + CefRefPtr frame, + const CefString& target_url, + const CefString& target_frame_name, + const CefPopupFeatures& popupFeatures, + CefWindowInfo& windowInfo, + CefRefPtr& client, + CefBrowserSettings& settings, + bool* no_javascript_access); + virtual void OnAfterCreated(CefRefPtr browser); + virtual bool DoClose(CefRefPtr browser); + virtual void OnBeforeClose(CefRefPtr browser); + + // CefLoadHandler methods + virtual void OnLoadStart(CefRefPtr browser, + CefRefPtr frame); + virtual void OnLoadEnd(CefRefPtr browser, + CefRefPtr frame, + int httpStatusCode); + virtual void OnLoadError(CefRefPtr browser, + CefRefPtr frame, + ErrorCode errorCode, + const CefString& errorText, + const CefString& failedUrl); + + CefRefPtr GetBrowser() { return m_browser; } + + void SetWebView(wxWebViewChromium *webview) { m_webview = webview; } + +private: + CefRefPtr m_browser; + wxWebViewChromium *m_webview; + int m_browserId; + + IMPLEMENT_REFCOUNTING(ClientHandler); +}; + + +class WXDLLIMPEXP_WEBVIEW wxWebViewChromium : public wxWebView +{ +public: + + wxWebViewChromium() {} + + wxWebViewChromium(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { + Create(parent, id, url, pos, size, style, name); + } + + ~wxWebViewChromium(); + + void OnSize(wxSizeEvent &event); + + void SetPageSource(const wxString& pageSource); + + void SetPageText(const wxString& pageText); + + bool Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr); + + virtual void LoadURL(const wxString& url); + virtual void LoadHistoryItem(wxSharedPtr item); + virtual wxVector > GetBackwardHistory(); + virtual wxVector > GetForwardHistory(); + + virtual bool CanGoForward() const; + virtual bool CanGoBack() const; + virtual void GoBack(); + virtual void GoForward(); + virtual void ClearHistory(); + virtual void EnableHistory(bool enable = true); + virtual void Stop(); + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); + + virtual wxString GetPageSource() const; + virtual wxString GetPageText() const; + + virtual bool IsBusy() const; + virtual wxString GetCurrentURL() const; + virtual wxString GetCurrentTitle() const; + + virtual void SetZoomType(wxWebViewZoomType type); + virtual wxWebViewZoomType GetZoomType() const; + virtual bool CanSetZoomType(wxWebViewZoomType type) const; + + virtual void Print(); + + virtual wxWebViewZoom GetZoom() const; + virtual void SetZoom(wxWebViewZoom zoom); + + virtual void* GetNativeBackend() const; + + virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) { return wxNOT_FOUND; } + + //Clipboard functions + virtual bool CanCut() const { return true; } + virtual bool CanCopy() const { return true; } + virtual bool CanPaste() const { return true; } + virtual void Cut(); + virtual void Copy(); + virtual void Paste(); + + //Undo / redo functionality + virtual bool CanUndo() const { return true; } + virtual bool CanRedo() const { return true; } + virtual void Undo(); + virtual void Redo(); + + //Editing functions + virtual void SetEditable(bool enable = true); + virtual bool IsEditable() const { return false; } + + //Selection + virtual void SelectAll(); + virtual bool HasSelection() const { return false; } + virtual void DeleteSelection(); + virtual wxString GetSelectedText() const { return ""; } + virtual wxString GetSelectedSource() const { return ""; } + virtual void ClearSelection(); + + virtual void RunScript(const wxString& javascript); + + //Virtual Filesystem Support + virtual void RegisterHandler(wxSharedPtr handler); + + static bool StartUp(int &code, const wxString &path = ""); + // If using a separate subprocess then return the result of this function + static int StartUpSubprocess(); + static void Shutdown(); + +protected: + virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + +private: + //History related variables, we currently use our own implementation + wxVector > m_historyList; + int m_historyPosition; + bool m_historyLoadingFromList; + bool m_historyEnabled; + + //We need to store the title and zoom ourselves + wxString m_title; + wxWebViewZoom m_zoomLevel; + + //The timer calls the CEF event loop + wxTimer *m_timer; + + // Current main frame page source + wxString m_pageSource; + + // The text of the current page + wxString m_pageText; + + //We also friend ClientHandler so it can access the history + friend class ClientHandler; + CefRefPtr m_clientHandler; + + wxDECLARE_DYNAMIC_CLASS(wxWebViewChromium); +}; + +class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryChromium : public wxWebViewFactory +{ +public: + virtual wxWebView* Create() { return new wxWebViewChromium; } + virtual wxWebView* Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr) + { return new wxWebViewChromium(parent, id, url, pos, size, style, name); } +}; + #endif // _WX_WEBVIEWCHROMIUM_H_ diff --git a/include/wx/webview_chromium3.h b/include/wx/webview_chromium3.h deleted file mode 100644 index 74f6d9b0d5..0000000000 --- a/include/wx/webview_chromium3.h +++ /dev/null @@ -1,266 +0,0 @@ -///////////////////////////////////////////////////////////////////////////// -// Author: Steven Lamerton -// Copyright: (c) 2013 Steven Lamerton -// Licence: wxWindows licence -///////////////////////////////////////////////////////////////////////////// - -#ifndef _WX_WEBVIEWCHROMIUM3_H_ -#define _WX_WEBVIEWCHROMIUM3_H_ - -//#if CEF_API == 3 - -#include -#include -#include -#include -#include -#include - -#ifdef __VISUALC__ -#pragma warning(push) -#pragma warning(disable:4100) -#endif - -#include -#include - -#ifdef __VISUALC__ -#pragma warning(pop) -#endif - -extern const char wxWebViewBackendChromium[]; - -class wxWebViewChromium; - -// ClientHandler implementation. -class ClientHandler : public CefClient, - public CefContextMenuHandler, - public CefDisplayHandler, - public CefLifeSpanHandler, - public CefLoadHandler -{ -public: - ClientHandler() {}; - virtual ~ClientHandler() {}; - - virtual CefRefPtr GetContextMenuHandler() { return this; } - virtual CefRefPtr GetLifeSpanHandler() { return this; } - virtual CefRefPtr GetLoadHandler() { return this; } - virtual CefRefPtr GetDisplayHandler() { return this; } - - // CefDisplayHandler methods - virtual void OnLoadingStateChange(CefRefPtr browser, - bool isLoading, bool canGoBack, - bool canGoForward); - virtual void OnAddressChange(CefRefPtr browser, - CefRefPtr frame, - const CefString& url); - virtual void OnTitleChange(CefRefPtr browser, - const CefString& title); - virtual bool OnConsoleMessage(CefRefPtr browser, - const CefString& message, - const CefString& source, - int line); - - // CefContextMenuHandler methods - virtual void OnBeforeContextMenu(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - CefRefPtr model); - virtual bool OnContextMenuCommand(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - int command_id, - CefContextMenuHandler::EventFlags event_flags); - virtual void OnContextMenuDismissed(CefRefPtr browser, - CefRefPtr frame); - - // CefLifeSpanHandler methods - virtual bool OnBeforePopup(CefRefPtr browser, - CefRefPtr frame, - const CefString& target_url, - const CefString& target_frame_name, - const CefPopupFeatures& popupFeatures, - CefWindowInfo& windowInfo, - CefRefPtr& client, - CefBrowserSettings& settings, - bool* no_javascript_access); - virtual void OnAfterCreated(CefRefPtr browser); - virtual bool DoClose(CefRefPtr browser); - virtual void OnBeforeClose(CefRefPtr browser); - - // CefLoadHandler methods - virtual void OnLoadStart(CefRefPtr browser, - CefRefPtr frame); - virtual void OnLoadEnd(CefRefPtr browser, - CefRefPtr frame, - int httpStatusCode); - virtual void OnLoadError(CefRefPtr browser, - CefRefPtr frame, - ErrorCode errorCode, - const CefString& errorText, - const CefString& failedUrl); - - CefRefPtr GetBrowser() { return m_browser; } - - void SetWebView(wxWebViewChromium *webview) { m_webview = webview; } - -private: - CefRefPtr m_browser; - wxWebViewChromium *m_webview; - int m_browserId; - - IMPLEMENT_REFCOUNTING(ClientHandler); -}; - - -class WXDLLIMPEXP_WEBVIEW wxWebViewChromium : public wxWebView -{ -public: - - wxWebViewChromium() {} - - wxWebViewChromium(wxWindow* parent, - wxWindowID id, - const wxString& url = wxWebViewDefaultURLStr, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxWebViewNameStr) - { - Create(parent, id, url, pos, size, style, name); - } - - ~wxWebViewChromium(); - - void OnSize(wxSizeEvent &event); - - void SetPageSource(const wxString& pageSource); - - void SetPageText(const wxString& pageText); - - bool Create(wxWindow* parent, - wxWindowID id, - const wxString& url = wxWebViewDefaultURLStr, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxWebViewNameStr); - - virtual void LoadURL(const wxString& url); - virtual void LoadHistoryItem(wxSharedPtr item); - virtual wxVector > GetBackwardHistory(); - virtual wxVector > GetForwardHistory(); - - virtual bool CanGoForward() const; - virtual bool CanGoBack() const; - virtual void GoBack(); - virtual void GoForward(); - virtual void ClearHistory(); - virtual void EnableHistory(bool enable = true); - virtual void Stop(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); - - virtual wxString GetPageSource() const; - virtual wxString GetPageText() const; - - virtual bool IsBusy() const; - virtual wxString GetCurrentURL() const; - virtual wxString GetCurrentTitle() const; - - virtual void SetZoomType(wxWebViewZoomType type); - virtual wxWebViewZoomType GetZoomType() const; - virtual bool CanSetZoomType(wxWebViewZoomType type) const; - - virtual void Print(); - - virtual wxWebViewZoom GetZoom() const; - virtual void SetZoom(wxWebViewZoom zoom); - - virtual void* GetNativeBackend() const; - - virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) { return wxNOT_FOUND; } - - //Clipboard functions - virtual bool CanCut() const { return true; } - virtual bool CanCopy() const { return true; } - virtual bool CanPaste() const { return true; } - virtual void Cut(); - virtual void Copy(); - virtual void Paste(); - - //Undo / redo functionality - virtual bool CanUndo() const { return true; } - virtual bool CanRedo() const { return true; } - virtual void Undo(); - virtual void Redo(); - - //Editing functions - virtual void SetEditable(bool enable = true); - virtual bool IsEditable() const { return false; } - - //Selection - virtual void SelectAll(); - virtual bool HasSelection() const { return false; } - virtual void DeleteSelection(); - virtual wxString GetSelectedText() const { return ""; } - virtual wxString GetSelectedSource() const { return ""; } - virtual void ClearSelection(); - - virtual void RunScript(const wxString& javascript); - - //Virtual Filesystem Support - virtual void RegisterHandler(wxSharedPtr handler); - - static bool StartUp(int &code, const wxString &path = ""); - // If using a separate subprocess then return the result of this function - static int StartUpSubprocess(); - static void Shutdown(); - -protected: - virtual void DoSetPage(const wxString& html, const wxString& baseUrl); - -private: - //History related variables, we currently use our own implementation - wxVector > m_historyList; - int m_historyPosition; - bool m_historyLoadingFromList; - bool m_historyEnabled; - - //We need to store the title and zoom ourselves - wxString m_title; - wxWebViewZoom m_zoomLevel; - - //The timer calls the CEF event loop - wxTimer *m_timer; - - // Current main frame page source - wxString m_pageSource; - - // The text of the current page - wxString m_pageText; - - //We also friend ClientHandler so it can access the history - friend class ClientHandler; - CefRefPtr m_clientHandler; - - wxDECLARE_DYNAMIC_CLASS(wxWebViewChromium); -}; - -class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryChromium : public wxWebViewFactory -{ -public: - virtual wxWebView* Create() { return new wxWebViewChromium; } - virtual wxWebView* Create(wxWindow* parent, - wxWindowID id, - const wxString& url = wxWebViewDefaultURLStr, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxWebViewNameStr) - { return new wxWebViewChromium(parent, id, url, pos, size, style, name); } -}; - -//#endif - -#endif // _WX_WEBVIEWCHROMIUM3_H_ diff --git a/src/common/webview_chromium3.cpp b/src/common/webview_chromium.cpp similarity index 99% rename from src/common/webview_chromium3.cpp rename to src/common/webview_chromium.cpp index d24e29a86d..c9a52802f6 100644 --- a/src/common/webview_chromium3.cpp +++ b/src/common/webview_chromium.cpp @@ -3,15 +3,10 @@ // Copyright: (c) 2013 Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// + #include "wx/wxprec.h" - -#include "wx/webview_chromium.h" - -#if CEF_API == 3 - -#include "wx/webview_chromium.h" - #include +#include #include #include #include @@ -25,6 +20,7 @@ #include #include #include +#include #ifdef __VISUALC__ #pragma warning(pop) @@ -673,5 +669,3 @@ void ClientHandler::OnLoadError(CefRefPtr browser, m_webview->HandleWindowEvent(event); } - -#endif From cd7df9c28b5d282f456aa54de357a13f8b03dd14 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 17 May 2014 19:44:29 +0800 Subject: [PATCH 003/275] Send WEBVIEW_ERROR event after CEF finishing loading. Currently, WEBVIEW_ERROR event is sent to client on CEF::OnLoadError(), which may cause the error message of wxInfoBar disapear. CEF::OnLoadEnd will be invoked after CEF::OnloadError, if WEBVIEW_ERROR event get processed before CEF::LoadEnd, the wxInfoBar's message will disappear since the webpage will get loaded in CEF::LoadEnd. CEF will return "data:text/html,chromewebdata" when url is invalid. --- include/wx/webview_chromium.h | 6 ++++-- src/common/webview_chromium.cpp | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index c64c2f96da..968bf028e0 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -39,7 +39,7 @@ class ClientHandler : public CefClient, public CefLoadHandler { public: - ClientHandler() {}; + ClientHandler():m_loadErrorCode(-1) {}; virtual ~ClientHandler() {}; virtual CefRefPtr GetContextMenuHandler() { return this; } @@ -108,7 +108,9 @@ private: CefRefPtr m_browser; wxWebViewChromium *m_webview; int m_browserId; - + // Record the load error code: enum wxWebViewNavigationError + // -1 means no error. + int m_loadErrorCode; IMPLEMENT_REFCOUNTING(ClientHandler); }; diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index c9a52802f6..a3361c505d 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -554,9 +554,17 @@ void ClientHandler::OnLoadEnd(CefRefPtr browser, wxString url = frame->GetURL().ToString(); wxString target = frame->GetName().ToString(); + // Send webview_error event in case of loading error. + if (m_loadErrorCode != -1) + { + m_loadErrorCode = -1; + wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_ERROR, m_webview->GetId(), url, target); + event.SetEventObject(m_webview); + m_webview->HandleWindowEvent(event); + } + wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_NAVIGATED, m_webview->GetId(), url, target); event.SetEventObject(m_webview); - m_webview->HandleWindowEvent(event); if(frame->IsMain()) @@ -659,13 +667,5 @@ void ClientHandler::OnLoadError(CefRefPtr browser, ERROR_TYPE_CASE(ERR_CACHE_MISS, wxWEBVIEW_NAV_ERR_OTHER); ERROR_TYPE_CASE(ERR_INSECURE_RESPONSE, wxWEBVIEW_NAV_ERR_SECURITY); } - - wxString url = failedUrl.ToString(); - wxString target = frame->GetName().ToString(); - wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_ERROR, m_webview->GetId(), url, target); - event.SetEventObject(m_webview); - event.SetInt(type); - event.SetString(errorText.ToString()); - - m_webview->HandleWindowEvent(event); + m_loadErrorCode = type; } From 7eb95d74757c2243e279dd8c5423cbf1367dccbb Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 17 May 2014 20:13:08 +0800 Subject: [PATCH 004/275] Nits: fix code style. --- include/wx/webview_chromium.h | 5 ++-- src/common/webview_chromium.cpp | 44 ++++++++++++++++----------------- 2 files changed, 24 insertions(+), 25 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 968bf028e0..194dbda906 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -7,7 +7,6 @@ #ifndef _WX_WEBVIEWCHROMIUM_H_ #define _WX_WEBVIEWCHROMIUM_H_ - #include #include #include @@ -39,8 +38,8 @@ class ClientHandler : public CefClient, public CefLoadHandler { public: - ClientHandler():m_loadErrorCode(-1) {}; - virtual ~ClientHandler() {}; + ClientHandler():m_loadErrorCode(-1) {} + virtual ~ClientHandler() {} virtual CefRefPtr GetContextMenuHandler() { return this; } virtual CefRefPtr GetLifeSpanHandler() { return this; } diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index a3361c505d..2023870ce1 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -103,7 +103,8 @@ bool wxWebViewChromium::Create(wxWindow* parent, wxWebViewChromium::~wxWebViewChromium() { CefRefPtr browser = m_clientHandler->GetBrowser(); - if(browser.get()) { + if ( browser.get() ) + { // Let the browser window know we are about to destroy it. browser->GetHost()->ParentWindowWillClose(); } @@ -114,11 +115,11 @@ void wxWebViewChromium::OnSize(wxSizeEvent& event) wxSize size = GetClientSize(); #ifdef __WXMSW__ - if(m_clientHandler && m_clientHandler->GetBrowser() && m_clientHandler->GetBrowser()->GetHost()) + if ( m_clientHandler && m_clientHandler->GetBrowser() && m_clientHandler->GetBrowser()->GetHost() ) { HWND handle = m_clientHandler->GetBrowser()->GetHost()->GetWindowHandle(); - if(handle) + if ( handle ) { HDWP hdwp = BeginDeferWindowPos(1); hdwp = DeferWindowPos(hdwp, handle, NULL, 0, 0, @@ -148,7 +149,7 @@ void* wxWebViewChromium::GetNativeBackend() const bool wxWebViewChromium::CanGoForward() const { - if(m_historyEnabled) + if ( m_historyEnabled ) return m_historyPosition != static_cast(m_historyList.size()) - 1; else return false; @@ -156,7 +157,7 @@ bool wxWebViewChromium::CanGoForward() const bool wxWebViewChromium::CanGoBack() const { - if(m_historyEnabled) + if ( m_historyEnabled ) return m_historyPosition > 0; else return false; @@ -165,7 +166,7 @@ bool wxWebViewChromium::CanGoBack() const void wxWebViewChromium::LoadHistoryItem(wxSharedPtr item) { int pos = -1; - for(unsigned int i = 0; i < m_historyList.size(); i++) + for ( unsigned int i = 0; i < m_historyList.size(); i++ ) { //We compare the actual pointers to find the correct item if(m_historyList[i].get() == item.get()) @@ -183,7 +184,7 @@ wxVector > wxWebViewChromium::GetBackwardHisto wxVector > backhist; //As we don't have std::copy or an iterator constructor in the wxwidgets //native vector we construct it by hand - for(int i = 0; i < m_historyPosition; i++) + for ( int i = 0; i < m_historyPosition; i++ ) { backhist.push_back(m_historyList[i]); } @@ -195,7 +196,7 @@ wxVector > wxWebViewChromium::GetForwardHistor wxVector > forwardhist; //As we don't have std::copy or an iterator constructor in the wxwidgets //native vector we construct it by hand - for(int i = m_historyPosition + 1; i < static_cast(m_historyList.size()); i++) + for ( int i = m_historyPosition + 1; i < static_cast(m_historyList.size()); i++ ) { forwardhist.push_back(m_historyList[i]); } @@ -235,7 +236,7 @@ void wxWebViewChromium::Stop() void wxWebViewChromium::Reload(wxWebViewReloadFlags flags) { - if(flags == wxWEBVIEW_RELOAD_NO_CACHE) + if ( flags == wxWEBVIEW_RELOAD_NO_CACHE ) { m_clientHandler->GetBrowser()->ReloadIgnoreCache(); } @@ -247,7 +248,6 @@ void wxWebViewChromium::Reload(wxWebViewReloadFlags flags) wxString wxWebViewChromium::GetPageSource() const { - //m_clientHandler->GetBrowser()->GetHost()->Find return m_pageSource; } @@ -353,7 +353,7 @@ void wxWebViewChromium::SetZoom(wxWebViewZoom zoom) double mapzoom; // arbitrary way to map our common zoom enum to float zoom - switch (zoom) + switch ( zoom ) { case wxWEBVIEW_ZOOM_TINY: mapzoom = -1.0; @@ -408,10 +408,10 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path) CefMainArgs args(wxGetInstance()); // If there is no subprocess then we need to execute on this process - if(path == "") + if ( path == "" ) { code = CefExecuteProcess(args, NULL); - if(code >= 0) + if ( code >= 0 ) return false; } @@ -463,7 +463,7 @@ bool ClientHandler::OnConsoleMessage(CefRefPtr browser, const CefStr return false; } - // CefContextMenuHandler methods +// CefContextMenuHandler methods void ClientHandler::OnBeforeContextMenu(CefRefPtr browser, CefRefPtr frame, CefRefPtr params, @@ -510,7 +510,7 @@ bool ClientHandler::OnBeforePopup(CefRefPtr browser, void ClientHandler::OnAfterCreated(CefRefPtr browser) { - if(!m_browser.get()) + if ( !m_browser.get() ) { m_browser = browser; m_browserId = browser->GetIdentifier(); @@ -523,7 +523,7 @@ bool ClientHandler::DoClose(CefRefPtr browser) void ClientHandler::OnBeforeClose(CefRefPtr browser) { - if(browser->GetIdentifier() == m_browserId) + if ( browser->GetIdentifier() == m_browserId ) { m_browser = NULL; } @@ -541,7 +541,7 @@ void ClientHandler::OnLoadStart(CefRefPtr browser, m_webview->HandleWindowEvent(event); - if (!event.IsAllowed()) + if ( !event.IsAllowed() ) { // We do not yet have support for vetoing pages } @@ -555,7 +555,7 @@ void ClientHandler::OnLoadEnd(CefRefPtr browser, wxString target = frame->GetName().ToString(); // Send webview_error event in case of loading error. - if (m_loadErrorCode != -1) + if ( m_loadErrorCode != -1 ) { m_loadErrorCode = -1; wxWebViewEvent event(wxEVT_COMMAND_WEBVIEW_ERROR, m_webview->GetId(), url, target); @@ -567,7 +567,7 @@ void ClientHandler::OnLoadEnd(CefRefPtr browser, event.SetEventObject(m_webview); m_webview->HandleWindowEvent(event); - if(frame->IsMain()) + if ( frame->IsMain() ) { //Get source code when main frame loads ended. CefRefPtr source_visitor = new wxStringVisitor( @@ -581,11 +581,11 @@ void ClientHandler::OnLoadEnd(CefRefPtr browser, //As we are complete we also add to the history list, but not if the //page is not the main page, ie it is a subframe - if(m_webview->m_historyEnabled && !m_webview->m_historyLoadingFromList) + if ( m_webview->m_historyEnabled && !m_webview->m_historyLoadingFromList ) { //If we are not at the end of the list, then erase everything //between us and the end before adding the new page - if(m_webview->m_historyPosition != static_cast(m_webview->m_historyList.size()) - 1) + if ( m_webview->m_historyPosition != static_cast(m_webview->m_historyList.size()) - 1 ) { m_webview->m_historyList.erase(m_webview->m_historyList.begin() + m_webview->m_historyPosition + 1, m_webview->m_historyList.end()); @@ -616,7 +616,7 @@ void ClientHandler::OnLoadError(CefRefPtr browser, break wxWebViewNavigationError type = wxWEBVIEW_NAV_ERR_OTHER; - switch (errorCode) + switch ( errorCode ) { ERROR_TYPE_CASE(ERR_FAILED, wxWEBVIEW_NAV_ERR_OTHER); ERROR_TYPE_CASE(ERR_ABORTED, wxWEBVIEW_NAV_ERR_USER_CANCELLED); From fee9c6223f563fe2bc77fc87e50a2be67058e9ac Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 18 May 2014 11:35:35 +0800 Subject: [PATCH 005/275] Specify the link to Debug/Release CEF library. --- samples/webview_chromium/webview_chromium.bkl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index 1087b22d98..58998c4a75 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -7,10 +7,13 @@ + Debug + Release + - $(CEF_INCLUDE_DIR)/Debug/,$(CEF_INCLUDE_DIR)/out/Debug/lib/ + $(CEF_INCLUDE_DIR)/$(CONFIGURE)/,$(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ From 0ffbd0741bdc3c2f0fc28d59a3e86d49e68c7227 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 20 May 2014 23:20:41 +0800 Subject: [PATCH 006/275] Nits: Fix code style. --- include/wx/webview_chromium.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 194dbda906..c6fa5a338b 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -38,7 +38,7 @@ class ClientHandler : public CefClient, public CefLoadHandler { public: - ClientHandler():m_loadErrorCode(-1) {} + ClientHandler() : m_loadErrorCode(-1) {} virtual ~ClientHandler() {} virtual CefRefPtr GetContextMenuHandler() { return this; } From a556deffb8b21e82743242998d00b24705681937 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 25 May 2014 18:29:01 +0800 Subject: [PATCH 007/275] Remove unnecessary subprocess.exe during webview startups. --- samples/webview_chromium/webview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index ae53a256ca..64f8a65cc8 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -221,7 +221,7 @@ bool WebApp::OnInit() { // We spawn a separate subprocess int code = 0; - if(!wxWebViewChromium::StartUp(code, "subprocess.exe")) + if(!wxWebViewChromium::StartUp(code, "")) exit(code); if ( !wxApp::OnInit() ) From 8354eade3d1a26f7d01bfb2ef4b3dd306a57f09d Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 27 May 2014 23:30:45 +0800 Subject: [PATCH 008/275] Correct building link to CEF library. --- samples/webview_chromium/webview_chromium.bkl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index 58998c4a75..6215b12f8c 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -7,8 +7,10 @@ - Debug - Release + + Debug + Release + From 9de0e4fdd7b9b8acbff5184a4315554b8fdd5cba Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 28 May 2014 22:43:53 +0800 Subject: [PATCH 009/275] Add webview_chromium.bkl to samples.bkl --- samples/samples.bkl | 1 + 1 file changed, 1 insertion(+) diff --git a/samples/samples.bkl b/samples/samples.bkl index 3d415c22c1..93411ec871 100644 --- a/samples/samples.bkl +++ b/samples/samples.bkl @@ -89,6 +89,7 @@ + From 3a4d793579894e5c231c4a86ec68c2fca635999a Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 29 May 2014 00:14:47 +0800 Subject: [PATCH 010/275] Enable wxWebviewChromium dynamic builds. --- build/bakefiles/files.bkl | 18 ++++++++++++++++++ build/bakefiles/multilib.bkl | 4 ++++ include/wx/webview_chromium.h | 2 +- src/common/webview_chromium.cpp | 2 +- 4 files changed, 24 insertions(+), 2 deletions(-) diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index e4902249f9..c986308fbb 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3102,6 +3102,24 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! + + Debug + Release + + + + + + $(CEF_INCLUDE_DIR)/$(CONFIGURE)/,$(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ + + + + + + + + + src/msw/webview_ie.cpp diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index 7bccf7ad1a..7e08f3e899 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -186,6 +186,10 @@ basedll $(EXTRALIBS_WEBVIEW) $(WEBVIEW_HDR) + $(CEF_INCLUDE_DIR) + $(CEF_LIB_DIR) + libcef + libcef_dll_wrapper Date: Fri, 30 May 2014 00:08:41 +0800 Subject: [PATCH 011/275] Move CEF specific variables to config.bkl to avoid duplicate. --- build/bakefiles/config.bkl | 22 +++++++++++++ build/bakefiles/files.bkl | 22 ------------- samples/webview_chromium/webview_chromium.bkl | 32 ++++--------------- 3 files changed, 28 insertions(+), 48 deletions(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index ad06b70a0b..013a3eef45 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -545,4 +545,26 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. 0 + + + + + + Debug + Release + + + + + + $(CEF_INCLUDE_DIR)/$(CONFIGURE)/,$(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ + + + + + + + + + diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index c986308fbb..a8b5f77812 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3098,28 +3098,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! - - - - - - Debug - Release - - - - - - $(CEF_INCLUDE_DIR)/$(CONFIGURE)/,$(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ - - - - - - - - - src/msw/webview_ie.cpp diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index 6215b12f8c..a4452cd853 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -3,28 +3,6 @@ - - - - - - Debug - Release - - - - - - $(CEF_INCLUDE_DIR)/$(CONFIGURE)/,$(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ - - - - - - - - - webview.cpp @@ -35,10 +13,12 @@ adv core base - $(CEF_LIB_DIR) - $(CEF_INCLUDE_DIR) - libcef - libcef_dll_wrapper + + $(CEF_LIB_DIR) + $(CEF_INCLUDE_DIR) + libcef + libcef_dll_wrapper + ../sample.rc From ad418054411c89d238f9935f69307f328de86c4d Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 30 May 2014 16:10:49 +0800 Subject: [PATCH 012/275] Add a CEF_INCLUDE_DIR check in webview_chromium sample. --- samples/webview_chromium/webview_chromium.bkl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index a4452cd853..36c412db44 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -13,7 +13,7 @@ adv core base - + $(CEF_LIB_DIR) $(CEF_INCLUDE_DIR) libcef From da0137160238ae4a627ece03bea7f374beead7fa Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 31 May 2014 16:42:23 +0800 Subject: [PATCH 013/275] Remove lib prefix in multilib.bkl There is no need to add lib prefix, since g++ `-l` option will add it automatically. This patch does no effect on windows platform. --- build/bakefiles/multilib.bkl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index 7e08f3e899..912f8df421 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -188,8 +188,8 @@ $(WEBVIEW_HDR) $(CEF_INCLUDE_DIR) $(CEF_LIB_DIR) - libcef - libcef_dll_wrapper + cef + cef_dll_wrapper Date: Sat, 31 May 2014 02:41:36 -0700 Subject: [PATCH 014/275] Add CEF link path on Linux. --- build/bakefiles/config.bkl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index 013a3eef45..8d83091d5c 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -562,8 +562,12 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. + + - + $(CEF_INCLUDE_DIR)/Release/ + -L$(CEF_INCLUDE_DIR)/out/Release/obj.target/ From ea6bd5cfe5670d0db8d503ff19c9d9f2d58d84b0 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 2 Jun 2014 07:05:14 -0700 Subject: [PATCH 015/275] Split CEF_LIB_DIR into LIBCEF_PATH and LIBCEF_WRAPPER_PATH. --- build/bakefiles/config.bkl | 23 +++++++++++++------ build/bakefiles/multilib.bkl | 3 ++- samples/webview_chromium/webview_chromium.bkl | 3 ++- 3 files changed, 20 insertions(+), 9 deletions(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index 8d83091d5c..036d0fce30 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -554,20 +554,29 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. Release - - + + - $(CEF_INCLUDE_DIR)/$(CONFIGURE)/,$(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ + $(CEF_INCLUDE_DIR)/$(CONFIGURE)/ - - $(CEF_INCLUDE_DIR)/Release/ - -L$(CEF_INCLUDE_DIR)/out/Release/obj.target/ + + + + + + + $(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ + + + + + + $(CEF_INCLUDE_DIR)/out/Release/obj.target/ diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index 912f8df421..374e66f4d3 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -187,7 +187,8 @@ $(EXTRALIBS_WEBVIEW) $(WEBVIEW_HDR) $(CEF_INCLUDE_DIR) - $(CEF_LIB_DIR) + $(LIBCEF_PATH) + $(LIBCEF_WRAPPER_PATH) cef cef_dll_wrapper diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index 36c412db44..fb6798ae09 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -14,7 +14,8 @@ core base - $(CEF_LIB_DIR) + $(LIBCEF_PATH) + $(LIBCEF_WRAPPER_PATH) $(CEF_INCLUDE_DIR) libcef libcef_dll_wrapper From c4fa5e42376a2e760d8e21100ab967f38d7ae4e4 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 3 Jun 2014 07:10:49 -0700 Subject: [PATCH 016/275] Add webview_chromium sample in configure.in Fix configure can not generate Makefile in samples/webview_chromium directory. --- configure.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/configure.in b/configure.in index 9104bfc8d3..c32533970d 100644 --- a/configure.in +++ b/configure.in @@ -7228,7 +7228,7 @@ fi if test "$wxUSE_WEBVIEW" = "yes"; then USE_WEBVIEW=1 AC_DEFINE(wxUSE_WEBVIEW) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview webview_chromium" else USE_WEBVIEW=0 fi From 9f3c2c597e80ab8be5014141cf496c4767402fd7 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 3 Jun 2014 07:27:57 -0700 Subject: [PATCH 017/275] Correct link path in webview_chromium sample. --- samples/webview_chromium/webview_chromium.bkl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index fb6798ae09..f9a6db8d49 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -17,8 +17,8 @@ $(LIBCEF_PATH) $(LIBCEF_WRAPPER_PATH) $(CEF_INCLUDE_DIR) - libcef - libcef_dll_wrapper + cef + cef_dll_wrapper ../sample.rc From 08fb3979b655bdb08d6073ba2a34e3a4247daa8d Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 5 Jun 2014 00:12:03 +0800 Subject: [PATCH 018/275] Correct cef link name on Windows. Linux link option does not require 'lib' prefix, while windows require. --- build/bakefiles/multilib.bkl | 14 ++++++++++++-- samples/webview_chromium/webview_chromium.bkl | 13 +++++++++++-- 2 files changed, 23 insertions(+), 4 deletions(-) diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index 374e66f4d3..650aad7d90 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -189,8 +189,18 @@ $(CEF_INCLUDE_DIR) $(LIBCEF_PATH) $(LIBCEF_WRAPPER_PATH) - cef - cef_dll_wrapper + + + libcef + libcef_dll_wrapper + + + cef + cef_dll_wrapper + + + + $(LIBCEF_PATH) $(LIBCEF_WRAPPER_PATH) $(CEF_INCLUDE_DIR) - cef - cef_dll_wrapper + + libcef + libcef_dll_wrapper + + + cef + cef_dll_wrapper + + + + ../sample.rc From 9eca39a928ff9a51c677db31fd772953923ebd36 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 7 Jun 2014 18:34:09 -0700 Subject: [PATCH 019/275] Integrate CEF MessageLoop to wxWidgets MessageLoop. * Enable webview_chromium on Linux, webview_chromium runs normally, but browser window is split out of wxWidget window now and we need to host it in wxWidgets window later. * Make cef messageloop processing in wx::ProcessIdle period, this way works on windows and linux. * Don't use multiple_message_loop on Windows. --- include/wx/webview_chromium.h | 8 ++++- samples/webview_chromium/webview.cpp | 11 +++++++ src/common/webview_chromium.cpp | 45 +++++++++++++++++++++++----- 3 files changed, 56 insertions(+), 8 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 5258461dac..029e4802e1 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -7,7 +7,6 @@ #ifndef _WX_WEBVIEWCHROMIUM_H_ #define _WX_WEBVIEWCHROMIUM_H_ -#include #include #include #include @@ -212,10 +211,17 @@ public: //Virtual Filesystem Support virtual void RegisterHandler(wxSharedPtr handler); +#ifdef __WXMSW__ static bool StartUp(int &code, const wxString &path = ""); +#else + static bool StartUp(int &code, const wxString &path, + int argc, char* argv[]); +#endif + // If using a separate subprocess then return the result of this function static int StartUpSubprocess(); static void Shutdown(); + static void RunMessageLoopOnce(); protected: virtual void DoSetPage(const wxString& html, const wxString& baseUrl); diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 64f8a65cc8..c8de531a4a 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -72,6 +72,7 @@ public: virtual bool OnInit(); virtual int OnExit(); + virtual bool ProcessIdle(); /* #if wxUSE_CMDLINE_PARSER virtual void OnInitCmdLine(wxCmdLineParser& parser) @@ -221,7 +222,12 @@ bool WebApp::OnInit() { // We spawn a separate subprocess int code = 0; +#ifdef __WXMSW__ if(!wxWebViewChromium::StartUp(code, "")) +#else + if(!wxWebViewChromium::StartUp(code, "", + wxApp::argc, wxApp::argv)) +#endif exit(code); if ( !wxApp::OnInit() ) @@ -260,6 +266,11 @@ int WebApp::OnExit() return wxApp::OnExit(); } +bool WebApp::ProcessIdle() { + wxWebViewChromium::RunMessageLoopOnce(); + return wxApp::ProcessIdle(); +} + WebFrame::WebFrame(const wxString& url) : wxFrame(NULL, wxID_ANY, "wxWebView Sample") { diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 0119981727..90e1188dd0 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -8,9 +8,11 @@ #include #include #include -#include #include +#ifdef __WXMSW__ +#include +#endif #ifdef __VISUALC__ #pragma warning(push) @@ -85,16 +87,29 @@ bool wxWebViewChromium::Create(wxWindow* parent, // Initialize window info to the defaults for a child window info.SetAsChild(GetHWND(), wxGetClientRect(this->GetHWND())); #endif + +#ifdef __WXGTK__ + GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL); + GtkWidget* vbox = gtk_vbox_new(FALSE, 0); + gtk_container_add(GTK_CONTAINER(window), vbox); + gtk_window_set_default_size(GTK_WINDOW(window), 400, 400); + info.SetAsChild(vbox); +#endif // Creat the new child browser window, we do this async as we use a multi // threaded message loop #if CHROME_VERSION_BUILD >= 1650 - CefBrowserHost::CreateBrowser(info, static_cast>(m_clientHandler), + CefBrowserHost::CreateBrowser(info, static_cast >(m_clientHandler), url.ToStdString(), browsersettings, NULL); #else - CefBrowserHost::CreateBrowser(info, static_cast>(m_clientHandler), + CefBrowserHost::CreateBrowser(info, static_cast >(m_clientHandler), url.ToStdString(), browsersettings); #endif + +#ifndef __WXMSW__ + // Show browser window. + gtk_widget_show_all(GTK_WIDGET(window)); +#endif this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); return true; @@ -403,9 +418,17 @@ void wxWebViewChromium::RegisterHandler(wxSharedPtr handler) // We currently don't support custom scheme handlers } -bool wxWebViewChromium::StartUp(int &code, const wxString &path) +#ifdef __WXMSW__ +bool StartUp(int &code, const wxString &path = "") +#else +bool wxWebViewChromium::StartUp(int &code, const wxString &path, + int argc, char* argv[]) +#endif { - CefMainArgs args(wxGetInstance()); +#ifdef __WXMSW__ + CefMainArgs args(wxGetInstance()); +#else + CefMainArgs args(argc, argv); // If there is no subprocess then we need to execute on this process if ( path == "" ) @@ -418,7 +441,7 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path) CefSettings settings; // We use a multithreaded message loop so we don't have to integrate // with the wx message loop - settings.multi_threaded_message_loop = true; + //settings.multi_threaded_message_loop = true; CefString(&settings.browser_subprocess_path) = path.ToStdString(); return CefInitialize(args, settings, NULL); @@ -426,11 +449,19 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path) int wxWebViewChromium::StartUpSubprocess() { - CefMainArgs args(wxGetInstance()); +#if __WXMSW__ + CefMainArgs args(wxGetInstance()); +#else + CefMainArgs args; return CefExecuteProcess(args, NULL); } +void wxWebViewChromium::RunMessageLoopOnce() +{ + CefDoMessageLoopWork(); +} + void wxWebViewChromium::Shutdown() { CefShutdown(); From 2d1502f131100bb1954da3c08204573229bc91ba Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 7 Jun 2014 18:52:14 -0700 Subject: [PATCH 020/275] Fix autoconf generated error in bakefile_gen. --- build/bakefiles/config.bkl | 24 +++++++++++++++++++ build/bakefiles/multilib.bkl | 14 ++--------- samples/webview_chromium/webview_chromium.bkl | 13 ++-------- 3 files changed, 28 insertions(+), 23 deletions(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index 036d0fce30..93ee1c0574 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -580,4 +580,28 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. + + + libcef + + + + + + cef + + + + + + libcef + + + + + + cef_dll_wrapper + + + diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index 650aad7d90..d8faaea142 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -189,18 +189,8 @@ $(CEF_INCLUDE_DIR) $(LIBCEF_PATH) $(LIBCEF_WRAPPER_PATH) - - - libcef - libcef_dll_wrapper - - - cef - cef_dll_wrapper - - - - + $(LIBCEF_NAME) + $(LIBCEF_DLL_WRAPPER_NAME) $(LIBCEF_PATH) $(LIBCEF_WRAPPER_PATH) $(CEF_INCLUDE_DIR) - - libcef - libcef_dll_wrapper - - - cef - cef_dll_wrapper - - - - + $(LIBCEF_NAME) + $(LIBCEF_DLL_WRAPPER_NAME) ../sample.rc From d60f60eb1fc48444563abc47a3d67ee1441a11eb Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 9 Jun 2014 01:19:02 -0700 Subject: [PATCH 021/275] Fix some macro mistake issues. --- src/common/webview_chromium.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 90e1188dd0..8f016e4831 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -106,7 +106,7 @@ bool wxWebViewChromium::Create(wxWindow* parent, url.ToStdString(), browsersettings); #endif -#ifndef __WXMSW__ +#ifdef __WXGTK__ // Show browser window. gtk_widget_show_all(GTK_WIDGET(window)); #endif @@ -429,7 +429,7 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, CefMainArgs args(wxGetInstance()); #else CefMainArgs args(argc, argv); - +#endif // If there is no subprocess then we need to execute on this process if ( path == "" ) { @@ -449,11 +449,11 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, int wxWebViewChromium::StartUpSubprocess() { -#if __WXMSW__ +#ifdef __WXMSW__ CefMainArgs args(wxGetInstance()); #else CefMainArgs args; - +#endif return CefExecuteProcess(args, NULL); } From 49f183ce414f2dd6487f8dbbef5a74335cc6045f Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 9 Jun 2014 17:22:15 +0800 Subject: [PATCH 022/275] Fix build error on windows. --- build/bakefiles/config.bkl | 2 +- src/common/webview_chromium.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index 93ee1c0574..5b32f9e282 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -594,7 +594,7 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. - libcef + libcef_dll_wrapper diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 8f016e4831..95238019d1 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -419,7 +419,7 @@ void wxWebViewChromium::RegisterHandler(wxSharedPtr handler) } #ifdef __WXMSW__ -bool StartUp(int &code, const wxString &path = "") +bool wxWebViewChromium::StartUp(int &code, const wxString &path) #else bool wxWebViewChromium::StartUp(int &code, const wxString &path, int argc, char* argv[]) From d51a8d20f7de3901fe551bc4c7c26a9a58cfb005 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 9 Jun 2014 17:53:18 +0800 Subject: [PATCH 023/275] Set cef messageloop running inside wxWebviewChromium instead of client side. --- include/wx/webview_chromium.h | 2 +- samples/webview_chromium/webview.cpp | 8 ++------ src/common/webview_chromium.cpp | 4 ++-- 3 files changed, 5 insertions(+), 9 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 029e4802e1..194a2513c3 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -221,7 +221,7 @@ public: // If using a separate subprocess then return the result of this function static int StartUpSubprocess(); static void Shutdown(); - static void RunMessageLoopOnce(); + static void RunCEFMessageLoopOnIdle(wxIdleEvent& event); protected: virtual void DoSetPage(const wxString& html, const wxString& baseUrl); diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index c8de531a4a..509f6c3ddb 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -72,7 +72,7 @@ public: virtual bool OnInit(); virtual int OnExit(); - virtual bool ProcessIdle(); + /* #if wxUSE_CMDLINE_PARSER virtual void OnInitCmdLine(wxCmdLineParser& parser) @@ -150,6 +150,7 @@ public: void OnFindOptions(wxCommandEvent& evt); void OnEnableContextMenu(wxCommandEvent& evt); + private: wxTextCtrl* m_url; wxWebView* m_browser; @@ -266,11 +267,6 @@ int WebApp::OnExit() return wxApp::OnExit(); } -bool WebApp::ProcessIdle() { - wxWebViewChromium::RunMessageLoopOnce(); - return wxApp::ProcessIdle(); -} - WebFrame::WebFrame(const wxString& url) : wxFrame(NULL, wxID_ANY, "wxWebView Sample") { diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 95238019d1..044c41d571 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -111,7 +111,7 @@ bool wxWebViewChromium::Create(wxWindow* parent, gtk_widget_show_all(GTK_WIDGET(window)); #endif this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); - + this->Bind(wxEVT_IDLE, &wxWebViewChromium::RunCEFMessageLoopOnIdle); return true; } @@ -457,7 +457,7 @@ int wxWebViewChromium::StartUpSubprocess() return CefExecuteProcess(args, NULL); } -void wxWebViewChromium::RunMessageLoopOnce() +void wxWebViewChromium::RunCEFMessageLoopOnIdle(wxIdleEvent& event) { CefDoMessageLoopWork(); } From 10abac0c154fcb22e3fe17635f28c246828cd484 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 10 Jun 2014 01:19:30 -0700 Subject: [PATCH 024/275] Set wxWidgets_src/cef as CEF default path. --- build/bakefiles/config.bkl | 1 + 1 file changed, 1 insertion(+) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index 5b32f9e282..94a861d775 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -547,6 +547,7 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. + $(TOP_SRCDIR)/cef From 50c829aeebd947b2c3a72e84e97de1b2ebfd41a5 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 12 Jun 2014 09:06:57 -0700 Subject: [PATCH 025/275] Host CEF browser window in wxWidgets window. --- src/common/webview_chromium.cpp | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 044c41d571..a215486f2d 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -66,9 +66,11 @@ bool wxWebViewChromium::Create(wxWindow* parent, long style, const wxString& name) { - if (!wxControl::Create(parent, id, pos, size, style, - wxDefaultValidator, name)) + style |= wxHSCROLL | wxVSCROLL; + if (!PreCreation( parent, pos, size ) || + !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) { + wxFAIL_MSG( wxT("wxWebViewChromium creation failed") ); return false; } @@ -89,14 +91,11 @@ bool wxWebViewChromium::Create(wxWindow* parent, #endif #ifdef __WXGTK__ - GtkWidget* window = gtk_window_new(GTK_WINDOW_TOPLEVEL); GtkWidget* vbox = gtk_vbox_new(FALSE, 0); - gtk_container_add(GTK_CONTAINER(window), vbox); - gtk_window_set_default_size(GTK_WINDOW(window), 400, 400); + GTKCreateScrolledWindowWith(vbox); + g_object_ref(m_widget); info.SetAsChild(vbox); #endif - // Creat the new child browser window, we do this async as we use a multi - // threaded message loop #if CHROME_VERSION_BUILD >= 1650 CefBrowserHost::CreateBrowser(info, static_cast >(m_clientHandler), @@ -106,12 +105,10 @@ bool wxWebViewChromium::Create(wxWindow* parent, url.ToStdString(), browsersettings); #endif -#ifdef __WXGTK__ - // Show browser window. - gtk_widget_show_all(GTK_WIDGET(window)); -#endif this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); this->Bind(wxEVT_IDLE, &wxWebViewChromium::RunCEFMessageLoopOnIdle); + m_parent->DoAddChild( this ); + PostCreation(size); return true; } From f349e5df6cb0a05b76ec7da87ec2c52ac03a6280 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 13 Jun 2014 01:18:20 -0700 Subject: [PATCH 026/275] Enable CEF debug log. --- src/common/webview_chromium.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index a215486f2d..e2d1f5e439 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -436,6 +436,10 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, } CefSettings settings; +#ifdef __WXDEBUG__ + settings.log_severity = LOGSEVERITY_INFO; + CefString(&settings.log_file).FromASCII("./debug.log"); +#endif // We use a multithreaded message loop so we don't have to integrate // with the wx message loop //settings.multi_threaded_message_loop = true; From 9061615ec69e00c3f7b96ae69faf25725ceee03c Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 13 Jun 2014 01:27:39 -0700 Subject: [PATCH 027/275] Remove CEF message loop running to client. Running CEF message loop inside wxWebviewChromium internal will get segument fault, while moving to client doesn't. Reset to the previous client solution to avoid segument falut, since I don't figure out the segument fault reason. --- include/wx/webview_chromium.h | 2 +- samples/webview_chromium/webview.cpp | 7 +++++++ src/common/webview_chromium.cpp | 3 +-- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 194a2513c3..81e2fbd215 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -221,7 +221,7 @@ public: // If using a separate subprocess then return the result of this function static int StartUpSubprocess(); static void Shutdown(); - static void RunCEFMessageLoopOnIdle(wxIdleEvent& event); + static void RunCEFMessageLoopOnIdle(); protected: virtual void DoSetPage(const wxString& html, const wxString& baseUrl); diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 509f6c3ddb..d82b23c0a2 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -72,6 +72,7 @@ public: virtual bool OnInit(); virtual int OnExit(); + virtual bool ProcessIdle(); /* #if wxUSE_CMDLINE_PARSER @@ -267,6 +268,12 @@ int WebApp::OnExit() return wxApp::OnExit(); } +bool WebApp::ProcessIdle() { + wxWebViewChromium::RunCEFMessageLoopOnIdle(); + return wxApp::ProcessIdle(); +} + + WebFrame::WebFrame(const wxString& url) : wxFrame(NULL, wxID_ANY, "wxWebView Sample") { diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index e2d1f5e439..24bc9a2db8 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -106,7 +106,6 @@ bool wxWebViewChromium::Create(wxWindow* parent, #endif this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); - this->Bind(wxEVT_IDLE, &wxWebViewChromium::RunCEFMessageLoopOnIdle); m_parent->DoAddChild( this ); PostCreation(size); return true; @@ -458,7 +457,7 @@ int wxWebViewChromium::StartUpSubprocess() return CefExecuteProcess(args, NULL); } -void wxWebViewChromium::RunCEFMessageLoopOnIdle(wxIdleEvent& event) +void wxWebViewChromium::RunCEFMessageLoopOnIdle() { CefDoMessageLoopWork(); } From 1c2885b290eebde0905f205185f14f5cee91823d Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 13 Jun 2014 01:38:02 -0700 Subject: [PATCH 028/275] Fix argument inconsistency issue. --- samples/webview_chromium/webview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index d82b23c0a2..14c1f971d7 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -768,7 +768,7 @@ void WebFrame::OnFindText(wxCommandEvent& evt) { count++; } - wxLogMessage("Searching for:%s current match:%i/%i", m_findText.c_str(), count, m_findCount); + wxLogMessage("Searching for:%s current match:%ld/%d", m_findText.c_str(), count, m_findCount); } /** From 054e3f21a3b17606ae9ba7195fda3d517c8d3879 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 13 Jun 2014 19:24:46 +0800 Subject: [PATCH 029/275] Fix windows build error. --- src/common/webview_chromium.cpp | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 24bc9a2db8..190127a0ee 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -66,13 +66,23 @@ bool wxWebViewChromium::Create(wxWindow* parent, long style, const wxString& name) { +#ifdef __WXMSW__ + if ( !wxControl::Create(parent, id, pos, size, style, + wxDefaultValidator, name) ) + { + return false; + } +#endif + +#ifdef __WXGTK__ style |= wxHSCROLL | wxVSCROLL; - if (!PreCreation( parent, pos, size ) || - !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name )) + if ( !PreCreation( parent, pos, size ) || + !CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ) ) { wxFAIL_MSG( wxT("wxWebViewChromium creation failed") ); return false; } +#endif m_historyLoadingFromList = false; m_historyEnabled = true; @@ -95,6 +105,8 @@ bool wxWebViewChromium::Create(wxWindow* parent, GTKCreateScrolledWindowWith(vbox); g_object_ref(m_widget); info.SetAsChild(vbox); + m_parent->DoAddChild( this ); + PostCreation(size); #endif #if CHROME_VERSION_BUILD >= 1650 @@ -106,8 +118,6 @@ bool wxWebViewChromium::Create(wxWindow* parent, #endif this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); - m_parent->DoAddChild( this ); - PostCreation(size); return true; } From 13db4d4a90c86e675121673581045e3b6309a88a Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 13 Jun 2014 19:28:09 +0800 Subject: [PATCH 030/275] Cleanup: remove unused m_timer. --- include/wx/webview_chromium.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 81e2fbd215..a57a43db8f 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -237,9 +237,6 @@ private: wxString m_title; wxWebViewZoom m_zoomLevel; - //The timer calls the CEF event loop - wxTimer *m_timer; - // Current main frame page source wxString m_pageSource; From 6fd59864cf50c4e650fc49cdf80fb0fa3facf046 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 16 Jun 2014 21:52:29 -0700 Subject: [PATCH 031/275] Fix gtk_scrolled_window_add() warning. Using gtk viewport instead of vbox, to avoid the following waring: " Gtk: gtk_scrolled_window_add(): cannot add non scrollable widget use gtk_scrolled_window_add_with_viewport() instead". --- src/common/webview_chromium.cpp | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 190127a0ee..b7a908bddb 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -101,12 +101,19 @@ bool wxWebViewChromium::Create(wxWindow* parent, #endif #ifdef __WXGTK__ - GtkWidget* vbox = gtk_vbox_new(FALSE, 0); - GTKCreateScrolledWindowWith(vbox); - g_object_ref(m_widget); - info.SetAsChild(vbox); + m_widget = gtk_scrolled_window_new( NULL, NULL ); + g_object_ref( m_widget ); + GtkScrolledWindow *scrolled_window = GTK_SCROLLED_WINDOW( m_widget ); + // Hide the scroll bar. + gtk_scrolled_window_set_policy( scrolled_window, GTK_POLICY_NEVER, GTK_POLICY_NEVER); + GtkWidget* view_port = gtk_viewport_new( NULL, NULL ); + gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(scrolled_window), + view_port ); + info.SetAsChild( view ); m_parent->DoAddChild( this ); - PostCreation(size); + PostCreation( size ); + + gtk_widget_show( view ); #endif #if CHROME_VERSION_BUILD >= 1650 From 377b6eb1dd4eac0cd234044700e51b056808c9f3 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 17 Jun 2014 00:34:44 -0700 Subject: [PATCH 032/275] Fix rename issue. --- src/common/webview_chromium.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index b7a908bddb..29b9063820 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -109,11 +109,11 @@ bool wxWebViewChromium::Create(wxWindow* parent, GtkWidget* view_port = gtk_viewport_new( NULL, NULL ); gtk_scrolled_window_add_with_viewport( GTK_SCROLLED_WINDOW(scrolled_window), view_port ); - info.SetAsChild( view ); + info.SetAsChild( view_port ); m_parent->DoAddChild( this ); PostCreation( size ); - gtk_widget_show( view ); + gtk_widget_show( view_port ); #endif #if CHROME_VERSION_BUILD >= 1650 From 559626d7505ac67de80e411415e413fb35817246 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 18 Jun 2014 11:30:22 +0800 Subject: [PATCH 033/275] Add webview xcode project file. Copy and modify from samples/minimal/minimal_cocoa.xcodeproj --- samples/webview/Info_cocoa.plist | 41 +++ .../webview/webview.xcodeproj/project.pbxproj | 346 ++++++++++++++++++ .../contents.xcworkspacedata | 7 + .../xcshareddata/minimal_cocoa.xccheckout | 41 +++ .../UserInterfaceState.xcuserstate | Bin 0 -> 106744 bytes .../WorkspaceSettings.xcsettings | 10 + .../xcschemes/dynamic.xcscheme | 86 +++++ .../xcschemes/static.xcscheme | 86 +++++ .../xcschemes/xcschememanagement.plist | 32 ++ 9 files changed, 649 insertions(+) create mode 100644 samples/webview/Info_cocoa.plist create mode 100644 samples/webview/webview.xcodeproj/project.pbxproj create mode 100644 samples/webview/webview.xcodeproj/project.xcworkspace/contents.xcworkspacedata create mode 100644 samples/webview/webview.xcodeproj/project.xcworkspace/xcshareddata/minimal_cocoa.xccheckout create mode 100644 samples/webview/webview.xcodeproj/project.xcworkspace/xcuserdata/hokein.xcuserdatad/UserInterfaceState.xcuserstate create mode 100644 samples/webview/webview.xcodeproj/project.xcworkspace/xcuserdata/hokein.xcuserdatad/WorkspaceSettings.xcsettings create mode 100644 samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/dynamic.xcscheme create mode 100644 samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/static.xcscheme create mode 100644 samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/xcschememanagement.plist diff --git a/samples/webview/Info_cocoa.plist b/samples/webview/Info_cocoa.plist new file mode 100644 index 0000000000..47eb09a56e --- /dev/null +++ b/samples/webview/Info_cocoa.plist @@ -0,0 +1,41 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + $(PRODUCT_NAME) + CFBundleGetInfoString + $(PRODUCT_NAME) version 3.1.0, (c) 2005-2013 wxWidgets + CFBundleIconFile + wxmac.icns + CFBundleIdentifier + org.wxwidgets.samples.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLocalizations + + de + en + fr + it + + CFBundleLongVersionString + 3.1.0, (c) 2005-2013 wxWidgets + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 3.1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.1.0 + NSHumanReadableCopyright + Copyright 2005-2013 wxWidgets + NSPrincipalClass + wxNSApplication + + diff --git a/samples/webview/webview.xcodeproj/project.pbxproj b/samples/webview/webview.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..254c9d8d44 --- /dev/null +++ b/samples/webview/webview.xcodeproj/project.pbxproj @@ -0,0 +1,346 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 405B1AE010EF25D200676938 /* libwx_osx_cocoa_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */; }; + 40AC73361325727300982A5C /* libwx_osx_cocoa.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */; }; + 40AC73371325728400982A5C /* libwx_osx_cocoa.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */; }; + 761D3A2C195139C500333B08 /* webview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 761D3A2B195139C500333B08 /* webview.cpp */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 405B1A8910EF202100676938 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D2AAC0C705546C1D00DB518D; + remoteInfo = dynamic; + }; + 405B1A8B10EF202100676938 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 404BEE6110EC83280080E2B8; + remoteInfo = static; + }; + 405B1A9010EF207D00676938 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 363401F972C53D8EBD3D4BD9; + remoteInfo = dynamic; + }; + 405B1ADD10EF25B100676938 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BAB02EC06578349A9171CCAC; + remoteInfo = static; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 405B1A9410EF209B00676938 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 40AC73371325728400982A5C /* libwx_osx_cocoa.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = wxcocoa.xcodeproj; path = ../../build/osx/wxcocoa.xcodeproj; sourceTree = SOURCE_ROOT; }; + 405B1ACB10EF253300676938 /* webview.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = webview.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 40735927137088070077DE1B /* Info_cocoa.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info_cocoa.plist; sourceTree = ""; }; + 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxcocoa.xcconfig; path = ../../build/osx/wxcocoa.xcconfig; sourceTree = SOURCE_ROOT; }; + 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxdebug.xcconfig; path = ../../build/osx/wxdebug.xcconfig; sourceTree = SOURCE_ROOT; }; + 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxrelease.xcconfig; path = ../../build/osx/wxrelease.xcconfig; sourceTree = SOURCE_ROOT; }; + 761D3A2B195139C500333B08 /* webview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = webview.cpp; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* webview.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = webview.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 405B1AC410EF253300676938 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 405B1AE010EF25D200676938 /* libwx_osx_cocoa_static.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 40AC73361325727300982A5C /* libwx_osx_cocoa.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* webview.app */, + 405B1ACB10EF253300676938 /* webview.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* minimal_cocoa */ = { + isa = PBXGroup; + children = ( + 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */, + 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */, + 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */, + 40735927137088070077DE1B /* Info_cocoa.plist */, + 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */, + 405B1A9710EF227D00676938 /* src */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = minimal_cocoa; + sourceTree = ""; + }; + 405B1A8510EF202100676938 /* Products */ = { + isa = PBXGroup; + children = ( + 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */, + 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */, + ); + name = Products; + sourceTree = ""; + }; + 405B1A9710EF227D00676938 /* src */ = { + isa = PBXGroup; + children = ( + 761D3A2B195139C500333B08 /* webview.cpp */, + ); + name = src; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 405B1ABF10EF253300676938 /* static */ = { + isa = PBXNativeTarget; + buildConfigurationList = 405B1AC810EF253300676938 /* Build configuration list for PBXNativeTarget "static" */; + buildPhases = ( + 405B1AC210EF253300676938 /* Sources */, + 405B1AC410EF253300676938 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + 405B1ADE10EF25B100676938 /* PBXTargetDependency */, + ); + name = static; + productInstallPath = "$(HOME)/Applications"; + productName = minimal_cocoa; + productReference = 405B1ACB10EF253300676938 /* webview.app */; + productType = "com.apple.product-type.application"; + }; + 8D1107260486CEB800E47090 /* dynamic */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dynamic" */; + buildPhases = ( + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 405B1A9410EF209B00676938 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 405B1A9110EF207D00676938 /* PBXTargetDependency */, + ); + name = dynamic; + productInstallPath = "$(HOME)/Applications"; + productName = minimal_cocoa; + productReference = 8D1107320486CEB800E47090 /* webview.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "webview" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* minimal_cocoa */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 405B1A8510EF202100676938 /* Products */; + ProjectRef = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* dynamic */, + 405B1ABF10EF253300676938 /* static */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.dylib"; + path = libwx_osx_cocoa.dylib; + remoteRef = 405B1A8910EF202100676938 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libwx_osx_cocoa_static.a; + remoteRef = 405B1A8B10EF202100676938 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXSourcesBuildPhase section */ + 405B1AC210EF253300676938 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 761D3A2C195139C500333B08 /* webview.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 405B1A9110EF207D00676938 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = dynamic; + targetProxy = 405B1A9010EF207D00676938 /* PBXContainerItemProxy */; + }; + 405B1ADE10EF25B100676938 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = static; + targetProxy = 405B1ADD10EF25B100676938 /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 405B1AC910EF253300676938 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + OTHER_LDFLAGS = "$(OTHER_LDFLAGS)"; + PRODUCT_NAME = webview; + SDKROOT = macosx10.8; + }; + name = Debug; + }; + 405B1ACA10EF253300676938 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + OTHER_LDFLAGS = "$(OTHER_LDFLAGS)"; + PRODUCT_NAME = webview; + SDKROOT = macosx10.8; + }; + name = Release; + }; + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + LIBRARY_SEARCH_PATHS = /Users/hokein/GitHub/wxWidgets/build/osx/Build/Products/Debug; + PRODUCT_NAME = webview; + SDKROOT = macosx10.8; + USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include"; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + PRODUCT_NAME = webview; + SDKROOT = macosx10.8; + USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include"; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info_cocoa.plist; + WXROOT = "$(PROJECT_DIR)/../.."; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info_cocoa.plist; + WXROOT = "$(PROJECT_DIR)/../.."; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 405B1AC810EF253300676938 /* Build configuration list for PBXNativeTarget "static" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 405B1AC910EF253300676938 /* Debug */, + 405B1ACA10EF253300676938 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "dynamic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "webview" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/samples/webview/webview.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/samples/webview/webview.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000000..6e100d9390 --- /dev/null +++ b/samples/webview/webview.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/samples/webview/webview.xcodeproj/project.xcworkspace/xcshareddata/minimal_cocoa.xccheckout b/samples/webview/webview.xcodeproj/project.xcworkspace/xcshareddata/minimal_cocoa.xccheckout new file mode 100644 index 0000000000..2f7e8b65f7 --- /dev/null +++ b/samples/webview/webview.xcodeproj/project.xcworkspace/xcshareddata/minimal_cocoa.xccheckout @@ -0,0 +1,41 @@ + + + + + IDESourceControlProjectFavoriteDictionaryKey + + IDESourceControlProjectIdentifier + 9C214785-B36D-4443-9048-A3298A20D8AE + IDESourceControlProjectName + minimal_cocoa + IDESourceControlProjectOriginsDictionary + + A8386D0A-7118-494D-BB04-FD9CA92EAA02 + https://github.com/wxWidgets/wxWidgets.git + + IDESourceControlProjectPath + samples/minimal/minimal_cocoa.xcodeproj/project.xcworkspace + IDESourceControlProjectRelativeInstallPathDictionary + + A8386D0A-7118-494D-BB04-FD9CA92EAA02 + ../../../.. + + IDESourceControlProjectURL + https://github.com/wxWidgets/wxWidgets.git + IDESourceControlProjectVersion + 110 + IDESourceControlProjectWCCIdentifier + A8386D0A-7118-494D-BB04-FD9CA92EAA02 + IDESourceControlProjectWCConfigurations + + + IDESourceControlRepositoryExtensionIdentifierKey + public.vcs.git + IDESourceControlWCCIdentifierKey + A8386D0A-7118-494D-BB04-FD9CA92EAA02 + IDESourceControlWCCName + wxWidgets + + + + diff --git a/samples/webview/webview.xcodeproj/project.xcworkspace/xcuserdata/hokein.xcuserdatad/UserInterfaceState.xcuserstate b/samples/webview/webview.xcodeproj/project.xcworkspace/xcuserdata/hokein.xcuserdatad/UserInterfaceState.xcuserstate new file mode 100644 index 0000000000000000000000000000000000000000..a4c0be7b3339336d5fc0775243e6ebc99c0f48f4 GIT binary patch literal 106744 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 (I5+ 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 h-^#3^GILjE?#f+- + + + + HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges + + SnapshotAutomaticallyBeforeSignificantChanges + + + diff --git a/samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/dynamic.xcscheme b/samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/dynamic.xcscheme new file mode 100644 index 0000000000..1177855560 --- /dev/null +++ b/samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/dynamic.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/static.xcscheme b/samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/static.xcscheme new file mode 100644 index 0000000000..bf5cdd9fd5 --- /dev/null +++ b/samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/static.xcscheme @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/xcschememanagement.plist b/samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/xcschememanagement.plist new file mode 100644 index 0000000000..c370588c27 --- /dev/null +++ b/samples/webview/webview.xcodeproj/xcuserdata/hokein.xcuserdatad/xcschemes/xcschememanagement.plist @@ -0,0 +1,32 @@ + + + + + SchemeUserState + + dynamic.xcscheme + + orderHint + 2 + + static.xcscheme + + orderHint + 3 + + + SuppressBuildableAutocreation + + 405B1ABF10EF253300676938 + + primary + + + 8D1107260486CEB800E47090 + + primary + + + + + From 5d3b9f7296d0654fbaaca917df0d85d6034236d1 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 20 Jun 2014 10:53:21 +0800 Subject: [PATCH 034/275] Use double quotes instead of angle brackets to include wx header files. --- include/wx/webview_chromium.h | 14 +++++++------- src/common/webview_chromium.cpp | 18 +++++++++--------- 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index a57a43db8f..96dadc7445 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -7,19 +7,19 @@ #ifndef _WX_WEBVIEWCHROMIUM_H_ #define _WX_WEBVIEWCHROMIUM_H_ -#include -#include -#include -#include -#include +#include "wx/control.h" +#include "wx/webview.h" +#include "wx/sharedptr.h" +#include "wx/vector.h" +#include "wx/timer.h" #ifdef __VISUALC__ #pragma warning(push) #pragma warning(disable:4100) #endif -#include -#include +#include "include/cef_browser.h" +#include "include/cef_client.h" #ifdef __VISUALC__ #pragma warning(pop) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 29b9063820..db3663f2be 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -5,13 +5,13 @@ ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" -#include -#include -#include -#include +#include "wx/webview.h" +#include "wx/webview_chromium.h" +#include "wx/filesys.h" +#include "wx/rtti.h" #ifdef __WXMSW__ -#include +#include "wx/msw/private.h" #endif #ifdef __VISUALC__ @@ -19,10 +19,10 @@ #pragma warning(disable:4100) #endif -#include -#include -#include -#include +#include "include/cef_app.h" +#include "include/cef_browser.h" +#include "include/cef_string_visitor.h" +#include "include/cef_version.h" #ifdef __VISUALC__ #pragma warning(pop) From 0753802f493423acbbada78b51732a0f69d3e4b2 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 20 Jun 2014 15:55:17 +0800 Subject: [PATCH 035/275] Cleanup: remove StartUpSubprocess() since it no longer used. --- include/wx/webview_chromium.h | 2 -- src/common/webview_chromium.cpp | 10 ---------- 2 files changed, 12 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 96dadc7445..cb98cf1f9a 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -218,8 +218,6 @@ public: int argc, char* argv[]); #endif - // If using a separate subprocess then return the result of this function - static int StartUpSubprocess(); static void Shutdown(); static void RunCEFMessageLoopOnIdle(); diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index db3663f2be..eb49f7a113 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -464,16 +464,6 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, return CefInitialize(args, settings, NULL); } -int wxWebViewChromium::StartUpSubprocess() -{ -#ifdef __WXMSW__ - CefMainArgs args(wxGetInstance()); -#else - CefMainArgs args; -#endif - return CefExecuteProcess(args, NULL); -} - void wxWebViewChromium::RunCEFMessageLoopOnIdle() { CefDoMessageLoopWork(); From 2e8b4c8aaeade556771b1cd30dd92aa45a7fe332 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 22 Jun 2014 10:26:15 +0800 Subject: [PATCH 036/275] Add launch helper for executing separate processes on mac OS X. --- .../mac/process_helper_mac.cpp | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 samples/webview_chromium/mac/process_helper_mac.cpp diff --git a/samples/webview_chromium/mac/process_helper_mac.cpp b/samples/webview_chromium/mac/process_helper_mac.cpp new file mode 100644 index 0000000000..d09469e164 --- /dev/null +++ b/samples/webview_chromium/mac/process_helper_mac.cpp @@ -0,0 +1,23 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: samples/webview_chromium/mac/process_helper_mac.cpp +// Purpose: webview_chromium launch helper +// Author: Haojian Wu +// Created: 2014-06-22 +// Copyright: (c) 2014 wxWidgets development team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "include/cef_app.h" +#include "include/cef_version.h" + +// Process entry point. +int main(int argc, char* argv[]) { + CefMainArgs main_args(argc, argv); + + // Execute the secondary process. +#if CHROME_VERSION_BUILD >= 1750 + return CefExecuteProcess(main_args, NULL, NULL); +#else + return CefExecuteProcess(main_args, NULL); +#endif +} From 08fe57b7e188fd561a2836e4d38089c3e0ab2d44 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 22 Jun 2014 16:33:29 +0800 Subject: [PATCH 037/275] Upgrade to CEF3.1750.1738. --- src/common/webview_chromium.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index eb49f7a113..36a1cbd9e5 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -91,7 +91,7 @@ bool wxWebViewChromium::Create(wxWindow* parent, CefBrowserSettings browsersettings; CefWindowInfo info; - + m_clientHandler = new ClientHandler(); m_clientHandler->SetWebView(this); @@ -446,7 +446,11 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, // If there is no subprocess then we need to execute on this process if ( path == "" ) { +#if CHROME_VERSION_BUILD >= 1750 + code = CefExecuteProcess(args, NULL, NULL); +#else code = CefExecuteProcess(args, NULL); +#endif if ( code >= 0 ) return false; } @@ -461,7 +465,11 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, //settings.multi_threaded_message_loop = true; CefString(&settings.browser_subprocess_path) = path.ToStdString(); +#if CHROME_VERSION_BUILD >= 1750 + return CefInitialize(args, settings, NULL, NULL); +#else return CefInitialize(args, settings, NULL); +#endif } void wxWebViewChromium::RunCEFMessageLoopOnIdle() From fa3bdd32a7a3536ee0973bf97bd840990f55e5e5 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 22 Jun 2014 17:14:33 +0800 Subject: [PATCH 038/275] Enable webview_chromium building through xcode on mac OS X. --- samples/webview_chromium/helper-Info.plist | 30 + samples/webview_chromium/webview.cpp | 3 + .../webview_chromium-Info.plist | 41 ++ .../project.pbxproj | 596 ++++++++++++++++++ 4 files changed, 670 insertions(+) create mode 100644 samples/webview_chromium/helper-Info.plist create mode 100644 samples/webview_chromium/webview_chromium-Info.plist create mode 100644 samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj diff --git a/samples/webview_chromium/helper-Info.plist b/samples/webview_chromium/helper-Info.plist new file mode 100644 index 0000000000..a69a2d8fb5 --- /dev/null +++ b/samples/webview_chromium/helper-Info.plist @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${EXECUTABLE_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.wxwidgets.webview_chromium.helper + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + LSFileQuarantineEnabled + + LSMinimumSystemVersion + 10.5.0 + LSUIElement + 1 + NSSupportsAutomaticGraphicsSwitching + + + diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 14c1f971d7..9f78916489 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -360,7 +360,10 @@ WebFrame::WebFrame(const wxString& url) : (new wxWebViewFactoryChromium)); m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxSize(300, 300), wxWebViewBackendChromium); +#ifndef __WXOSX__ topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1)); +#endif + //We register the wxfs:// protocol for testing purposes m_browser->RegisterHandler(wxSharedPtr(new wxWebViewArchiveHandler("wxfs"))); diff --git a/samples/webview_chromium/webview_chromium-Info.plist b/samples/webview_chromium/webview_chromium-Info.plist new file mode 100644 index 0000000000..0782319334 --- /dev/null +++ b/samples/webview_chromium/webview_chromium-Info.plist @@ -0,0 +1,41 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + $(PRODUCT_NAME) + CFBundleGetInfoString + $(PRODUCT_NAME) version 3.1.0, (c) 2005-2014 wxWidgets + CFBundleIconFile + wxmac.icns + CFBundleIdentifier + org.wxwidgets.samples.$(PRODUCT_NAME:rfc1034identifier) + CFBundleInfoDictionaryVersion + 6.0 + CFBundleLocalizations + + de + en + fr + it + + CFBundleLongVersionString + 3.1.0, (c) 2005-2014 wxWidgets + CFBundleName + $(PRODUCT_NAME) + CFBundlePackageType + APPL + CFBundleShortVersionString + 3.1.0 + CFBundleSignature + ???? + CFBundleVersion + 3.1.0 + NSHumanReadableCopyright + Copyright 2005-2014 wxWidgets + NSPrincipalClass + wxNSApplication + + diff --git a/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj b/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj new file mode 100644 index 0000000000..72759cea4e --- /dev/null +++ b/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj @@ -0,0 +1,596 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 405B1AE010EF25D200676938 /* libwx_osx_cocoa_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */; }; + 40AC73361325727300982A5C /* libwx_osx_cocoa.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */; }; + 40AC73371325728400982A5C /* libwx_osx_cocoa.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */; }; + 769F79321953E1DD00ED92BF /* Chromium Embedded Framework.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; + 769F79331953E1E600ED92BF /* webview_chromium Helper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */; }; + 769F79351953E46500ED92BF /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 769F79341953E46500ED92BF /* AppKit.framework */; }; + 769F79361953E47100ED92BF /* Chromium Embedded Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; + 769F79371953E48400ED92BF /* libcef_dll_wrapper.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */; }; + 76DA77E21953DF3400E1DD9D /* process_helper_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76DA77E11953DF3400E1DD9D /* process_helper_mac.cpp */; }; + 76DA77E41953DF4B00E1DD9D /* webview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76DA77E31953DF4B00E1DD9D /* webview.cpp */; }; + 76DA77E51953DF4B00E1DD9D /* webview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76DA77E31953DF4B00E1DD9D /* webview.cpp */; }; + 76DA77E71953DF9800E1DD9D /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77E61953DF9800E1DD9D /* AppKit.framework */; }; + 76DA77E91953DFB200E1DD9D /* libcef_dll_wrapper.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */; }; + 76DA77EB1953DFD200E1DD9D /* Chromium Embedded Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; +/* End PBXBuildFile section */ + +/* Begin PBXContainerItemProxy section */ + 405B1A8910EF202100676938 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = D2AAC0C705546C1D00DB518D; + remoteInfo = dynamic; + }; + 405B1A8B10EF202100676938 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + proxyType = 2; + remoteGlobalIDString = 404BEE6110EC83280080E2B8; + remoteInfo = static; + }; + 405B1A9010EF207D00676938 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = 363401F972C53D8EBD3D4BD9; + remoteInfo = dynamic; + }; + 405B1ADD10EF25B100676938 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + proxyType = 1; + remoteGlobalIDString = BAB02EC06578349A9171CCAC; + remoteInfo = static; + }; + 769F792F1953E18700ED92BF /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 76DA77D61953DE8200E1DD9D; + remoteInfo = webview_helper_static; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 405B1A9410EF209B00676938 /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 40AC73371325728400982A5C /* libwx_osx_cocoa.dylib in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 769F79311953E1C700ED92BF /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 769F79331953E1E600ED92BF /* webview_chromium Helper.app in CopyFiles */, + 769F79321953E1DD00ED92BF /* Chromium Embedded Framework.framework in CopyFiles */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXCopyFilesBuildPhase section */ + +/* Begin PBXFileReference section */ + 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = wxcocoa.xcodeproj; path = ../../build/osx/wxcocoa.xcodeproj; sourceTree = SOURCE_ROOT; }; + 405B1ACB10EF253300676938 /* webview_chromium.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = webview_chromium.app; sourceTree = BUILT_PRODUCTS_DIR; }; + 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxcocoa.xcconfig; path = ../../build/osx/wxcocoa.xcconfig; sourceTree = SOURCE_ROOT; }; + 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxdebug.xcconfig; path = ../../build/osx/wxdebug.xcconfig; sourceTree = SOURCE_ROOT; }; + 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxrelease.xcconfig; path = ../../build/osx/wxrelease.xcconfig; sourceTree = SOURCE_ROOT; }; + 769F79341953E46500ED92BF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; + 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "webview_chromium Helper.app"; sourceTree = BUILT_PRODUCTS_DIR; }; + 76DA77E11953DF3400E1DD9D /* process_helper_mac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = process_helper_mac.cpp; path = mac/process_helper_mac.cpp; sourceTree = ""; }; + 76DA77E31953DF4B00E1DD9D /* webview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = webview.cpp; sourceTree = ""; }; + 76DA77E61953DF9800E1DD9D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; }; + 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcef_dll_wrapper.a; path = ../../cef/xcodebuild/Debug/libcef_dll_wrapper.a; sourceTree = ""; }; + 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "Chromium Embedded Framework.framework"; path = "../../cef/Release/Chromium Embedded Framework.framework"; sourceTree = ""; }; + 8D1107320486CEB800E47090 /* webview_chromium.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = webview_chromium.app; sourceTree = BUILT_PRODUCTS_DIR; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 405B1AC410EF253300676938 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 769F79371953E48400ED92BF /* libcef_dll_wrapper.a in Frameworks */, + 769F79361953E47100ED92BF /* Chromium Embedded Framework.framework in Frameworks */, + 769F79351953E46500ED92BF /* AppKit.framework in Frameworks */, + 405B1AE010EF25D200676938 /* libwx_osx_cocoa_static.a in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 76DA77DA1953DE8200E1DD9D /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 76DA77EB1953DFD200E1DD9D /* Chromium Embedded Framework.framework in Frameworks */, + 76DA77E91953DFB200E1DD9D /* libcef_dll_wrapper.a in Frameworks */, + 76DA77E71953DF9800E1DD9D /* AppKit.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 40AC73361325727300982A5C /* libwx_osx_cocoa.dylib in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + 8D1107320486CEB800E47090 /* webview_chromium.app */, + 405B1ACB10EF253300676938 /* webview_chromium.app */, + 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* minimal_cocoa */ = { + isa = PBXGroup; + children = ( + 769F79341953E46500ED92BF /* AppKit.framework */, + 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */, + 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */, + 76DA77E61953DF9800E1DD9D /* AppKit.framework */, + 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */, + 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */, + 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */, + 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */, + 405B1A9710EF227D00676938 /* src */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = minimal_cocoa; + sourceTree = ""; + }; + 405B1A8510EF202100676938 /* Products */ = { + isa = PBXGroup; + children = ( + 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */, + 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */, + ); + name = Products; + sourceTree = ""; + }; + 405B1A9710EF227D00676938 /* src */ = { + isa = PBXGroup; + children = ( + 76DA77E31953DF4B00E1DD9D /* webview.cpp */, + 76DA77E11953DF3400E1DD9D /* process_helper_mac.cpp */, + ); + name = src; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 405B1ABF10EF253300676938 /* webview_chromium_static */ = { + isa = PBXNativeTarget; + buildConfigurationList = 405B1AC810EF253300676938 /* Build configuration list for PBXNativeTarget "webview_chromium_static" */; + buildPhases = ( + 405B1AC210EF253300676938 /* Sources */, + 405B1AC410EF253300676938 /* Frameworks */, + 769F79311953E1C700ED92BF /* CopyFiles */, + 769F79381953E49E00ED92BF /* Fix CEF Link */, + 769F79391953E4C800ED92BF /* Make More Helper */, + 769F793A1953E51600ED92BF /* Match-O flags */, + ); + buildRules = ( + ); + dependencies = ( + 769F79301953E18700ED92BF /* PBXTargetDependency */, + 405B1ADE10EF25B100676938 /* PBXTargetDependency */, + ); + name = webview_chromium_static; + productInstallPath = "$(HOME)/Applications"; + productName = minimal_cocoa; + productReference = 405B1ACB10EF253300676938 /* webview_chromium.app */; + productType = "com.apple.product-type.application"; + }; + 76DA77D61953DE8200E1DD9D /* webview_helper_static */ = { + isa = PBXNativeTarget; + buildConfigurationList = 76DA77DC1953DE8200E1DD9D /* Build configuration list for PBXNativeTarget "webview_helper_static" */; + buildPhases = ( + 76DA77D91953DE8200E1DD9D /* Sources */, + 76DA77DA1953DE8200E1DD9D /* Frameworks */, + 76DA77EC1953DFEB00E1DD9D /* Fix CEF Link */, + 76DA77ED1953E02500E1DD9D /* Change Mach-O Flags */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = webview_helper_static; + productInstallPath = "$(HOME)/Applications"; + productName = minimal_cocoa; + productReference = 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */; + productType = "com.apple.product-type.application"; + }; + 8D1107260486CEB800E47090 /* webview_chromium_dynamic */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "webview_chromium_dynamic" */; + buildPhases = ( + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 405B1A9410EF209B00676938 /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 405B1A9110EF207D00676938 /* PBXTargetDependency */, + ); + name = webview_chromium_dynamic; + productInstallPath = "$(HOME)/Applications"; + productName = minimal_cocoa; + productReference = 8D1107320486CEB800E47090 /* webview_chromium.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + attributes = { + }; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "webview_chromium" */; + compatibilityVersion = "Xcode 3.1"; + developmentRegion = English; + hasScannedForEncodings = 1; + knownRegions = ( + English, + Japanese, + French, + German, + ); + mainGroup = 29B97314FDCFA39411CA2CEA /* minimal_cocoa */; + projectDirPath = ""; + projectReferences = ( + { + ProductGroup = 405B1A8510EF202100676938 /* Products */; + ProjectRef = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; + }, + ); + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* webview_chromium_dynamic */, + 405B1ABF10EF253300676938 /* webview_chromium_static */, + 76DA77D61953DE8200E1DD9D /* webview_helper_static */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXReferenceProxy section */ + 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */ = { + isa = PBXReferenceProxy; + fileType = "compiled.mach-o.dylib"; + path = libwx_osx_cocoa.dylib; + remoteRef = 405B1A8910EF202100676938 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; + 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */ = { + isa = PBXReferenceProxy; + fileType = archive.ar; + path = libwx_osx_cocoa_static.a; + remoteRef = 405B1A8B10EF202100676938 /* PBXContainerItemProxy */; + sourceTree = BUILT_PRODUCTS_DIR; + }; +/* End PBXReferenceProxy section */ + +/* Begin PBXShellScriptBuildPhase section */ + 769F79381953E49E00ED92BF /* Fix CEF Link */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", + ); + name = "Fix CEF Link"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "exec install_name_tool -change \"@executable_path/Chromium Embedded Framework\" \"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework\" \"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}\"\nexit 1"; + showEnvVarsInLog = 0; + }; + 769F79391953E4C800ED92BF /* Make More Helper */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", + ); + name = "Make More Helper"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "exec ../../cef/tools/make_more_helpers.sh Frameworks webview_chromium\nexit 1\n"; + showEnvVarsInLog = 0; + }; + 769F793A1953E51600ED92BF /* Match-O flags */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", + ); + name = "Match-O flags"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "exec ../../cef/tools/change_mach_o_flags_from_xcode.sh\nexit 1\n"; + showEnvVarsInLog = 0; + }; + 76DA77EC1953DFEB00E1DD9D /* Fix CEF Link */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", + ); + name = "Fix CEF Link"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "exec install_name_tool -change \"@executable_path/Chromium Embedded Framework\" \"@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework\" \"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}\"\nexit 1\n"; + showEnvVarsInLog = 0; + }; + 76DA77ED1953E02500E1DD9D /* Change Mach-O Flags */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", + ); + name = "Change Mach-O Flags"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "exec ../../cef/tools/change_mach_o_flags_from_xcode.sh\nexit 1\n"; + showEnvVarsInLog = 0; + }; +/* End PBXShellScriptBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 405B1AC210EF253300676938 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 76DA77E51953DF4B00E1DD9D /* webview.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 76DA77D91953DE8200E1DD9D /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 76DA77E21953DF3400E1DD9D /* process_helper_mac.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 76DA77E41953DF4B00E1DD9D /* webview.cpp in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 405B1A9110EF207D00676938 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = dynamic; + targetProxy = 405B1A9010EF207D00676938 /* PBXContainerItemProxy */; + }; + 405B1ADE10EF25B100676938 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = static; + targetProxy = 405B1ADD10EF25B100676938 /* PBXContainerItemProxy */; + }; + 769F79301953E18700ED92BF /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 76DA77D61953DE8200E1DD9D /* webview_helper_static */; + targetProxy = 769F792F1953E18700ED92BF /* PBXContainerItemProxy */; + }; +/* End PBXTargetDependency section */ + +/* Begin XCBuildConfiguration section */ + 405B1AC910EF253300676938 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/Release\"", + ); + INFOPLIST_FILE = "webview_chromium-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/xcodebuild/Debug\"", + ); + OTHER_LDFLAGS = ( + "$(OTHER_LDFLAGS)", + "-Wl,-pie", + ); + PRODUCT_NAME = webview_chromium; + USER_HEADER_SEARCH_PATHS = "\"$(WXROOT)/include\" \"$(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include\" \"$(WXROOT)/src/zlib\" \"$(WXROOT)/src/jpeg\" \"$(WXROOT)/src/png\" \"$(WXROOT)/src/regex\" \"$(WXROOT)/src/expat/lib\" \"$(WXROOT)/src/tiff/libtiff\" \"$(WXROOT)/src/stc/scintilla/src\" \"$(WXROOT)/src/stc/scintilla/include\" \"$(WXROOT)/src/stc/scintilla/lexlib\" \"$(WXROOT)/cef\""; + }; + name = Debug; + }; + 405B1ACA10EF253300676938 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/Release\"", + ); + INFOPLIST_FILE = "webview_chromium-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/xcodebuild/Release\"", + ); + OTHER_LDFLAGS = ( + "$(OTHER_LDFLAGS)", + "-Wl,-pie", + ); + PRODUCT_NAME = webview_chromium; + USER_HEADER_SEARCH_PATHS = "\"$(WXROOT)/include\" \"$(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include\" \"$(WXROOT)/src/zlib\" \"$(WXROOT)/src/jpeg\" \"$(WXROOT)/src/png\" \"$(WXROOT)/src/regex\" \"$(WXROOT)/src/expat/lib\" \"$(WXROOT)/src/tiff/libtiff\" \"$(WXROOT)/src/stc/scintilla/src\" \"$(WXROOT)/src/stc/scintilla/include\" \"$(WXROOT)/src/stc/scintilla/lexlib\" \"$(WXROOT)/cef\""; + }; + name = Release; + }; + 76DA77DD1953DE8200E1DD9D /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/Debug\"", + ); + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_PREPROCESSOR_DEFINITIONS = ""; + INFOPLIST_FILE = "helper-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/xcodebuild/Debug\"", + ); + OTHER_LDFLAGS = "-Wl,-pie"; + PRODUCT_NAME = "webview_chromium Helper"; + SDKROOT = macosx10.8; + USER_HEADER_SEARCH_PATHS = "\"$(WXROOT)/cef\""; + }; + name = Debug; + }; + 76DA77DE1953DE8200E1DD9D /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/Release\"", + ); + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_PREPROCESSOR_DEFINITIONS = ""; + INFOPLIST_FILE = "helper-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/xcodebuild/Release\"", + ); + OTHER_LDFLAGS = "-Wl,-pie"; + PRODUCT_NAME = "webview_chromium Helper"; + SDKROOT = macosx10.8; + USER_HEADER_SEARCH_PATHS = "\"$(WXROOT)/cef\""; + }; + name = Release; + }; + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + LIBRARY_SEARCH_PATHS = /Users/hokein/GitHub/wxWidgets/build/osx/Build/Products/Debug; + PRODUCT_NAME = webview_chromium; + USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include"; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = YES; + PRODUCT_NAME = webview_chromium; + USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include"; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info_cocoa.plist; + WXROOT = "$(PROJECT_DIR)/../.."; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */; + buildSettings = { + INFOPLIST_FILE = Info_cocoa.plist; + WXROOT = "$(PROJECT_DIR)/../.."; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 405B1AC810EF253300676938 /* Build configuration list for PBXNativeTarget "webview_chromium_static" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 405B1AC910EF253300676938 /* Debug */, + 405B1ACA10EF253300676938 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 76DA77DC1953DE8200E1DD9D /* Build configuration list for PBXNativeTarget "webview_helper_static" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 76DA77DD1953DE8200E1DD9D /* Debug */, + 76DA77DE1953DE8200E1DD9D /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "webview_chromium_dynamic" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "webview_chromium" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} From c28405c292702778838e6d54cb7d0f80e2f2ff91 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 22 Jun 2014 17:22:48 +0800 Subject: [PATCH 039/275] [Mac] Host cef browser window to wxwidgets windows. --- src/common/webview_chromium.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 36a1cbd9e5..33bf0ef4e9 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -84,6 +84,10 @@ bool wxWebViewChromium::Create(wxWindow* parent, } #endif +#ifdef __WXOSX__ + wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name); +#endif + m_historyLoadingFromList = false; m_historyEnabled = true; m_historyPosition = -1; @@ -116,6 +120,10 @@ bool wxWebViewChromium::Create(wxWindow* parent, gtk_widget_show( view_port ); #endif +#ifdef __WXOSX__ + info.SetAsChild(parent->GetHandle(), 0, 0, parent->GetSize().GetX(), parent->GetSize().GetY()); +#endif + #if CHROME_VERSION_BUILD >= 1650 CefBrowserHost::CreateBrowser(info, static_cast >(m_clientHandler), url.ToStdString(), browsersettings, NULL); From 40d7a6944cf49b3cfef77c4bed351f4477d6c234 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 23 Jun 2014 19:23:38 +0800 Subject: [PATCH 040/275] [Mac] Enable webview_chromium dynamic builds. --- .../project.pbxproj | 133 +++++++++++++++++- 1 file changed, 130 insertions(+), 3 deletions(-) diff --git a/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj b/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj index 72759cea4e..5f030c687b 100644 --- a/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj +++ b/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj @@ -10,6 +10,10 @@ 405B1AE010EF25D200676938 /* libwx_osx_cocoa_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */; }; 40AC73361325727300982A5C /* libwx_osx_cocoa.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */; }; 40AC73371325728400982A5C /* libwx_osx_cocoa.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */; }; + 763672BB19583E83002CC711 /* Chromium Embedded Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; + 763672BC19583EA3002CC711 /* libcef_dll_wrapper.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */; }; + 763672BD19583EC1002CC711 /* webview_chromium Helper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */; }; + 763672BE19583ECF002CC711 /* Chromium Embedded Framework.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; 769F79321953E1DD00ED92BF /* Chromium Embedded Framework.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; 769F79331953E1E600ED92BF /* webview_chromium Helper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */; }; 769F79351953E46500ED92BF /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 769F79341953E46500ED92BF /* AppKit.framework */; }; @@ -52,6 +56,13 @@ remoteGlobalIDString = BAB02EC06578349A9171CCAC; remoteInfo = static; }; + 763672B919583DFB002CC711 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 405B1ABF10EF253300676938; + remoteInfo = webview_chromium_static; + }; 769F792F1953E18700ED92BF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; @@ -68,6 +79,8 @@ dstPath = ""; dstSubfolderSpec = 10; files = ( + 763672BE19583ECF002CC711 /* Chromium Embedded Framework.framework in CopyFiles */, + 763672BD19583EC1002CC711 /* webview_chromium Helper.app in CopyFiles */, 40AC73371325728400982A5C /* libwx_osx_cocoa.dylib in CopyFiles */, ); runOnlyForDeploymentPostprocessing = 0; @@ -91,6 +104,7 @@ 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxcocoa.xcconfig; path = ../../build/osx/wxcocoa.xcconfig; sourceTree = SOURCE_ROOT; }; 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxdebug.xcconfig; path = ../../build/osx/wxdebug.xcconfig; sourceTree = SOURCE_ROOT; }; 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxrelease.xcconfig; path = ../../build/osx/wxrelease.xcconfig; sourceTree = SOURCE_ROOT; }; + 763672B819583DBA002CC711 /* webview_helper_static copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "webview_helper_static copy-Info.plist"; path = "/Users/hokein/GitHub/wxWidgets/samples/webview_chromium/webview_helper_static copy-Info.plist"; sourceTree = ""; }; 769F79341953E46500ED92BF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "webview_chromium Helper.app"; sourceTree = BUILT_PRODUCTS_DIR; }; 76DA77E11953DF3400E1DD9D /* process_helper_mac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = process_helper_mac.cpp; path = mac/process_helper_mac.cpp; sourceTree = ""; }; @@ -127,6 +141,8 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( + 763672BC19583EA3002CC711 /* libcef_dll_wrapper.a in Frameworks */, + 763672BB19583E83002CC711 /* Chromium Embedded Framework.framework in Frameworks */, 40AC73361325727300982A5C /* libwx_osx_cocoa.dylib in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; @@ -157,6 +173,7 @@ 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */, 405B1A9710EF227D00676938 /* src */, 19C28FACFE9D520D11CA2CBB /* Products */, + 763672B819583DBA002CC711 /* webview_helper_static copy-Info.plist */, ); name = minimal_cocoa; sourceTree = ""; @@ -231,10 +248,14 @@ 8D11072C0486CEB800E47090 /* Sources */, 8D11072E0486CEB800E47090 /* Frameworks */, 405B1A9410EF209B00676938 /* CopyFiles */, + 763672BF19583EE0002CC711 /* Fix CEF link */, + 763672C019583F07002CC711 /* Make more helpers */, + 763672C119583F40002CC711 /* Change match-o type */, ); buildRules = ( ); dependencies = ( + 763672BA19583DFB002CC711 /* PBXTargetDependency */, 405B1A9110EF207D00676938 /* PBXTargetDependency */, ); name = webview_chromium_dynamic; @@ -295,6 +316,54 @@ /* End PBXReferenceProxy section */ /* Begin PBXShellScriptBuildPhase section */ + 763672BF19583EE0002CC711 /* Fix CEF link */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", + ); + name = "Fix CEF link"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "exec install_name_tool -change \"@executable_path/Chromium Embedded Framework\" \"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework\" \"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}\"\nexit 1"; + showEnvVarsInLog = 0; + }; + 763672C019583F07002CC711 /* Make more helpers */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", + ); + name = "Make more helpers"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "exec ../../cef/tools/make_more_helpers.sh Frameworks webview_chromium\nexit 1"; + showEnvVarsInLog = 0; + }; + 763672C119583F40002CC711 /* Change match-o type */ = { + isa = PBXShellScriptBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + inputPaths = ( + "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", + ); + name = "Change match-o type"; + outputPaths = ( + ); + runOnlyForDeploymentPostprocessing = 0; + shellPath = /bin/sh; + shellScript = "exec ../../cef/tools/change_mach_o_flags_from_xcode.sh\nexit 1\n"; + showEnvVarsInLog = 0; + }; 769F79381953E49E00ED92BF /* Fix CEF Link */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; @@ -415,6 +484,11 @@ name = static; targetProxy = 405B1ADD10EF25B100676938 /* PBXContainerItemProxy */; }; + 763672BA19583DFB002CC711 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 405B1ABF10EF253300676938 /* webview_chromium_static */; + targetProxy = 763672B919583DFB002CC711 /* PBXContainerItemProxy */; + }; 769F79301953E18700ED92BF /* PBXTargetDependency */ = { isa = PBXTargetDependency; target = 76DA77D61953DE8200E1DD9D /* webview_helper_static */; @@ -517,9 +591,35 @@ isa = XCBuildConfiguration; baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; buildSettings = { - LIBRARY_SEARCH_PATHS = /Users/hokein/GitHub/wxWidgets/build/osx/Build/Products/Debug; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/Release\"", + ); + INFOPLIST_FILE = "webview_chromium-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + /Users/hokein/GitHub/wxWidgets/build/osx/Build/Products/Debug, + /Users/hokein/GitHub/wxWidgets/cef/xcodebuild/Debug, + ); + OTHER_LDFLAGS = ( + "-framework", + WebKit, + "-framework", + IOKit, + "-framework", + Carbon, + "-framework", + Cocoa, + "-framework", + AudioToolbox, + "-framework", + OpenGL, + "-framework", + QTKit, + "-Wl,-pie", + ); PRODUCT_NAME = webview_chromium; - USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include"; + SDKROOT = macosx10.8; + USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include \"$(WXROOT)/cef/\""; }; name = Debug; }; @@ -528,8 +628,35 @@ baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; buildSettings = { ALWAYS_SEARCH_USER_PATHS = YES; + FRAMEWORK_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/Release\"", + ); + INFOPLIST_FILE = "webview_chromium-Info.plist"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(WXROOT)/cef/xcodebuild/Release\"", + ); + OTHER_LDFLAGS = ( + "-framework", + WebKit, + "-framework", + IOKit, + "-framework", + Carbon, + "-framework", + Cocoa, + "-framework", + AudioToolbox, + "-framework", + OpenGL, + "-framework", + QTKit, + "-Wl,-pie", + ); PRODUCT_NAME = webview_chromium; - USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include"; + SDKROOT = macosx10.8; + USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include \"$(WXROOT)/cef/\""; }; name = Release; }; From 7d10794927fb5c60db0f45f189ce08e2450c121f Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 23 Jun 2014 19:29:21 +0800 Subject: [PATCH 041/275] [Mac] Rename webview_chromium helper to xcode project. --- .../webview_chromium.xcodeproj/project.pbxproj | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj b/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj index 5f030c687b..79ccc5ec93 100644 --- a/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj +++ b/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj @@ -222,9 +222,9 @@ productReference = 405B1ACB10EF253300676938 /* webview_chromium.app */; productType = "com.apple.product-type.application"; }; - 76DA77D61953DE8200E1DD9D /* webview_helper_static */ = { + 76DA77D61953DE8200E1DD9D /* webview_helper */ = { isa = PBXNativeTarget; - buildConfigurationList = 76DA77DC1953DE8200E1DD9D /* Build configuration list for PBXNativeTarget "webview_helper_static" */; + buildConfigurationList = 76DA77DC1953DE8200E1DD9D /* Build configuration list for PBXNativeTarget "webview_helper" */; buildPhases = ( 76DA77D91953DE8200E1DD9D /* Sources */, 76DA77DA1953DE8200E1DD9D /* Frameworks */, @@ -235,7 +235,7 @@ ); dependencies = ( ); - name = webview_helper_static; + name = webview_helper; productInstallPath = "$(HOME)/Applications"; productName = minimal_cocoa; productReference = 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */; @@ -293,7 +293,7 @@ targets = ( 8D1107260486CEB800E47090 /* webview_chromium_dynamic */, 405B1ABF10EF253300676938 /* webview_chromium_static */, - 76DA77D61953DE8200E1DD9D /* webview_helper_static */, + 76DA77D61953DE8200E1DD9D /* webview_helper */, ); }; /* End PBXProject section */ @@ -491,7 +491,7 @@ }; 769F79301953E18700ED92BF /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 76DA77D61953DE8200E1DD9D /* webview_helper_static */; + target = 76DA77D61953DE8200E1DD9D /* webview_helper */; targetProxy = 769F792F1953E18700ED92BF /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ @@ -690,7 +690,7 @@ defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 76DA77DC1953DE8200E1DD9D /* Build configuration list for PBXNativeTarget "webview_helper_static" */ = { + 76DA77DC1953DE8200E1DD9D /* Build configuration list for PBXNativeTarget "webview_helper" */ = { isa = XCConfigurationList; buildConfigurations = ( 76DA77DD1953DE8200E1DD9D /* Debug */, From 053209acaf6329c874b0fd2221d2b3a4232b2594 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 23 Jun 2014 19:31:37 +0800 Subject: [PATCH 042/275] [Mac] Correct dynamic dependent project. --- .../webview_chromium.xcodeproj/project.pbxproj | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj b/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj index 79ccc5ec93..9065156a1a 100644 --- a/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj +++ b/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj @@ -56,12 +56,12 @@ remoteGlobalIDString = BAB02EC06578349A9171CCAC; remoteInfo = static; }; - 763672B919583DFB002CC711 /* PBXContainerItemProxy */ = { + 763672C219584758002CC711 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; proxyType = 1; - remoteGlobalIDString = 405B1ABF10EF253300676938; - remoteInfo = webview_chromium_static; + remoteGlobalIDString = 76DA77D61953DE8200E1DD9D; + remoteInfo = webview_helper; }; 769F792F1953E18700ED92BF /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; @@ -255,7 +255,7 @@ buildRules = ( ); dependencies = ( - 763672BA19583DFB002CC711 /* PBXTargetDependency */, + 763672C319584758002CC711 /* PBXTargetDependency */, 405B1A9110EF207D00676938 /* PBXTargetDependency */, ); name = webview_chromium_dynamic; @@ -484,10 +484,10 @@ name = static; targetProxy = 405B1ADD10EF25B100676938 /* PBXContainerItemProxy */; }; - 763672BA19583DFB002CC711 /* PBXTargetDependency */ = { + 763672C319584758002CC711 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - target = 405B1ABF10EF253300676938 /* webview_chromium_static */; - targetProxy = 763672B919583DFB002CC711 /* PBXContainerItemProxy */; + target = 76DA77D61953DE8200E1DD9D /* webview_helper */; + targetProxy = 763672C219584758002CC711 /* PBXContainerItemProxy */; }; 769F79301953E18700ED92BF /* PBXTargetDependency */ = { isa = PBXTargetDependency; From 5ba2b8692f8eaf7d61d17b1e3edb80997f879891 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 25 Jun 2014 11:20:31 +0800 Subject: [PATCH 043/275] [Mac] Fix find bar is overrided by webview window issue. --- samples/webview_chromium/webview.cpp | 2 -- src/common/webview_chromium.cpp | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 9f78916489..6982d163bb 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -360,9 +360,7 @@ WebFrame::WebFrame(const wxString& url) : (new wxWebViewFactoryChromium)); m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxSize(300, 300), wxWebViewBackendChromium); -#ifndef __WXOSX__ topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1)); -#endif //We register the wxfs:// protocol for testing purposes diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 33bf0ef4e9..85a658a27e 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -121,7 +121,7 @@ bool wxWebViewChromium::Create(wxWindow* parent, #endif #ifdef __WXOSX__ - info.SetAsChild(parent->GetHandle(), 0, 0, parent->GetSize().GetX(), parent->GetSize().GetY()); + info.SetAsChild( GetHandle(), 0, 0, size.GetX(), size.GetY() ); #endif #if CHROME_VERSION_BUILD >= 1650 From 8138f09683d848fde8396ca808cce17f2a011fb7 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 25 Jun 2014 11:26:35 +0800 Subject: [PATCH 044/275] [Mac] Resize browser window. --- samples/webview_chromium/webview.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 6982d163bb..0c185caed7 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -359,7 +359,7 @@ WebFrame::WebFrame(const wxString& url) : wxWebView::RegisterFactory(wxWebViewBackendChromium, wxSharedPtr (new wxWebViewFactoryChromium)); - m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxSize(300, 300), wxWebViewBackendChromium); + m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxSize(800, 525), wxWebViewBackendChromium); topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1)); From dbf0e9721af5b5f86e9c5222a24298695a84623e Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 26 Jun 2014 20:09:13 +0800 Subject: [PATCH 045/275] Fix a crash issue when close wxwebview_chromium sample. On Mac OS X, it will trigger a crash issue when user close the window (It also appear in other platforms, but the crash doesn't appear.) The crash is caused by calling `CefShutdown` in wxApp::OnExit(). When wx application running in wxApp::OnExit function, the webframe has been deleted, we need to call `CefShutdown` in webframe `Close` period. --- samples/webview_chromium/webview.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 0c185caed7..9fb61abb49 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -150,7 +150,7 @@ public: void OnFindText(wxCommandEvent& evt); void OnFindOptions(wxCommandEvent& evt); void OnEnableContextMenu(wxCommandEvent& evt); - + void OnClose(wxCloseEvent& evt); private: wxTextCtrl* m_url; @@ -206,6 +206,8 @@ private: wxMenuHistoryMap m_histMenuItems; wxString m_findText; int m_findFlags, m_findCount; + + DECLARE_EVENT_TABLE() }; class SourceViewDialog : public wxDialog @@ -264,7 +266,6 @@ bool WebApp::OnInit() int WebApp::OnExit() { - wxWebViewChromium::Shutdown(); return wxApp::OnExit(); } @@ -1091,3 +1092,13 @@ SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) : sizer->Add(text, 1, wxEXPAND); SetSizer(sizer); } + +BEGIN_EVENT_TABLE(WebFrame, wxFrame) + EVT_CLOSE(WebFrame::OnClose) +END_EVENT_TABLE() + +void WebFrame::OnClose(wxCloseEvent &evt) +{ + wxWebViewChromium::Shutdown(); + Destroy(); +} From 5ad175f36b09b677586e3ed3b292861204c3d4f5 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 26 Jun 2014 20:17:08 +0800 Subject: [PATCH 046/275] Remove unnecessary code. --- samples/webview_chromium/webview.cpp | 6 ------ 1 file changed, 6 deletions(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 9fb61abb49..be28c73782 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -71,7 +71,6 @@ public: } virtual bool OnInit(); - virtual int OnExit(); virtual bool ProcessIdle(); /* @@ -264,11 +263,6 @@ bool WebApp::OnInit() return true; } -int WebApp::OnExit() -{ - return wxApp::OnExit(); -} - bool WebApp::ProcessIdle() { wxWebViewChromium::RunCEFMessageLoopOnIdle(); return wxApp::ProcessIdle(); From b14ba23f7d8b9d61538df605acae8ccdd0068eef Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 30 Jun 2014 16:58:40 +0800 Subject: [PATCH 047/275] [Win] Add VS2010 wxWebviewChromium sample static build supports. --- .../webview_chromium_vc10.vcxproj | 269 ++++++++++++++++++ 1 file changed, 269 insertions(+) create mode 100644 samples/webview_chromium/webview_chromium_vc10.vcxproj diff --git a/samples/webview_chromium/webview_chromium_vc10.vcxproj b/samples/webview_chromium/webview_chromium_vc10.vcxproj new file mode 100644 index 0000000000..6b70ec5add --- /dev/null +++ b/samples/webview_chromium/webview_chromium_vc10.vcxproj @@ -0,0 +1,269 @@ + + + + + Debug + Win32 + + + DLL Debug + Win32 + + + DLL Release + Win32 + + + Release + Win32 + + + + webview_chromium + {7688215B-1082-5681-9D37-E950D6210117} + + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + Application + false + Unicode + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + vc_mswud\ + vc_mswud\webview_chromium\ + true + true + vc_mswu\ + vc_mswu\webview_chromium\ + false + true + vc_mswuddll\ + vc_mswuddll\webview_chromium\ + true + true + vc_mswudll\ + vc_mswudll\webview_chromium\ + false + true + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + .\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + vc_mswud\webview_chromium\ + vc_mswud\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxmsw31ud_webview.lib;wxmsw31ud_stc.lib;wxmsw31ud_adv.lib;wxmsw31ud_core.lib;wxbase31ud.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintillad.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswud\webview_chromium.exe + true + .\..\..\lib\vc_lib;.\..\..\\cef\Debug\;.\..\..\\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) + true + vc_mswud\webview_chromium.pdb + Windows + MachineX86 + + + vc_mswud\webview_chromium_vc9.bsc + true + + + + + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + vc_mswu\webview_chromium\ + vc_mswu\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + + + wxmsw31u_webview.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswu\webview_chromium.exe + true + .\..\..\lib\vc_lib;.\..\..\\cef\Release\;.\..\..\\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + true + vc_mswu\webview_chromium.pdb + Windows + MachineX86 + true + true + + + vc_mswu\webview_chromium_vc9.bsc + true + + + + + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + vc_mswuddll\webview_chromium\ + vc_mswuddll\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxmsw31ud_webview.lib;wxmsw31ud_stc.lib;wxmsw31ud_adv.lib;wxmsw31ud_core.lib;wxbase31ud.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintillad.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswuddll\webview_chromium.exe + true + .\..\..\lib\vc_dll;.\..\..\\cef\Debug\;.\..\..\\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) + true + vc_mswuddll\webview_chromium.pdb + Windows + MachineX86 + + + vc_mswuddll\webview_chromium_vc9.bsc + true + + + + + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + vc_mswudll\webview_chromium\ + vc_mswudll\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxmsw31u_webview.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswudll\webview_chromium.exe + true + .\..\..\lib\vc_dll;.\..\..\\cef\Release\;.\..\..\\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + true + vc_mswudll\webview_chromium.pdb + Windows + MachineX86 + true + true + + + vc_mswudll\webview_chromium_vc9.bsc + true + + + + + + + + + + + + \ No newline at end of file From 57428e5102971596eda4b9485e93725034356139 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 30 Jun 2014 17:29:24 +0800 Subject: [PATCH 048/275] [Win] Add VS2010 wxWebviewChromium sample dynamic build supports. --- samples/webview_chromium/webview_chromium_vc10.vcxproj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/webview_chromium/webview_chromium_vc10.vcxproj b/samples/webview_chromium/webview_chromium_vc10.vcxproj index 6b70ec5add..6ecefcdfe0 100644 --- a/samples/webview_chromium/webview_chromium_vc10.vcxproj +++ b/samples/webview_chromium/webview_chromium_vc10.vcxproj @@ -181,7 +181,7 @@ /MP %(AdditionalOptions) Disabled - .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\cef;%(AdditionalIncludeDirectories) WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) Sync EnableFastChecks @@ -223,7 +223,7 @@ /MP %(AdditionalOptions) MaxSpeed - .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\\cef;%(AdditionalIncludeDirectories) + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\cef;%(AdditionalIncludeDirectories) WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) Sync MultiThreadedDLL From 42b52af841df9103706f62a331b5b56d0864390d Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 30 Jun 2014 21:54:57 -0700 Subject: [PATCH 049/275] Disable sandbox in CEF3.1750.1738. --- src/common/webview_chromium.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 85a658a27e..30c99afbc5 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -464,6 +464,10 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, } CefSettings settings; +#if CHROME_VERSION_BUILD >= 1750 + settings.no_sandbox = true; +#endif + #ifdef __WXDEBUG__ settings.log_severity = LOGSEVERITY_INFO; CefString(&settings.log_file).FromASCII("./debug.log"); From 8e6b115a1b6b7e9251b8d2b60cd4aaf567873480 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 1 Jul 2014 15:33:16 +0800 Subject: [PATCH 050/275] Use Connect method instead of EVENT_TABLE to hook WebFrame::OnClose event. --- samples/webview_chromium/webview.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index be28c73782..a0e9ae3fd6 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -206,7 +206,6 @@ private: wxString m_findText; int m_findFlags, m_findCount; - DECLARE_EVENT_TABLE() }; class SourceViewDialog : public wxDialog @@ -549,6 +548,7 @@ WebFrame::WebFrame(const wxString& url) : //Connect the idle events Connect(wxID_ANY, wxEVT_IDLE, wxIdleEventHandler(WebFrame::OnIdle), NULL, this); + Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, wxCloseEventHandler(WebFrame::OnClose), NULL, this); } WebFrame::~WebFrame() @@ -1087,10 +1087,6 @@ SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) : SetSizer(sizer); } -BEGIN_EVENT_TABLE(WebFrame, wxFrame) - EVT_CLOSE(WebFrame::OnClose) -END_EVENT_TABLE() - void WebFrame::OnClose(wxCloseEvent &evt) { wxWebViewChromium::Shutdown(); From e3026f9e8bda68aa08bdebda4e03964541617269 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 2 Jul 2014 10:11:26 +0800 Subject: [PATCH 051/275] [Win/Linux] A temporary fix crashing when closing WebFrame. --- samples/webview_chromium/webview.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index a0e9ae3fd6..e23f6df8c0 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -1089,6 +1089,11 @@ SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) : void WebFrame::OnClose(wxCloseEvent &evt) { +// On Windows/Linux, calling `Shutdown` here will cause a crash when closing WebFrame. +// This is a temporary fix. +#ifdef __WXOSX__ wxWebViewChromium::Shutdown(); +#endif + Destroy(); } From aaaefbbecf6f722ed60c8228bc724ee70c85e635 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 3 Jul 2014 19:27:07 +0800 Subject: [PATCH 052/275] Add custom handler support. --- include/wx/webview_chromium.h | 48 +++++++++++++++++++++- src/common/webview_chromium.cpp | 71 ++++++++++++++++++++++++++++++++- 2 files changed, 116 insertions(+), 3 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index cb98cf1f9a..5ae53e13e7 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -11,7 +11,6 @@ #include "wx/webview.h" #include "wx/sharedptr.h" #include "wx/vector.h" -#include "wx/timer.h" #ifdef __VISUALC__ #pragma warning(push) @@ -20,6 +19,7 @@ #include "include/cef_browser.h" #include "include/cef_client.h" +#include "include/cef_scheme.h" #ifdef __VISUALC__ #pragma warning(pop) @@ -112,11 +112,55 @@ private: IMPLEMENT_REFCOUNTING(ClientHandler); }; +class SchemeHandler : public CefResourceHandler +{ +public: + SchemeHandler(const wxSharedPtr& handler) : offset_(0), m_handler(handler) {} + + // CefResourceHandler methods + virtual bool ProcessRequest(CefRefPtr request, + CefRefPtr callback); + virtual void GetResponseHeaders(CefRefPtr response, + int64& response_length, + CefString& redirectUrl); + virtual bool ReadResponse(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr callback); + virtual void Cancel() {} + +private: + wxSharedPtr m_handler; + std::string data_; + std::string mime_type_; + size_t offset_; + + IMPLEMENT_REFCOUNTING(SchemeHandler); + IMPLEMENT_LOCKING(SchemeHandler); +}; + +class SchemeHandlerFactory : public CefSchemeHandlerFactory +{ +public: + SchemeHandlerFactory(wxSharedPtr handler): m_handler(handler) {} + + // Return a new scheme handler instance to handle the request. + virtual CefRefPtr Create(CefRefPtr browser, + CefRefPtr frame, + const CefString& scheme_name, + CefRefPtr request) + { + return new SchemeHandler( m_handler ); + } + + IMPLEMENT_REFCOUNTING(SchemeHandlerFactory); +private: + wxSharedPtr m_handler; +}; class WXDLLIMPEXP_WEBVIEW wxWebViewChromium : public wxWebView { public: - wxWebViewChromium() {} wxWebViewChromium(wxWindow* parent, diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 30c99afbc5..60d8c0ed73 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -436,7 +436,8 @@ bool wxWebViewChromium::CanSetZoomType(wxWebViewZoomType type) const void wxWebViewChromium::RegisterHandler(wxSharedPtr handler) { - // We currently don't support custom scheme handlers + CefRegisterSchemeHandlerFactory( handler->GetName().ToStdWstring(), "", + new SchemeHandlerFactory(handler) ); } #ifdef __WXMSW__ @@ -727,3 +728,71 @@ void ClientHandler::OnLoadError(CefRefPtr browser, } m_loadErrorCode = type; } + +bool SchemeHandler::ProcessRequest(CefRefPtr request, + CefRefPtr callback) +{ + bool handled = false; + + AutoLock lock_scope( this ); + + std::string url = request->GetURL(); + wxFSFile* file = m_handler->GetFile( url ); + + if ( file ) + { + mime_type_ = (file->GetMimeType()).ToStdString(); + + size_t size = file->GetStream()->GetLength(); + char* buf = new char[size]; + file->GetStream()->Read( buf, size ); + data_ = std::string( buf, buf+size ); + + delete[] buf; + handled = true; + } + + if ( handled ) + { + // Indicate the headers are available. + callback->Continue(); + return true; + } + return false; +} + +void SchemeHandler::GetResponseHeaders(CefRefPtr response, + int64& response_length, + CefString& redirectUrl) +{ + response->SetMimeType( mime_type_ ); + response->SetStatus( 200 ); + + // Set the resulting response length + response_length = data_.length(); +} + +bool SchemeHandler::ReadResponse(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr callback) +{ + bool has_data = false; + bytes_read = 0; + + AutoLock lock_scope( this ); + + if ( offset_ < data_.length() ) + { + // Copy the next block of data into the buffer. + int transfer_size = + std::min( bytes_to_read, static_cast( data_.length() - offset_ ) ); + memcpy( data_out, data_.c_str() + offset_, transfer_size ); + offset_ += transfer_size; + + bytes_read = transfer_size; + has_data = true; + } + + return has_data; +} From 7e2ed11b624b460d98f35356135fe3528f03bb7e Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 3 Jul 2014 20:12:43 +0800 Subject: [PATCH 053/275] Correct help/doc.zip loading path. Due to webview sample building directory is different from platforms and compilers, we need to retrieve the `/help/` absolute path from building directory. --- samples/webview_chromium/webview.cpp | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index e23f6df8c0..2a0971e362 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -682,11 +682,19 @@ void WebFrame::OnMode(wxCommandEvent& WXUNUSED(evt)) void WebFrame::OnLoadScheme(wxCommandEvent& WXUNUSED(evt)) { - wxFileName helpfile("../help/doc.zip"); - helpfile.MakeAbsolute(); - wxString path = helpfile.GetFullPath(); + // Since webview sample build directory is different from platforms, We traverse + // from building directory to retrieve `/samples/help/` absolute path. + wxFileName cur_dir("."); + cur_dir.MakeAbsolute(); + wxString cur_path = cur_dir.GetFullPath(); //Under MSW we need to flip the slashes - path.Replace("\\", "/"); + cur_path.Replace("\\", "/"); + int samples_begin_pos = cur_path.find("samples"); + // Invalid sample directory, just return. + if (samples_begin_pos == -1) + return; + + wxString path = cur_path.substr(0, samples_begin_pos+7) + "/help/doc.zip"; path = "wxfs:///" + path + ";protocol=zip/doc.htm"; m_browser->LoadURL(path); } From b3478c4ed226e7f0780ae2257397f417bfee8377 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 6 Jul 2014 08:49:09 +0800 Subject: [PATCH 054/275] Nits: Correct code style. --- include/wx/webview_chromium.h | 10 +++++----- src/common/webview_chromium.cpp | 16 ++++++++-------- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 5ae53e13e7..b28093453f 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -115,7 +115,7 @@ private: class SchemeHandler : public CefResourceHandler { public: - SchemeHandler(const wxSharedPtr& handler) : offset_(0), m_handler(handler) {} + SchemeHandler(const wxSharedPtr& handler) : m_handler(handler), m_offset(0) {} // CefResourceHandler methods virtual bool ProcessRequest(CefRefPtr request, @@ -131,9 +131,9 @@ public: private: wxSharedPtr m_handler; - std::string data_; - std::string mime_type_; - size_t offset_; + std::string m_data; + std::string m_mime_type; + size_t m_offset; IMPLEMENT_REFCOUNTING(SchemeHandler); IMPLEMENT_LOCKING(SchemeHandler); @@ -150,7 +150,7 @@ public: const CefString& scheme_name, CefRefPtr request) { - return new SchemeHandler( m_handler ); + return new SchemeHandler( m_handler ); } IMPLEMENT_REFCOUNTING(SchemeHandlerFactory); diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 60d8c0ed73..a148d2218b 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -741,12 +741,12 @@ bool SchemeHandler::ProcessRequest(CefRefPtr request, if ( file ) { - mime_type_ = (file->GetMimeType()).ToStdString(); + m_mime_type = (file->GetMimeType()).ToStdString(); size_t size = file->GetStream()->GetLength(); char* buf = new char[size]; file->GetStream()->Read( buf, size ); - data_ = std::string( buf, buf+size ); + m_data = std::string( buf, buf+size ); delete[] buf; handled = true; @@ -765,11 +765,11 @@ void SchemeHandler::GetResponseHeaders(CefRefPtr response, int64& response_length, CefString& redirectUrl) { - response->SetMimeType( mime_type_ ); + response->SetMimeType( m_mime_type ); response->SetStatus( 200 ); // Set the resulting response length - response_length = data_.length(); + response_length = m_data.length(); } bool SchemeHandler::ReadResponse(void* data_out, @@ -782,13 +782,13 @@ bool SchemeHandler::ReadResponse(void* data_out, AutoLock lock_scope( this ); - if ( offset_ < data_.length() ) + if ( m_offset < m_data.length() ) { // Copy the next block of data into the buffer. int transfer_size = - std::min( bytes_to_read, static_cast( data_.length() - offset_ ) ); - memcpy( data_out, data_.c_str() + offset_, transfer_size ); - offset_ += transfer_size; + std::min( bytes_to_read, static_cast( m_data.length() - m_offset ) ); + memcpy( data_out, m_data.c_str() + m_offset, transfer_size ); + m_offset += transfer_size; bytes_read = transfer_size; has_data = true; From 19e1a59b84bba6210a1095e97879a7beb449bc66 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 6 Jul 2014 10:14:02 +0800 Subject: [PATCH 055/275] [Mac] Add MimeType empty check. wxFileSystemHandler::GetMimeTypeFromExt returns empty when passing css location url on Mac OS X, which will trigger DCHECK failure in CEF. This patch is adding empty check to avoid DCHECK failure. --- src/common/webview_chromium.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index a148d2218b..d3c589d9bf 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -765,7 +765,8 @@ void SchemeHandler::GetResponseHeaders(CefRefPtr response, int64& response_length, CefString& redirectUrl) { - response->SetMimeType( m_mime_type ); + if ( !m_mime_type.empty() ) + response->SetMimeType( m_mime_type ); response->SetStatus( 200 ); // Set the resulting response length From 0c6bfa3289558ca30af96180732b1cc52f3c47bd Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 6 Jul 2014 10:21:25 +0800 Subject: [PATCH 056/275] [Mac] Fix a warning: '_' is not allowed in bundle file. --- samples/webview_chromium/helper-Info.plist | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/webview_chromium/helper-Info.plist b/samples/webview_chromium/helper-Info.plist index a69a2d8fb5..042faf9e6f 100644 --- a/samples/webview_chromium/helper-Info.plist +++ b/samples/webview_chromium/helper-Info.plist @@ -9,7 +9,7 @@ CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier - org.wxwidgets.webview_chromium.helper + org.wxwidgets.webviewChromium.helper CFBundleInfoDictionaryVersion 6.0 CFBundleName From dec44cae5572cdd14ddf12dd80412f9ff6239894 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 6 Jul 2014 10:40:30 +0800 Subject: [PATCH 057/275] Nits: Fix some compile warnings. --- src/common/webview_chromium.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index d3c589d9bf..27f1c998ad 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -39,7 +39,7 @@ public: PAGE_SOURCE, PAGE_TEXT, }; - wxStringVisitor(wxWebViewChromium* webview, StringType type) : m_webview(webview), m_type(type) {} + wxStringVisitor(wxWebViewChromium* webview, StringType type) : m_type(type), m_webview(webview) {} void Visit(const CefString& string) { switch(m_type) @@ -148,9 +148,8 @@ wxWebViewChromium::~wxWebViewChromium() void wxWebViewChromium::OnSize(wxSizeEvent& event) { - wxSize size = GetClientSize(); - #ifdef __WXMSW__ + wxSize size = GetClientSize(); if ( m_clientHandler && m_clientHandler->GetBrowser() && m_clientHandler->GetBrowser()->GetHost() ) { HWND handle = m_clientHandler->GetBrowser()->GetHost()->GetWindowHandle(); From 012567f6e134b4024c0910696f2522e9c3c410a1 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 8 Jul 2014 15:12:20 +0800 Subject: [PATCH 058/275] Rename RunCEFMessageLoopOnIdle to DoCEFWork for better understanding. --- include/wx/webview_chromium.h | 2 +- samples/webview_chromium/webview.cpp | 2 +- src/common/webview_chromium.cpp | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index b28093453f..e5f6640213 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -263,7 +263,7 @@ public: #endif static void Shutdown(); - static void RunCEFMessageLoopOnIdle(); + static void DoCEFWork(); protected: virtual void DoSetPage(const wxString& html, const wxString& baseUrl); diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 2a0971e362..e39adc0825 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -263,7 +263,7 @@ bool WebApp::OnInit() } bool WebApp::ProcessIdle() { - wxWebViewChromium::RunCEFMessageLoopOnIdle(); + wxWebViewChromium::DoCEFWork(); return wxApp::ProcessIdle(); } diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 27f1c998ad..a7d52c7dae 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -484,7 +484,7 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, #endif } -void wxWebViewChromium::RunCEFMessageLoopOnIdle() +void wxWebViewChromium::DoCEFWork() { CefDoMessageLoopWork(); } From 3be9e2bf3d318cae01d42640c520fb860aae754d Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 8 Jul 2014 15:26:32 +0800 Subject: [PATCH 059/275] Running CEFMessageLoop in wxTimer instead of OnIdle. Running CEFMessageLoop form OnIdle, which may pontentially starve CEF messageloop when application is busy with other UI-operation. Change it to timer to avoid the starvation. --- samples/webview_chromium/webview.cpp | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index e39adc0825..c59274761f 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -37,6 +37,7 @@ #include "wx/filesys.h" #include "wx/fs_arc.h" #include "wx/fs_mem.h" +#include "wx/timer.h" #include "wx/webview_chromium.h" @@ -71,7 +72,6 @@ public: } virtual bool OnInit(); - virtual bool ProcessIdle(); /* #if wxUSE_CMDLINE_PARSER @@ -107,6 +107,7 @@ public: virtual ~WebFrame(); void UpdateState(); + void OnTimer(wxTimerEvent& evt); void OnIdle(wxIdleEvent& evt); void OnUrl(wxCommandEvent& evt); void OnBack(wxCommandEvent& evt); @@ -155,6 +156,9 @@ private: wxTextCtrl* m_url; wxWebView* m_browser; + // A timer to run CEF message loop. + wxTimer* m_timer; + wxToolBar* m_toolbar; wxToolBarToolBase* m_toolbar_back; wxToolBarToolBase* m_toolbar_forward; @@ -262,11 +266,6 @@ bool WebApp::OnInit() return true; } -bool WebApp::ProcessIdle() { - wxWebViewChromium::DoCEFWork(); - return wxApp::ProcessIdle(); -} - WebFrame::WebFrame(const wxString& url) : wxFrame(NULL, wxID_ANY, "wxWebView Sample") @@ -549,6 +548,11 @@ WebFrame::WebFrame(const wxString& url) : //Connect the idle events Connect(wxID_ANY, wxEVT_IDLE, wxIdleEventHandler(WebFrame::OnIdle), NULL, this); Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, wxCloseEventHandler(WebFrame::OnClose), NULL, this); + Connect(wxID_ANY, wxEVT_TIMER, wxTimerEventHandler(WebFrame::OnTimer), NULL, this); + + m_timer = new wxTimer(this); + // Running each 100 milliseconds. + m_timer->Start(100); } WebFrame::~WebFrame() @@ -578,6 +582,11 @@ void WebFrame::UpdateState() m_url->SetValue( m_browser->GetCurrentURL() ); } +void WebFrame::OnTimer(wxTimerEvent& WXUNUSED(evt)) +{ + wxWebViewChromium::DoCEFWork(); +} + void WebFrame::OnIdle(wxIdleEvent& WXUNUSED(evt)) { if(m_browser->IsBusy()) @@ -1097,6 +1106,7 @@ SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) : void WebFrame::OnClose(wxCloseEvent &evt) { + delete m_timer; // On Windows/Linux, calling `Shutdown` here will cause a crash when closing WebFrame. // This is a temporary fix. #ifdef __WXOSX__ From 8be92e3c3e63e1d25eae7af06962cf6a92863187 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 8 Jul 2014 15:35:47 +0800 Subject: [PATCH 060/275] Restore OnExit method. Althrough there is fine to exit the program without calling CEFShutdown on Win/Linux platforms, it's better to call it explicitly. --- samples/webview_chromium/webview.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index c59274761f..0e93e8660a 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -72,6 +72,7 @@ public: } virtual bool OnInit(); + virtual int OnExit(); /* #if wxUSE_CMDLINE_PARSER @@ -266,6 +267,13 @@ bool WebApp::OnInit() return true; } +int WebApp::OnExit() +{ +#if defined(__WXMSW__) || defined(__WXGTK__) + wxWebViewChromium::Shutdown(); +#endif + return wxApp::OnExit(); +} WebFrame::WebFrame(const wxString& url) : wxFrame(NULL, wxID_ANY, "wxWebView Sample") From 53e70394f9fa9258a1033d2c349924f99b34a4da Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 8 Jul 2014 15:38:30 +0800 Subject: [PATCH 061/275] Cleanup some commented code. --- samples/webview_chromium/webview.cpp | 24 ------------------------ 1 file changed, 24 deletions(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 0e93e8660a..2a485a5ee8 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -73,30 +73,6 @@ public: virtual bool OnInit(); virtual int OnExit(); - - /* -#if wxUSE_CMDLINE_PARSER - virtual void OnInitCmdLine(wxCmdLineParser& parser) - { - wxApp::OnInitCmdLine(parser); - - parser.AddParam("URL to open", - wxCMD_LINE_VAL_STRING, - wxCMD_LINE_PARAM_OPTIONAL); - } - - virtual bool OnCmdLineParsed(wxCmdLineParser& parser) - { - if ( !wxApp::OnCmdLineParsed(parser) ) - return false; - - if ( parser.GetParamCount() ) - m_url = parser.GetParam(0); - - return true; - } -#endif // wxUSE_CMDLINE_PARSER - */ private: wxString m_url; }; From 6875d523fc88e54cbcab93aaccfce7be3870d998 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 13 Jul 2014 16:52:48 +0800 Subject: [PATCH 062/275] [Mac] Add CEF path to bakefile system. --- build/bakefiles/config.bkl | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index 94a861d775..0d37514481 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -561,7 +561,7 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. $(CEF_INCLUDE_DIR)/$(CONFIGURE)/ - + $(CEF_INCLUDE_DIR)/Release/ $(CEF_INCLUDE_DIR)/Release/ @@ -574,7 +574,7 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. $(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ - + $(CEF_INCLUDE_DIR)/xcodebuild/Debug/ $(CEF_INCLUDE_DIR)/out/Release/obj.target/ @@ -586,7 +586,8 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. libcef - + + cef @@ -598,7 +599,7 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. libcef_dll_wrapper - + cef_dll_wrapper cef_dll_wrapper From afec84d944d2353a9eccd7492583493c5f3b42ae Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 13 Jul 2014 16:55:25 +0800 Subject: [PATCH 063/275] Nits: Correct code indent. --- build/bakefiles/config.bkl | 78 +++++++++++++++++++------------------- 1 file changed, 39 insertions(+), 39 deletions(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index 0d37514481..c096a20f70 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -545,9 +545,9 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. 0 - + - $(TOP_SRCDIR)/cef + $(TOP_SRCDIR)/cef @@ -557,53 +557,53 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. - - $(CEF_INCLUDE_DIR)/$(CONFIGURE)/ - - - $(CEF_INCLUDE_DIR)/Release/ - - - $(CEF_INCLUDE_DIR)/Release/ - + + $(CEF_INCLUDE_DIR)/$(CONFIGURE)/ + + + $(CEF_INCLUDE_DIR)/Release/ + + + $(CEF_INCLUDE_DIR)/Release/ + - - $(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ - - - $(CEF_INCLUDE_DIR)/xcodebuild/Debug/ - - - $(CEF_INCLUDE_DIR)/out/Release/obj.target/ - + + $(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ + + + $(CEF_INCLUDE_DIR)/xcodebuild/Debug/ + + + $(CEF_INCLUDE_DIR)/out/Release/obj.target/ + - - libcef - - - - - - - cef - + + libcef + + + + + + + cef + - - libcef_dll_wrapper - - - cef_dll_wrapper - - - cef_dll_wrapper - + + libcef_dll_wrapper + + + cef_dll_wrapper + + + cef_dll_wrapper + From 5d4e93442b2cc261db383ac4af4541d72a9db50f Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 13 Jul 2014 16:59:01 +0800 Subject: [PATCH 064/275] [Mac] Add CEF framework link in configure.in. --- configure.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index c32533970d..0d6d9e6db3 100644 --- a/configure.in +++ b/configure.in @@ -7200,6 +7200,7 @@ if test "$wxUSE_WEBVIEW" = "yes"; then #include #include ]) + CEF_LINK="$EXTRA_FRAMEWORKS -F\\$(top_srcdir)cef/Debug -framework Chromium\ Embedded\ framework" CPPFLAGS="$old_CPPFLAGS" fi fi @@ -7851,7 +7852,7 @@ EXTRALIBS_HTML="$MSPACK_LINK" EXTRALIBS_MEDIA="$GST_LIBS" EXTRALIBS_STC="-lwxscintilla${WX_LIB_FLAVOUR}-${WX_RELEASE}${HOST_SUFFIX}" if test "$wxUSE_GUI" = "yes"; then - EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $LZMA_LINK $JBIG_LINK $WEBKIT_LINK` + EXTRALIBS_GUI=`echo $GUI_TK_LIBRARY $PNG_LINK $JPEG_LINK $TIFF_LINK $LZMA_LINK $JBIG_LINK $WEBKIT_LINK $CEF_LINK` fi if test "$wxUSE_OPENGL" = "yes"; then EXTRALIBS_OPENGL="$LDFLAGS_GL $OPENGL_LIBS" From 9f2e584b3950ea178ea09212085b5f968a56162d Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 13 Jul 2014 17:33:17 +0800 Subject: [PATCH 065/275] [Mac] Add building scripts from CEF. --- .../webview_chromium/mac/tools/LICENSE.CEF | 29 ++ .../mac/tools/README-TRANSFER.txt | 6 + .../mac/tools/change_mach_o_flags.py | 273 ++++++++++++++++++ .../mac/tools/make_more_helpers.sh | 97 +++++++ 4 files changed, 405 insertions(+) create mode 100644 samples/webview_chromium/mac/tools/LICENSE.CEF create mode 100644 samples/webview_chromium/mac/tools/README-TRANSFER.txt create mode 100755 samples/webview_chromium/mac/tools/change_mach_o_flags.py create mode 100755 samples/webview_chromium/mac/tools/make_more_helpers.sh diff --git a/samples/webview_chromium/mac/tools/LICENSE.CEF b/samples/webview_chromium/mac/tools/LICENSE.CEF new file mode 100644 index 0000000000..a5d84adaba --- /dev/null +++ b/samples/webview_chromium/mac/tools/LICENSE.CEF @@ -0,0 +1,29 @@ +// Copyright (c) 2008-2013 Marshall A. Greenblatt. Portions Copyright (c) +// 2006-2009 Google Inc. All rights reserved. +// +// Redistribution and use in source and binary forms, with or without +// modification, are permitted provided that the following conditions are +// met: +// +// * Redistributions of source code must retain the above copyright +// notice, this list of conditions and the following disclaimer. +// * Redistributions in binary form must reproduce the above +// copyright notice, this list of conditions and the following disclaimer +// in the documentation and/or other materials provided with the +// distribution. +// * Neither the name of Google Inc. nor the name Chromium Embedded +// Framework nor the names of its contributors may be used to endorse +// or promote products derived from this software without specific prior +// written permission. +// +// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/samples/webview_chromium/mac/tools/README-TRANSFER.txt b/samples/webview_chromium/mac/tools/README-TRANSFER.txt new file mode 100644 index 0000000000..7e0c1415d7 --- /dev/null +++ b/samples/webview_chromium/mac/tools/README-TRANSFER.txt @@ -0,0 +1,6 @@ +Files in this directory have been copied from other locations in the Chromium +Emebedded Framework source tree. They have been minimal modified to work in +wxWidgets. Below is a list of original file locations in CEF: + +/tools/make_more_helper.sh +/tools/change_mach_o_flags.sh diff --git a/samples/webview_chromium/mac/tools/change_mach_o_flags.py b/samples/webview_chromium/mac/tools/change_mach_o_flags.py new file mode 100755 index 0000000000..c2aeaec9b1 --- /dev/null +++ b/samples/webview_chromium/mac/tools/change_mach_o_flags.py @@ -0,0 +1,273 @@ +#!/usr/bin/env python +# Copyright (c) 2011 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +"""Usage: change_mach_o_flags.py [--executable-heap] [--no-pie] + +Arranges for the executable at |executable_path| to have its data (heap) +pages protected to prevent execution on Mac OS X 10.7 ("Lion"), and to have +the PIE (position independent executable) bit set to enable ASLR (address +space layout randomization). With --executable-heap or --no-pie, the +respective bits are cleared instead of set, making the heap executable or +disabling PIE/ASLR. + +This script is able to operate on thin (single-architecture) Mach-O files +and fat (universal, multi-architecture) files. When operating on fat files, +it will set or clear the bits for each architecture contained therein. + +NON-EXECUTABLE HEAP + +Traditionally in Mac OS X, 32-bit processes did not have data pages set to +prohibit execution. Although user programs could call mprotect and +mach_vm_protect to deny execution of code in data pages, the kernel would +silently ignore such requests without updating the page tables, and the +hardware would happily execute code on such pages. 64-bit processes were +always given proper hardware protection of data pages. This behavior was +controllable on a system-wide level via the vm.allow_data_exec sysctl, which +is set by default to 1. The bit with value 1 (set by default) allows code +execution on data pages for 32-bit processes, and the bit with value 2 +(clear by default) does the same for 64-bit processes. + +In Mac OS X 10.7, executables can "opt in" to having hardware protection +against code execution on data pages applied. This is done by setting a new +bit in the |flags| field of an executable's |mach_header|. When +MH_NO_HEAP_EXECUTION is set, proper protections will be applied, regardless +of the setting of vm.allow_data_exec. See xnu-1699.22.73/osfmk/vm/vm_map.c +override_nx and xnu-1699.22.73/bsd/kern/mach_loader.c load_machfile. + +The Apple toolchain has been revised to set the MH_NO_HEAP_EXECUTION when +producing executables, provided that -allow_heap_execute is not specified +at link time. Only linkers shipping with Xcode 4.0 and later (ld64-123.2 and +later) have this ability. See ld64-123.2.1/src/ld/Options.cpp +Options::reconfigureDefaults() and +ld64-123.2.1/src/ld/HeaderAndLoadCommands.hpp +HeaderAndLoadCommandsAtom::flags(). + +This script sets the MH_NO_HEAP_EXECUTION bit on Mach-O executables. It is +intended for use with executables produced by a linker that predates Apple's +modifications to set this bit itself. It is also useful for setting this bit +for non-i386 executables, including x86_64 executables. Apple's linker only +sets it for 32-bit i386 executables, presumably under the assumption that +the value of vm.allow_data_exec is set in stone. However, if someone were to +change vm.allow_data_exec to 2 or 3, 64-bit x86_64 executables would run +without hardware protection against code execution on data pages. This +script can set the bit for x86_64 executables, guaranteeing that they run +with appropriate protection even when vm.allow_data_exec has been tampered +with. + +POSITION-INDEPENDENT EXECUTABLES/ADDRESS SPACE LAYOUT RANDOMIZATION + +This script sets or clears the MH_PIE bit in an executable's Mach-O header, +enabling or disabling position independence on Mac OS X 10.5 and later. +Processes running position-independent executables have varying levels of +ASLR protection depending on the OS release. The main executable's load +address, shared library load addresess, and the heap and stack base +addresses may be randomized. Position-independent executables are produced +by supplying the -pie flag to the linker (or defeated by supplying -no_pie). +Executables linked with a deployment target of 10.7 or higher have PIE on +by default. + +This script is never strictly needed during the build to enable PIE, as all +linkers used are recent enough to support -pie. However, it's used to +disable the PIE bit as needed on already-linked executables. +""" + +import optparse +import os +import struct +import sys + + +# +FAT_MAGIC = 0xcafebabe +FAT_CIGAM = 0xbebafeca + +# +MH_MAGIC = 0xfeedface +MH_CIGAM = 0xcefaedfe +MH_MAGIC_64 = 0xfeedfacf +MH_CIGAM_64 = 0xcffaedfe +MH_EXECUTE = 0x2 +MH_PIE = 0x00200000 +MH_NO_HEAP_EXECUTION = 0x01000000 + + +class MachOError(Exception): + """A class for exceptions thrown by this module.""" + + pass + + +def CheckedSeek(file, offset): + """Seeks the file-like object at |file| to offset |offset| and raises a + MachOError if anything funny happens.""" + + file.seek(offset, os.SEEK_SET) + new_offset = file.tell() + if new_offset != offset: + raise MachOError, \ + 'seek: expected offset %d, observed %d' % (offset, new_offset) + + +def CheckedRead(file, count): + """Reads |count| bytes from the file-like |file| object, raising a + MachOError if any other number of bytes is read.""" + + bytes = file.read(count) + if len(bytes) != count: + raise MachOError, \ + 'read: expected length %d, observed %d' % (count, len(bytes)) + + return bytes + + +def ReadUInt32(file, endian): + """Reads an unsinged 32-bit integer from the file-like |file| object, + treating it as having endianness specified by |endian| (per the |struct| + module), and returns it as a number. Raises a MachOError if the proper + length of data can't be read from |file|.""" + + bytes = CheckedRead(file, 4) + + (uint32,) = struct.unpack(endian + 'I', bytes) + return uint32 + + +def ReadMachHeader(file, endian): + """Reads an entire |mach_header| structure () from the + file-like |file| object, treating it as having endianness specified by + |endian| (per the |struct| module), and returns a 7-tuple of its members + as numbers. Raises a MachOError if the proper length of data can't be read + from |file|.""" + + bytes = CheckedRead(file, 28) + + magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds, flags = \ + struct.unpack(endian + '7I', bytes) + return magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds, flags + + +def ReadFatArch(file): + """Reads an entire |fat_arch| structure () from the file-like + |file| object, treating it as having endianness specified by |endian| + (per the |struct| module), and returns a 5-tuple of its members as numbers. + Raises a MachOError if the proper length of data can't be read from + |file|.""" + + bytes = CheckedRead(file, 20) + + cputype, cpusubtype, offset, size, align = struct.unpack('>5I', bytes) + return cputype, cpusubtype, offset, size, align + + +def WriteUInt32(file, uint32, endian): + """Writes |uint32| as an unsinged 32-bit integer to the file-like |file| + object, treating it as having endianness specified by |endian| (per the + |struct| module).""" + + bytes = struct.pack(endian + 'I', uint32) + assert len(bytes) == 4 + + file.write(bytes) + + +def HandleMachOFile(file, options, offset=0): + """Seeks the file-like |file| object to |offset|, reads its |mach_header|, + and rewrites the header's |flags| field if appropriate. The header's + endianness is detected. Both 32-bit and 64-bit Mach-O headers are supported + (mach_header and mach_header_64). Raises MachOError if used on a header that + does not have a known magic number or is not of type MH_EXECUTE. The + MH_PIE and MH_NO_HEAP_EXECUTION bits are set or cleared in the |flags| field + according to |options| and written to |file| if any changes need to be made. + If already set or clear as specified by |options|, nothing is written.""" + + CheckedSeek(file, offset) + magic = ReadUInt32(file, '<') + if magic == MH_MAGIC or magic == MH_MAGIC_64: + endian = '<' + elif magic == MH_CIGAM or magic == MH_CIGAM_64: + endian = '>' + else: + raise MachOError, \ + 'Mach-O file at offset %d has illusion of magic' % offset + + CheckedSeek(file, offset) + magic, cputype, cpusubtype, filetype, ncmds, sizeofcmds, flags = \ + ReadMachHeader(file, endian) + assert magic == MH_MAGIC or magic == MH_MAGIC_64 + if filetype != MH_EXECUTE: + raise MachOError, \ + 'Mach-O file at offset %d is type 0x%x, expected MH_EXECUTE' % \ + (offset, filetype) + + original_flags = flags + + if options.no_heap_execution: + flags |= MH_NO_HEAP_EXECUTION + else: + flags &= ~MH_NO_HEAP_EXECUTION + + if options.pie: + flags |= MH_PIE + else: + flags &= ~MH_PIE + + if flags != original_flags: + CheckedSeek(file, offset + 24) + WriteUInt32(file, flags, endian) + + +def HandleFatFile(file, options, fat_offset=0): + """Seeks the file-like |file| object to |offset| and loops over its + |fat_header| entries, calling HandleMachOFile for each.""" + + CheckedSeek(file, fat_offset) + magic = ReadUInt32(file, '>') + assert magic == FAT_MAGIC + + nfat_arch = ReadUInt32(file, '>') + + for index in xrange(0, nfat_arch): + cputype, cpusubtype, offset, size, align = ReadFatArch(file) + assert size >= 28 + + # HandleMachOFile will seek around. Come back here after calling it, in + # case it sought. + fat_arch_offset = file.tell() + HandleMachOFile(file, options, offset) + CheckedSeek(file, fat_arch_offset) + + +def main(me, args): + parser = optparse.OptionParser('%prog [options] ') + parser.add_option('--executable-heap', action='store_false', + dest='no_heap_execution', default=True, + help='Clear the MH_NO_HEAP_EXECUTION bit') + parser.add_option('--no-pie', action='store_false', + dest='pie', default=True, + help='Clear the MH_PIE bit') + (options, loose_args) = parser.parse_args(args) + if len(loose_args) != 1: + parser.print_usage() + return 1 + + executable_path = loose_args[0] + executable_file = open(executable_path, 'rb+') + + magic = ReadUInt32(executable_file, '<') + if magic == FAT_CIGAM: + # Check FAT_CIGAM and not FAT_MAGIC because the read was little-endian. + HandleFatFile(executable_file, options) + elif magic == MH_MAGIC or magic == MH_CIGAM or \ + magic == MH_MAGIC_64 or magic == MH_CIGAM_64: + HandleMachOFile(executable_file, options) + else: + raise MachOError, '%s is not a Mach-O or fat file' % executable_file + + executable_file.close() + return 0 + + +if __name__ == '__main__': + sys.exit(main(sys.argv[0], sys.argv[1:])) diff --git a/samples/webview_chromium/mac/tools/make_more_helpers.sh b/samples/webview_chromium/mac/tools/make_more_helpers.sh new file mode 100755 index 0000000000..24ab210394 --- /dev/null +++ b/samples/webview_chromium/mac/tools/make_more_helpers.sh @@ -0,0 +1,97 @@ +#!/bin/bash + +# Modify from cef/tools/make_more_helpers.sh to adjust Makefile builds. +# Remove in-build BUILT_PRODUCTS_DIR, CONTENTS_FOLDER_PATH variables. +# Usage: make_more_helpers.sh + +# Copyright (c) 2012 The Chromium Authors. All rights reserved. +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +# Usage: make_more_helpers.sh +# +# This script creates additional helper .app bundles for Chromium, based on +# the existing helper .app bundle, changing their Mach-O header's flags to +# enable and disable various features. Based on Chromium Helper.app, it will +# create Chromium Helper EH.app, which has the MH_NO_HEAP_EXECUTION bit +# cleared to support Chromium child processes that require an executable heap, +# and Chromium Helper NP.app, which has the MH_PIE bit cleared to support +# Chromium child processes that cannot tolerate ASLR. +# +# This script expects to be called from the chrome_exe target as a postbuild, +# and operates directly within the built-up browser app's versioned directory. +# +# Each helper is adjusted by giving it the proper bundle name, renaming the +# executable, adjusting several Info.plist keys, and changing the executable's +# Mach-O flags. + +set -eu + +make_helper() { + local containing_dir="${1}" + local app_name="${2}" + local feature="${3}" + local flags="${4}" + + local helper_name="${app_name} Helper" + local helper_stem="${containing_dir}/${helper_name}" + local original_helper="${helper_stem}.app" + if [[ ! -d "${original_helper}" ]]; then + echo "${0}: error: ${original_helper} is a required directory" >& 2 + exit 1 + fi + local original_helper_exe="${original_helper}/Contents/MacOS/${helper_name}" + if [[ ! -f "${original_helper_exe}" ]]; then + echo "${0}: error: ${original_helper_exe} is a required file" >& 2 + exit 1 + fi + + local feature_helper="${helper_stem} ${feature}.app" + + rsync -acC --delete --include '*.so' "${original_helper}/" "${feature_helper}" + + local helper_feature="${helper_name} ${feature}" + local helper_feature_exe="${feature_helper}/Contents/MacOS/${helper_feature}" + mv "${feature_helper}/Contents/MacOS/${helper_name}" "${helper_feature_exe}" + + local change_flags="$(dirname "${0}")/change_mach_o_flags.py" + "${change_flags}" ${flags} "${helper_feature_exe}" + + local feature_info="${feature_helper}/Contents/Info" + local feature_info_plist="${feature_info}.plist" + + defaults write "${feature_info}" "CFBundleDisplayName" "${helper_feature}" + defaults write "${feature_info}" "CFBundleExecutable" "${helper_feature}" + + cfbundleid="$(defaults read "${feature_info}" "CFBundleIdentifier")" + feature_cfbundleid="${cfbundleid}.${feature}" + defaults write "${feature_info}" "CFBundleIdentifier" "${feature_cfbundleid}" + + cfbundlename="$(defaults read "${feature_info}" "CFBundleName")" + feature_cfbundlename="${cfbundlename} ${feature}" + defaults write "${feature_info}" "CFBundleName" "${feature_cfbundlename}" + + # As usual, defaults might have put the plist into whatever format excites + # it, but Info.plists get converted back to the expected XML format. + plutil -convert xml1 "${feature_info_plist}" + + # `defaults` also changes the file permissions, so make the file + # world-readable again. + chmod a+r "${feature_info_plist}" +} + +if [[ ${#} -ne 2 ]]; then + echo "usage: ${0} " >& 2 + exit 1 +fi + +#DIRECTORY_WITHIN_CONTENTS="${1}" +APP_NAME="${2}" + +#CONTENTS_DIR="${BUILT_PRODUCTS_DIR}/${CONTENTS_FOLDER_PATH}" +#CONTAINING_DIR="${CONTENTS_DIR}/${DIRECTORY_WITHIN_CONTENTS}" +CONTAINING_DIR="${1}" + +make_helper "${CONTAINING_DIR}" "${APP_NAME}" "EH" "--executable-heap" +make_helper "${CONTAINING_DIR}" "${APP_NAME}" "NP" "--no-pie" + From d7cfc96781373b2b526c68719cfa4ab4aa5352fb Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sun, 13 Jul 2014 17:34:16 +0800 Subject: [PATCH 066/275] [Mac] Support Makefile builds. --- samples/webview_chromium/webview_chromium.bkl | 54 +++++++++++++++++++ 1 file changed, 54 insertions(+) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index 3b88cc6501..3726805873 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -3,7 +3,43 @@ + + + mac/process_helper_mac.cpp + + + $(LIBCEF_PATH) + $(LIBCEF_WRAPPER_PATH) + $(CEF_INCLUDE_DIR) + $(LIBCEF_NAME) + $(LIBCEF_DLL_WRAPPER_NAME) + -F$(TOP_SRCDIR)cef/Release/ -framework Chromium\ Embedded\ framework + + + + all + + + mkdir -p webview_chromium_helper.app + mkdir -p webview_chromium_helper.app/Contents/MacOS + mkdir -p webview_chromium_helper.app/Contents/Resources + sed -e "s/\$${PRODUCT_NAME}/webview_chromium Helper/" \ + -e "s/\$${EXECUTABLE_NAME}/webview_chromium Helper/" helper-Info.plist >webview_chromium_helper.app/Contents/Info.plist + /bin/echo "APPL????" >webview_chromium_helper.app/Contents/PkgInfo + + install_name_tool -change "@executable_path/Chromium Embedded Framework" "@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" webview_chromium_helper + cp -f webview_chromium_helper webview_chromium_helper.app/Contents/MacOS/webview_chromium\ Helper + cp -f ../../src/osx/carbon/wxmac.icns webview_chromium_helper.app/Contents/Resources/wxmac.icns + + + + rm -rf $(id).app + + + + webview_chromium_helper webview.cpp @@ -22,6 +58,24 @@ ../sample.rc + + + all + $(DLLPREFIX)$(wxwin.mkDllName("webview")).dylib + + mkdir webview_chromium.app/Contents/Frameworks/ + mkdir webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app + cp $(TOP_SRCDIR)lib/$(webviewdll) webview_chromium.app/Contents/Frameworks/ + cp -Rf $(LIBCEF_PATH)/Chromium\ Embedded\ Framework.framework webview_chromium.app/Contents/Frameworks/ + + install_name_tool -change "@executable_path/Chromium Embedded Framework" "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" $(TOP_SRCDIR)lib/$(webviewdll) + + + cp -Rf webview_chromium_helper.app/ webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app/ + ./mac/tools/make_more_helpers.sh $(wx_top_builddir)/samples/webview_chromium/webview_chromium.app/Contents/Frameworks webview_chromium + > + > $(LIB_SCINTILLA) From 73ba0ab248b9f471a02e2cda20a5cf3c6ec49068 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 19 Jul 2014 10:54:14 +0800 Subject: [PATCH 067/275] Add wxUSE_WEBVIEW_CHROMIUM macro. --- include/wx/gtk/setup0.h | 7 +++++++ include/wx/msw/setup0.h | 7 +++++++ include/wx/osx/setup0.h | 7 +++++++ include/wx/setup_inc.h | 7 +++++++ 4 files changed, 28 insertions(+) diff --git a/include/wx/gtk/setup0.h b/include/wx/gtk/setup0.h index df78b80ef3..097f271f0b 100644 --- a/include/wx/gtk/setup0.h +++ b/include/wx/gtk/setup0.h @@ -748,6 +748,13 @@ // Recommended setting: 1 #define wxUSE_WEBVIEW 1 +// Use the Chromium Embedded Framework wxWebview backend +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW_CHROMIUM 1 + // Use the IE wxWebView backend // // Default is 1 on MSW diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index bd082d170c..7e8197db52 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -748,6 +748,13 @@ // Recommended setting: 1 #define wxUSE_WEBVIEW 1 +// Use the Chromium Embedded Framework wxWebview backend +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW_CHROMIUM 1 + // Use the IE wxWebView backend // // Default is 1 on MSW diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h index 3f6b48c69c..17fe2d3666 100644 --- a/include/wx/osx/setup0.h +++ b/include/wx/osx/setup0.h @@ -754,6 +754,13 @@ // Recommended setting: 1 #define wxUSE_WEBVIEW 1 +// Use the Chromium Embedded Framework wxWebview backend +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW_CHROMIUM 1 + // Use the IE wxWebView backend // // Default is 1 on MSW diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index a58ec282f1..6a44ce65f1 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -744,6 +744,13 @@ // Recommended setting: 1 #define wxUSE_WEBVIEW 1 +// Use the Chromium Embedded Framework wxWebview backend +// +// Default is 1 +// +// Recommended setting: 1 +#define wxUSE_WEBVIEW_CHROMIUM 1 + // Use the IE wxWebView backend // // Default is 1 on MSW From 500eb4754b449f50f6e294ddbc8148a2156c2179 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 19 Jul 2014 12:47:24 +0800 Subject: [PATCH 068/275] Add --enable-webviewchromium option in configure. --- configure.in | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/configure.in b/configure.in index 0d6d9e6db3..4e78604f4d 100644 --- a/configure.in +++ b/configure.in @@ -788,6 +788,7 @@ WX_ARG_FEATURE(printarch, [ --enable-printarch use printing architecture WX_ARG_FEATURE(svg, [ --enable-svg use wxSVGFileDC device context], wxUSE_SVG) WX_ARG_FEATURE(webkit, [ --enable-webkit use wxWebKitCtrl (Mac-only, use wxWebView instead)], wxUSE_WEBKIT) WX_ARG_FEATURE(webview, [ --enable-webview use wxWebView library], wxUSE_WEBVIEW) +WX_ARG_ENABLE(webviewchromium, [ --enable-webviewchromium use wxWebView Chromium backend], wxUSE_WEBVIEW_CHROMIUM) dnl wxDC is implemented in terms of wxGraphicsContext in wxOSX so the latter dnl can't be disabled, don't even provide an option to do it @@ -7200,7 +7201,6 @@ if test "$wxUSE_WEBVIEW" = "yes"; then #include #include ]) - CEF_LINK="$EXTRA_FRAMEWORKS -F\\$(top_srcdir)cef/Debug -framework Chromium\ Embedded\ framework" CPPFLAGS="$old_CPPFLAGS" fi fi @@ -7223,13 +7223,20 @@ if test "$wxUSE_WEBVIEW" = "yes"; then wxUSE_WEBVIEW="yes" AC_DEFINE(wxUSE_WEBVIEW_IE) fi + elif test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then + if "$wxUSE_MAC" = 1; then + CEF_LINK="$EXTRA_FRAMEWORKS -F\\$(top_srcdir)cef/Debug -framework Chromium\ Embedded\ framework" + fi fi fi if test "$wxUSE_WEBVIEW" = "yes"; then USE_WEBVIEW=1 AC_DEFINE(wxUSE_WEBVIEW) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview webview_chromium" + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" + if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview_chromium" + fi else USE_WEBVIEW=0 fi From a119eaee7fc39ab481700a7d58666cb3014fc399 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 19 Jul 2014 17:20:40 +0800 Subject: [PATCH 069/275] Specify CEF Framework link in bakefile system instead configure. Add CEF framework link in configure will cause each binary builds with CEF framework path option. We only need to link CEF framework on building webview library. --- build/bakefiles/config.bkl | 6 ++++++ build/bakefiles/multilib.bkl | 1 + configure.in | 6 +----- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index c096a20f70..94899b1962 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -606,4 +606,10 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. + + + -F$(TOP_SRCDIR)cef/Release/ -framework Chromium\ Embedded\ framework + + + diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index d8faaea142..a653ddbf05 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -191,6 +191,7 @@ $(LIBCEF_WRAPPER_PATH) $(LIBCEF_NAME) $(LIBCEF_DLL_WRAPPER_NAME) + $(LIBCEF_FRAMEWORK)> Date: Sat, 19 Jul 2014 17:43:43 +0800 Subject: [PATCH 070/275] Add wxUSE_WEBVIEW_CHROMIUM macro check in webview_chromium.h/.cpp. --- include/wx/webview_chromium.h | 6 ++++++ src/common/webview_chromium.cpp | 5 +++++ 2 files changed, 11 insertions(+) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index e5f6640213..4f1c251aae 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -7,6 +7,10 @@ #ifndef _WX_WEBVIEWCHROMIUM_H_ #define _WX_WEBVIEWCHROMIUM_H_ +#include "wx/defs.h" + +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_CHROMIUM + #include "wx/control.h" #include "wx/webview.h" #include "wx/sharedptr.h" @@ -306,4 +310,6 @@ public: { return new wxWebViewChromium(parent, id, url, pos, size, style, name); } }; +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_CHROMIUM + #endif // _WX_WEBVIEWCHROMIUM_H_ diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index a7d52c7dae..e5c7973c9d 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -5,6 +5,9 @@ ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" + +#if wxUSE_WEBVIEW && wxUSE_WEBVIEW_CHROMIUM + #include "wx/webview.h" #include "wx/webview_chromium.h" #include "wx/filesys.h" @@ -796,3 +799,5 @@ bool SchemeHandler::ReadResponse(void* data_out, return has_data; } + +#endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_CHROMIUM From dbc729c1999e5e1f25cf2330d2e0e7887ecd45e8 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 25 Jul 2014 10:03:41 +0800 Subject: [PATCH 071/275] Disable webview Chromium feature by Default. --- include/wx/android/setup.h | 7 +++++++ include/wx/gtk/setup0.h | 6 +++--- include/wx/motif/setup0.h | 7 +++++++ include/wx/msw/setup0.h | 6 +++--- include/wx/osx/setup0.h | 6 +++--- include/wx/setup_inc.h | 6 +++--- include/wx/univ/setup0.h | 7 +++++++ setup.h.in | 2 ++ 8 files changed, 35 insertions(+), 12 deletions(-) diff --git a/include/wx/android/setup.h b/include/wx/android/setup.h index 8ca861908e..b245bc99fe 100644 --- a/include/wx/android/setup.h +++ b/include/wx/android/setup.h @@ -747,6 +747,13 @@ // Recommended setting: 1 #define wxUSE_WEBVIEW 1 +// Use the Chromium Embedded Framework wxWebview backend +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_WEBVIEW_CHROMIUM 0 + // Use the IE wxWebView backend // // Default is 1 on MSW diff --git a/include/wx/gtk/setup0.h b/include/wx/gtk/setup0.h index 097f271f0b..0b1cf70e0f 100644 --- a/include/wx/gtk/setup0.h +++ b/include/wx/gtk/setup0.h @@ -750,10 +750,10 @@ // Use the Chromium Embedded Framework wxWebview backend // -// Default is 1 +// Default is 0 // -// Recommended setting: 1 -#define wxUSE_WEBVIEW_CHROMIUM 1 +// Recommended setting: 0 +#define wxUSE_WEBVIEW_CHROMIUM 0 // Use the IE wxWebView backend // diff --git a/include/wx/motif/setup0.h b/include/wx/motif/setup0.h index 048281ec70..4b87dab08a 100644 --- a/include/wx/motif/setup0.h +++ b/include/wx/motif/setup0.h @@ -748,6 +748,13 @@ // Recommended setting: 1 #define wxUSE_WEBVIEW 1 +// Use the Chromium Embedded Framework wxWebview backend +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_WEBVIEW_CHROMIUM 0 + // Use the IE wxWebView backend // // Default is 1 on MSW diff --git a/include/wx/msw/setup0.h b/include/wx/msw/setup0.h index 7e8197db52..e17dae9480 100644 --- a/include/wx/msw/setup0.h +++ b/include/wx/msw/setup0.h @@ -750,10 +750,10 @@ // Use the Chromium Embedded Framework wxWebview backend // -// Default is 1 +// Default is 0 // -// Recommended setting: 1 -#define wxUSE_WEBVIEW_CHROMIUM 1 +// Recommended setting: 0 +#define wxUSE_WEBVIEW_CHROMIUM 0 // Use the IE wxWebView backend // diff --git a/include/wx/osx/setup0.h b/include/wx/osx/setup0.h index 17fe2d3666..7ece28928f 100644 --- a/include/wx/osx/setup0.h +++ b/include/wx/osx/setup0.h @@ -756,10 +756,10 @@ // Use the Chromium Embedded Framework wxWebview backend // -// Default is 1 +// Default is 0 // -// Recommended setting: 1 -#define wxUSE_WEBVIEW_CHROMIUM 1 +// Recommended setting: 0 +#define wxUSE_WEBVIEW_CHROMIUM 0 // Use the IE wxWebView backend // diff --git a/include/wx/setup_inc.h b/include/wx/setup_inc.h index 6a44ce65f1..6287006de8 100644 --- a/include/wx/setup_inc.h +++ b/include/wx/setup_inc.h @@ -746,10 +746,10 @@ // Use the Chromium Embedded Framework wxWebview backend // -// Default is 1 +// Default is 0 // -// Recommended setting: 1 -#define wxUSE_WEBVIEW_CHROMIUM 1 +// Recommended setting: 0 +#define wxUSE_WEBVIEW_CHROMIUM 0 // Use the IE wxWebView backend // diff --git a/include/wx/univ/setup0.h b/include/wx/univ/setup0.h index 7544890848..0ea226af2e 100644 --- a/include/wx/univ/setup0.h +++ b/include/wx/univ/setup0.h @@ -747,6 +747,13 @@ // Recommended setting: 1 #define wxUSE_WEBVIEW 1 +// Use the Chromium Embedded Framework wxWebview backend +// +// Default is 0 +// +// Recommended setting: 0 +#define wxUSE_WEBVIEW_CHROMIUM 0 + // Use the IE wxWebView backend // // Default is 1 on MSW diff --git a/setup.h.in b/setup.h.in index 981b45e1da..4a12d0bfa5 100644 --- a/setup.h.in +++ b/setup.h.in @@ -333,6 +333,8 @@ #define wxUSE_WEBVIEW 0 +#define wxUSE_WEBVIEW_CHROMIUM 0 + #ifdef __WXMSW__ #define wxUSE_WEBVIEW_IE 0 #else From 5f34c93adf3824fc7372cbcf6e09676ac7b0d313 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 25 Jul 2014 10:05:56 +0800 Subject: [PATCH 072/275] Set wxUSE_WEBVIEW_CHROMIUM marco in configure.in. --- configure.in | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index cdb69b7b25..03f7768cdd 100644 --- a/configure.in +++ b/configure.in @@ -7231,6 +7231,7 @@ if test "$wxUSE_WEBVIEW" = "yes"; then AC_DEFINE(wxUSE_WEBVIEW) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then + AC_DEFINE(wxUSE_WEBVIEW_CHROMIUM) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview_chromium" fi else @@ -8397,7 +8398,7 @@ echo " zlib ${wxUSE_ZLIB}" echo " expat ${wxUSE_EXPAT}" echo " libmspack ${wxUSE_LIBMSPACK}" echo " sdl ${wxUSE_LIBSDL}" - +echo " webview_chromium ${wxUSE_WEBVIEW_CHROMIUM}" echo "" dnl vi: set et sts=4 sw=4 com=\:dnl: From 52974a90daa95468c68098a9c260fafe112ead2c Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Fri, 25 Jul 2014 10:16:52 +0800 Subject: [PATCH 073/275] Use wxUSE_WEBVIEW_CHROMIUM marco check in sample. --- samples/webview_chromium/webview.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 2a485a5ee8..cc20dd29e0 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -22,8 +22,8 @@ #include "wx/wx.h" #endif -#if !wxUSE_WEBVIEW_WEBKIT && !wxUSE_WEBVIEW_IE -#error "A wxWebView backend is required by this sample" +#if !wxUSE_WEBVIEW_CHROMIUM +#error "A wxWebView Chromium backend is required by this sample" #endif #include "wx/artprov.h" From 75ae5886907192597112f69368f342a7bfbde330 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 26 Jul 2014 06:49:49 -0700 Subject: [PATCH 074/275] [Mac] Only build webview_chromium helper on OS X. --- samples/webview_chromium/webview_chromium.bkl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index 3726805873..f40d71c055 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -3,7 +3,7 @@ - + mac/process_helper_mac.cpp From a9e77a1cdc205022a10344d6ce0642a109ad4e67 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 28 Jul 2014 13:22:48 +0800 Subject: [PATCH 075/275] Fix bakefile system generation error, only build helper on OS X. --- samples/webview_chromium/webview_chromium.bkl | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index f40d71c055..232fc5db7e 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -24,7 +24,7 @@ mkdir -p webview_chromium_helper.app mkdir -p webview_chromium_helper.app/Contents/MacOS mkdir -p webview_chromium_helper.app/Contents/Resources - sed -e "s/\$${PRODUCT_NAME}/webview_chromium Helper/" \ + sed -e "s/\$${PRODUCT_NAME}/webview_chromium Helper/" \ -e "s/\$${EXECUTABLE_NAME}/webview_chromium Helper/" helper-Info.plist >webview_chromium_helper.app/Contents/Info.plist /bin/echo "APPL????" >webview_chromium_helper.app/Contents/PkgInfo @@ -39,11 +39,9 @@ - webview_chromium_helper webview.cpp - webview stc adv @@ -58,25 +56,27 @@ ../sample.rc - - - all - $(DLLPREFIX)$(wxwin.mkDllName("webview")).dylib - - mkdir webview_chromium.app/Contents/Frameworks/ - mkdir webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app - cp $(TOP_SRCDIR)lib/$(webviewdll) webview_chromium.app/Contents/Frameworks/ - cp -Rf $(LIBCEF_PATH)/Chromium\ Embedded\ Framework.framework webview_chromium.app/Contents/Frameworks/ - - install_name_tool -change "@executable_path/Chromium Embedded Framework" "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" $(TOP_SRCDIR)lib/$(webviewdll) + + webview_chromium_helper + + + all + $(DLLPREFIX)$(wxwin.mkDllName("webview")).dylib + + mkdir webview_chromium.app/Contents/Frameworks/ + mkdir webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app + cp $(TOP_SRCDIR)lib/$(webviewdll) webview_chromium.app/Contents/Frameworks/ + cp -Rf $(LIBCEF_PATH)/Chromium\ Embedded\ Framework.framework webview_chromium.app/Contents/Frameworks/ + + install_name_tool -change "@executable_path/Chromium Embedded Framework" "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" $(TOP_SRCDIR)lib/$(webviewdll) - - cp -Rf webview_chromium_helper.app/ webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app/ - ./mac/tools/make_more_helpers.sh $(wx_top_builddir)/samples/webview_chromium/webview_chromium.app/Contents/Frameworks webview_chromium - > - > - + + cp -Rf webview_chromium_helper.app/ webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app/ + ./mac/tools/make_more_helpers.sh $(wx_top_builddir)/samples/webview_chromium/webview_chromium.app/Contents/Frameworks webview_chromium + + + + $(LIB_SCINTILLA) From 20f8ded56879fc6072d28ef876209f5b6d9dd800 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 28 Jul 2014 13:27:56 +0800 Subject: [PATCH 076/275] Create an independent webview_chromium library. --- build/bakefiles/files.bkl | 13 +++++++++++++ build/bakefiles/multilib.bkl | 32 ++++++++++++++++++++++++++++++++ src/common/webview.cpp | 8 ++++++++ 3 files changed, 53 insertions(+) diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index a8b5f77812..940765094a 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3147,6 +3147,19 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/gtk/webview_webkit2_extension.cpp + + src/common/webview.cpp + src/common/webviewarchivehandler.cpp + src/common/webviewfshandler.cpp + src/common/webview_chromium.cpp + + + wx/webview.h + wx/webview_chromium.h + wx/webviewarchivehandler.h + wx/webviewfshandler.h + + diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index a653ddbf05..4237e8833f 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -203,7 +203,39 @@ + + + wxUSE_WEBVIEW_CHROMIUM=1 + + WXUSINGDLL + WXMAKINGDLL_WEBVIEW + $(WEBVIEWCHROMIUM_SRC) + $(WEBVIEWCHROMIUM_HDR) + coredll + basedll + $(CEF_INCLUDE_DIR) + $(LIBCEF_PATH) + $(LIBCEF_WRAPPER_PATH) + $(LIBCEF_NAME) + $(LIBCEF_DLL_WRAPPER_NAME) + $(LIBCEF_FRAMEWORK)> + + + + + wxUSE_WEBVIEW_CHROMIUM=1 + + $(WEBVIEWCHROMIUM_SRC) + $(WEBVIEWCHROMIUM_HDR) + $(CEF_INCLUDE_DIR) + + + + webview=webviewlib+webviewdll + webviewchromium=webviewchromiumlib+webviewchromiumdll diff --git a/src/common/webview.cpp b/src/common/webview.cpp index 965576ae65..bce730ecd6 100644 --- a/src/common/webview.cpp +++ b/src/common/webview.cpp @@ -17,6 +17,8 @@ #include "wx/webview.h" +#if !wxUSE_WEBVIEW_CHROMIUM + #if defined(__WXOSX__) #include "wx/osx/webview_webkit.h" #elif defined(__WXGTK__) @@ -25,6 +27,8 @@ #include "wx/msw/webview_ie.h" #endif +#endif + // DLL options compatibility check: #include "wx/app.h" WX_CHECK_BUILD_OPTIONS("wxWEBVIEW") @@ -97,6 +101,8 @@ wxStringWebViewFactoryMap::iterator wxWebView::FindFactory(const wxString &backe // static void wxWebView::InitFactoryMap() { +#if !wxUSE_WEBVIEW_CHROMIUM + #ifdef __WXMSW__ if(m_factoryMap.find(wxWebViewBackendIE) == m_factoryMap.end()) RegisterFactory(wxWebViewBackendIE, wxSharedPtr @@ -106,6 +112,8 @@ void wxWebView::InitFactoryMap() RegisterFactory(wxWebViewBackendWebKit, wxSharedPtr (new wxWebViewFactoryWebKit)); #endif + +#endif } #endif // wxUSE_WEBVIEW From 0d3571e6f96ab65dc6b591db640325c324e57ec8 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 28 Jul 2014 13:43:00 +0800 Subject: [PATCH 077/275] Use new webview_chromium library instead of webview. --- samples/webview_chromium/webview_chromium.bkl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index 232fc5db7e..5fc17879e0 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -42,7 +42,7 @@ webview.cpp - webview + webviewchromium stc adv core From 3ed58ec2b5152c46bf5478d8a1d495bed6df260f Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 28 Jul 2014 13:47:05 +0800 Subject: [PATCH 078/275] Remove chromium related code from webview library. --- build/bakefiles/files.bkl | 2 -- build/bakefiles/multilib.bkl | 7 ------- 2 files changed, 9 deletions(-) diff --git a/build/bakefiles/files.bkl b/build/bakefiles/files.bkl index 940765094a..53cce0cce9 100644 --- a/build/bakefiles/files.bkl +++ b/build/bakefiles/files.bkl @@ -3110,7 +3110,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! src/common/webview.cpp src/common/webviewarchivehandler.cpp src/common/webviewfshandler.cpp - src/common/webview_chromium.cpp $(WEBVIEW_SRC_PLATFORM) @@ -3136,7 +3135,6 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file! wx/webview.h wx/webviewarchivehandler.h wx/webviewfshandler.h - wx/webview_chromium.h $(WEBVIEW_HDR_PLATFORM) diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index 4237e8833f..c1062d04a9 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -186,19 +186,12 @@ basedll $(EXTRALIBS_WEBVIEW) $(WEBVIEW_HDR) - $(CEF_INCLUDE_DIR) - $(LIBCEF_PATH) - $(LIBCEF_WRAPPER_PATH) - $(LIBCEF_NAME) - $(LIBCEF_DLL_WRAPPER_NAME) - $(LIBCEF_FRAMEWORK)> $(WEBVIEW_SRC) $(WEBVIEW_HDR) - $(CEF_INCLUDE_DIR) From 584138ce2cf929abbdd74d2752f318bf975d78c5 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 28 Jul 2014 19:31:12 +0800 Subject: [PATCH 079/275] [Win] Add Visual Studio 2010 webview_chromium library project files. --- build/msw/wx_vc10_webviewchromium.vcxproj | 524 ++++++++++++++++++++++ 1 file changed, 524 insertions(+) create mode 100644 build/msw/wx_vc10_webviewchromium.vcxproj diff --git a/build/msw/wx_vc10_webviewchromium.vcxproj b/build/msw/wx_vc10_webviewchromium.vcxproj new file mode 100644 index 0000000000..cce0ec4fa2 --- /dev/null +++ b/build/msw/wx_vc10_webviewchromium.vcxproj @@ -0,0 +1,524 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + webviewchromium + {BA6DA15A-B722-4296-9E8A-3900B933E57D} + + + + DynamicLibrary + false + Unicode + v100 + + + DynamicLibrary + false + Unicode + v100 + + + DynamicLibrary + false + Unicode + v100 + + + DynamicLibrary + false + Unicode + v100 + + + StaticLibrary + false + Unicode + v100 + + + StaticLibrary + false + Unicode + v100 + + + StaticLibrary + false + Unicode + v100 + + + StaticLibrary + false + Unicode + v100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\cef;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\cef;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\cef;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);..\..\cef\Debug\;..\..\cef\Debug\lib;..\..\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\cef;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);..\..\cef\Release\;..\..\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + true + true + true + true + + + + + + true + true + true + true + true + true + true + true + + + true + true + true + true + true + true + true + true + + + + + + + + + \ No newline at end of file From 069bdd9e1e1a2c63078633df685ef8cee7df73f1 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Mon, 28 Jul 2014 19:55:17 +0800 Subject: [PATCH 080/275] Move cef directory from /cef to /src/cef. --- build/bakefiles/config.bkl | 19 +- build/msw/wx_vc10_webviewchromium.vcxproj | 1048 ++++++++++----------- 2 files changed, 527 insertions(+), 540 deletions(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index 94899b1962..61d6c30de1 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -547,31 +547,18 @@ For example, add "-F pe-i386" here if using 64 bit windres for 32 bit build. - $(TOP_SRCDIR)/cef - - - - Debug - Release + $(TOP_SRCDIR)/src/cef - - $(CEF_INCLUDE_DIR)/$(CONFIGURE)/ - - - $(CEF_INCLUDE_DIR)/Release/ - - - $(CEF_INCLUDE_DIR)/Release/ - + $(CEF_INCLUDE_DIR)/Release/ - $(CEF_INCLUDE_DIR)/out/$(CONFIGURE)/lib/ + $(CEF_INCLUDE_DIR)/out/Release/lib/ $(CEF_INCLUDE_DIR)/xcodebuild/Debug/ diff --git a/build/msw/wx_vc10_webviewchromium.vcxproj b/build/msw/wx_vc10_webviewchromium.vcxproj index cce0ec4fa2..7fd075758f 100644 --- a/build/msw/wx_vc10_webviewchromium.vcxproj +++ b/build/msw/wx_vc10_webviewchromium.vcxproj @@ -1,524 +1,524 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - Release - Win32 - - - Release - x64 - - - - webviewchromium - {BA6DA15A-B722-4296-9E8A-3900B933E57D} - - - - DynamicLibrary - false - Unicode - v100 - - - DynamicLibrary - false - Unicode - v100 - - - DynamicLibrary - false - Unicode - v100 - - - DynamicLibrary - false - Unicode - v100 - - - StaticLibrary - false - Unicode - v100 - - - StaticLibrary - false - Unicode - v100 - - - StaticLibrary - false - Unicode - v100 - - - StaticLibrary - false - Unicode - v100 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - true - true - true - true - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - false - false - true - true - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - - - - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\cef;%(AdditionalIncludeDirectories) - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - $(OutDir)$(TargetName)$(TargetExt) - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\cef;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - true - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - true - MachineX86 - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - $(OutDir)$(TargetName)$(TargetExt) - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);..\..\cef\Debug\;..\..\cef\Debug\lib;..\..\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) - true - MachineX86 - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);%(AdditionalLibraryDirectories) - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);..\..\cef\Release\;..\..\cef\out\Release\lib\;%(AdditionalLibraryDirectories) - false - MachineX86 - true - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);%(AdditionalLibraryDirectories) - false - true - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - Create - Create - Create - Create - Create - Create - Create - Create - - - - - - - - - true - true - true - true - - - - - - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - - - - - - - - - \ No newline at end of file + + + + + Debug + Win32 + + + Debug + x64 + + + DLL Debug + Win32 + + + DLL Debug + x64 + + + DLL Release + Win32 + + + DLL Release + x64 + + + Release + Win32 + + + Release + x64 + + + + webviewchromium + {BA6DA15A-B722-4296-9E8A-3900B933E57D} + + + + DynamicLibrary + false + Unicode + v100 + + + DynamicLibrary + false + Unicode + v100 + + + DynamicLibrary + false + Unicode + v100 + + + DynamicLibrary + false + Unicode + v100 + + + StaticLibrary + false + Unicode + v100 + + + StaticLibrary + false + Unicode + v100 + + + StaticLibrary + false + Unicode + v100 + + + StaticLibrary + false + Unicode + v100 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + true + true + true + true + $(wxOutDir) + $(wxOutDir) + $(wxIntRootDir)$(ProjectName)\ + $(wxIntRootDir)$(ProjectName)\ + false + false + true + true + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitLibNamePrefix)$(ProjectName) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + true + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)lib.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + $(OutDir)$(TargetName)$(TargetExt) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);..\..\src\cef\Release\;..\..\src\cef\Release\lib;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + true + MachineX86 + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);..\..\src\cef\Release\;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + false + MachineX86 + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + Use + wx/wxprec.h + $(IntDir)..\wxprec_$(ProjectName)dll.pch + $(OutDir)$(TargetName).pdb + Level4 + true + AnySuitable + true + Speed + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + 0x0409 + $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) + $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib + true + $(OutDir);%(AdditionalLibraryDirectories) + false + true + true + + + $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc + true + + + + + Create + Create + Create + Create + Create + Create + Create + Create + + + + + + + + + true + true + true + true + + + + + + true + true + true + true + true + true + true + true + + + true + true + true + true + true + true + true + true + + + + + + + + + From 0bbdcfbf813a57986d15f694b086c4fdbb9ea318 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 29 Jul 2014 10:53:50 +0800 Subject: [PATCH 081/275] [Linux] Fix bakefile generation error of webview_chromium sample. --- samples/webview_chromium/webview_chromium.bkl | 36 +++++++++---------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index 5fc17879e0..6dc098ce2d 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -33,7 +33,7 @@ cp -f ../../src/osx/carbon/wxmac.icns webview_chromium_helper.app/Contents/Resources/wxmac.icns - + rm -rf $(id).app @@ -56,26 +56,24 @@ ../sample.rc - + + webview_chromium_helper - - - all - $(DLLPREFIX)$(wxwin.mkDllName("webview")).dylib - - mkdir webview_chromium.app/Contents/Frameworks/ - mkdir webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app - cp $(TOP_SRCDIR)lib/$(webviewdll) webview_chromium.app/Contents/Frameworks/ - cp -Rf $(LIBCEF_PATH)/Chromium\ Embedded\ Framework.framework webview_chromium.app/Contents/Frameworks/ - - install_name_tool -change "@executable_path/Chromium Embedded Framework" "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" $(TOP_SRCDIR)lib/$(webviewdll) + all + $(DLLPREFIX)$(wxwin.mkDllName("webview")).dylib + + mkdir webview_chromium.app/Contents/Frameworks/ + mkdir webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app + cp $(TOP_SRCDIR)lib/$(webviewdll) webview_chromium.app/Contents/Frameworks/ + cp -Rf $(LIBCEF_PATH)/Chromium\ Embedded\ Framework.framework webview_chromium.app/Contents/Frameworks/ + + install_name_tool -change "@executable_path/Chromium Embedded Framework" "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" $(TOP_SRCDIR)lib/$(webviewdll) - - cp -Rf webview_chromium_helper.app/ webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app/ - ./mac/tools/make_more_helpers.sh $(wx_top_builddir)/samples/webview_chromium/webview_chromium.app/Contents/Frameworks webview_chromium - - - + + cp -Rf webview_chromium_helper.app/ webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app/ + ./mac/tools/make_more_helpers.sh $(wx_top_builddir)/samples/webview_chromium/webview_chromium.app/Contents/Frameworks webview_chromium + + $(LIB_SCINTILLA) From 910dead2d038168c36d350fb1841f389f6d1192f Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Tue, 29 Jul 2014 10:57:39 +0800 Subject: [PATCH 082/275] Add USE_WEBVIEW_CHROMIUM option in bkl file to allow build/unbuild webview_chromium library. --- build/bakefiles/config.bkl | 6 ++++++ build/bakefiles/multilib.bkl | 14 +++++--------- configure.in | 1 + 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/build/bakefiles/config.bkl b/build/bakefiles/config.bkl index 61d6c30de1..88c0faa723 100644 --- a/build/bakefiles/config.bkl +++ b/build/bakefiles/config.bkl @@ -234,6 +234,11 @@ Default is to use debug CRT if and only if BUILD==debug. + + - src/common/webview.cpp - src/common/webviewarchivehandler.cpp - src/common/webviewfshandler.cpp src/common/webview_chromium.cpp wx/webview.h wx/webview_chromium.h - wx/webviewarchivehandler.h - wx/webviewfshandler.h diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index 72e0d7a26b..ab530baa6c 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -205,6 +205,7 @@ $(WEBVIEWCHROMIUM_HDR) coredll basedll + webviewdll $(CEF_INCLUDE_DIR) $(LIBCEF_PATH) $(LIBCEF_WRAPPER_PATH) diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index e063ef58b8..c5674510c6 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -45,12 +45,13 @@ webview.cpp wxUSE_WEBVIEW_CHROMIUM=1 + webview webviewchromium stc adv core base - $(LIBCEF_FRAMEWORK)> + $(LIBCEF_FRAMEWORK) -Wl,-rpath,. $(LIBCEF_PATH) @@ -69,6 +70,11 @@ mkdir webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app cp -Rf $(LIBCEF_PATH)/Chromium\ Embedded\ Framework.framework webview_chromium.app/Contents/Frameworks/ + + install_name_tool -change "@executable_path/Chromium Embedded Framework" \ + "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" \ + webview_chromium.app/Contents/MacOS/webview_chromium + cp -Rf webview_chromium_helper.app/ webview_chromium.app/Contents/Frameworks/webview_chromium\ Helper.app/ ./mac/tools/make_more_helpers.sh $(wx_top_builddir)/samples/webview_chromium/webview_chromium.app/Contents/Frameworks \ @@ -83,12 +89,14 @@ package all - $(DLLPREFIX)$(wxwin.mkDllName("webviewchromium")).dylib + $(DLLPREFIX)$(wxwin.mkDllName("webview")).dylib + $(DLLPREFIX)$(wxwin.mkDllName("webviewchromium")).dylib cp $(TOP_SRCDIR)lib/$(webviewdll) webview_chromium.app/Contents/Frameworks/ + cp $(TOP_SRCDIR)lib/$(webviewchromiumdll) webview_chromium.app/Contents/Frameworks/ install_name_tool -change "@executable_path/Chromium Embedded Framework" \ "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" \ - $(TOP_SRCDIR)lib/$(webviewdll) + $(TOP_SRCDIR)lib/$(webviewchromiumdll) > @@ -97,15 +105,4 @@ - - - webview_chromium - all - - install_name_tool -change "@executable_path/Chromium Embedded Framework" \ - "@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework" \ - webview_chromium.app/Contents/MacOS/webview_chromium - - - From 90f2c9f9e71403970b214b9e7438a11e261a7bb5 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Sat, 23 Aug 2014 18:28:09 +0800 Subject: [PATCH 102/275] Update docs. --- interface/wx/webview_chromium.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/interface/wx/webview_chromium.h b/interface/wx/webview_chromium.h index 69e291e0b8..a815765ceb 100644 --- a/interface/wx/webview_chromium.h +++ b/interface/wx/webview_chromium.h @@ -44,6 +44,8 @@ @section instructions Builing Instructions + wxWebViewChromium backend feature is shipped in an extra `libwebview_chromium` which depends on `libwebview`. + __Windows Platform__ wxWidgets provides Visual Stdio 2010/2012/2013 project file to build wxWebViewChromium. @@ -85,7 +87,8 @@ - Reuqire link frameworks: Chromium Embedded Framework.framework, AppKit.frameworks. - Reuqire app bundle configuration: Info.plist - Use system tool `install_name_tool -change` to correct `Chromium Embedded Framework.framework/Chromium Embedded Framework` location. - 4. Create a `Contents/Frameworks` directory in `webviewchromium.app` bundle and copy `helper.app`, `webviewchromium.dylib` and `Chromium Embedded Framework` in it. + 4. Create a `Contents/Frameworks` directory in `webviewchromium.app` bundle and copy `helper.app`, `webviewchromium.dylib`, 'webview.dylib' + and `Chromium Embedded Framework` in it. 5. Use `samples/webview_chromium/mac/tools/make_more_helper.sh` to make sub-process helper app bundles based on `helper` app. @@ -100,6 +103,7 @@ | | | `-- ffmpegsumo.so | | `-- Resources\ | |-- libwx_osx_cocoau_webviewchromium-3.1.dylib <= wxWebviewChromium library supports webviewChromium backend. + | |-- libwx_osx_cocoau_webview-3.1.dylib <= wxWebview library supports other backends. | |-- webview_chromium Helper EH.app <= helper app | | `-- Contents | | |-- Info.plist From e3069bf7ba5e5fbed37ceabef744aca2154e350a Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 28 Aug 2014 12:51:00 +0800 Subject: [PATCH 103/275] [Windows] Update to use the new webviewchromium library. * Update VS2010 project file. * Update webview_chromium sample VS2010 project file. * Introduce a WXDLLIMPEXP_WEBVIEW_CHROMIUM and WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM macro to enable dynamic builds on windows. --- build/bakefiles/multilib.bkl | 2 +- build/msw/wx_vc10_webviewchromium.vcxproj | 14 ++++---------- include/wx/dlimpexp.h | 12 ++++++++++++ include/wx/webview_chromium.h | 6 +++--- .../webview_chromium/webview_chromium_vc10.vcxproj | 12 ++++++------ src/common/webview_chromium.cpp | 2 +- 6 files changed, 27 insertions(+), 21 deletions(-) diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index ab530baa6c..24e0e01f51 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -200,7 +200,7 @@ cond="SHARED=='1' and USE_GUI=='1' and USE_WEBVIEW_CHROMIUM=='1' and MONOLITHIC=='0'"> wxUSE_WEBVIEW_CHROMIUM=1 WXUSINGDLL - WXMAKINGDLL_WEBVIEW + WXMAKINGDLL_WEBVIEW_CHROMIUM $(WEBVIEWCHROMIUM_SRC) $(WEBVIEWCHROMIUM_HDR) coredll diff --git a/build/msw/wx_vc10_webviewchromium.vcxproj b/build/msw/wx_vc10_webviewchromium.vcxproj index a71b20ed73..c5ce5551ef 100644 --- a/build/msw/wx_vc10_webviewchromium.vcxproj +++ b/build/msw/wx_vc10_webviewchromium.vcxproj @@ -309,7 +309,7 @@ /MP %(AdditionalOptions) Disabled $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) Sync EnableFastChecks MultiThreadedDebugDLL @@ -390,7 +390,7 @@ /MP %(AdditionalOptions) MaxSpeed $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) Sync MultiThreadedDLL true @@ -411,7 +411,7 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true $(OutDir);..\..\src\cef\Release\;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) @@ -479,9 +479,6 @@ Create Create - - - @@ -514,11 +511,8 @@ true true - - - - + \ No newline at end of file diff --git a/include/wx/dlimpexp.h b/include/wx/dlimpexp.h index 3412137fdf..d3e027d5ea 100644 --- a/include/wx/dlimpexp.h +++ b/include/wx/dlimpexp.h @@ -84,6 +84,7 @@ # define WXMAKINGDLL_MEDIA # define WXMAKINGDLL_STC # define WXMAKINGDLL_WEBVIEW +# define WXMAKINGDLL_WEBVIEW_CHROMIUM #endif /* WXMAKINGDLL */ /* @@ -267,6 +268,17 @@ # define WXDLLIMPEXP_DATA_WEBVIEW(type) type #endif +#ifdef WXMAKINGDLL_WEBVIEW_CHROMIUM +# define WXDLLIMPEXP_WEBVIEW_CHROMIUM WXEXPORT +# define WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(type) WXEXPORT type +#elif defined(WXUSINGDLL) +# define WXDLLIMPEXP_WEBVIEW_CHROMIUM WXIMPORT +# define WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(type) WXIMPORT type +#else /* not making nor using DLL */ +# define WXDLLIMPEXP_WEBVIEW_CHROMIUM +# define WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(type) type +#endif + /* GCC warns about using __attribute__ (and also __declspec in mingw32 case) on forward declarations while MSVC complains about forward declarations without diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 47fd857c2c..d87d9e9ade 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -29,7 +29,7 @@ #pragma warning(pop) #endif -extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendChromium[]; +extern WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(const char) wxWebViewBackendChromium[]; class wxWebViewChromium; @@ -162,7 +162,7 @@ private: wxSharedPtr m_handler; }; -class WXDLLIMPEXP_WEBVIEW wxWebViewChromium : public wxWebView +class WXDLLIMPEXP_WEBVIEW_CHROMIUM wxWebViewChromium : public wxWebView { public: wxWebViewChromium() {} @@ -296,7 +296,7 @@ private: wxDECLARE_DYNAMIC_CLASS(wxWebViewChromium); }; -class WXDLLIMPEXP_WEBVIEW wxWebViewFactoryChromium : public wxWebViewFactory +class WXDLLIMPEXP_WEBVIEW_CHROMIUM wxWebViewFactoryChromium : public wxWebViewFactory { public: virtual wxWebView* Create() { return new wxWebViewChromium; } diff --git a/samples/webview_chromium/webview_chromium_vc10.vcxproj b/samples/webview_chromium/webview_chromium_vc10.vcxproj index bf93cd1a35..ebe79cfdb1 100644 --- a/samples/webview_chromium/webview_chromium_vc10.vcxproj +++ b/samples/webview_chromium/webview_chromium_vc10.vcxproj @@ -141,7 +141,7 @@ /MP %(AdditionalOptions) MaxSpeed .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) Sync MultiThreadedDLL true @@ -157,7 +157,7 @@ .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) - wxmsw31u_webviewchromium.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + wxmsw31u_webviewchromium.lib;wxmsw31u_webview.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) vc_mswu\webview_chromium.exe true .\..\..\lib\vc_lib;.\..\..\src\cef\Release\;.\..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) @@ -201,7 +201,7 @@ %(AdditionalOptions) - wxmsw31ud_webview.lib;wxmsw31ud_stc.lib;wxmsw31ud_adv.lib;wxmsw31ud_core.lib;wxbase31ud.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintillad.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + wxmsw31ud_webview.lib;wxmsw31ud_webviewchromium.lib;wxmsw31ud_stc.lib;wxmsw31ud_adv.lib;wxmsw31ud_core.lib;wxbase31ud.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintillad.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) vc_mswuddll\webview_chromium.exe true .\..\..\lib\vc_dll;.\..\..\src\cef\Debug\;.\..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) @@ -224,7 +224,7 @@ /MP %(AdditionalOptions) MaxSpeed .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) Sync MultiThreadedDLL true @@ -241,7 +241,7 @@ %(AdditionalOptions) - wxmsw31u_webviewchromium.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + wxmsw31u_webviewchromium.lib;wxmsw31u_webview.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) vc_mswudll\webview_chromium.exe true .\..\..\lib\vc_dll;.\..\..\src\cef\Release\;.\..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) @@ -266,4 +266,4 @@ - + \ No newline at end of file diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 5771a4451e..e32f6e3d30 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -31,7 +31,7 @@ #pragma warning(pop) #endif -extern WXDLLIMPEXP_DATA_WEBVIEW(const char) wxWebViewBackendChromium[] = "wxWebViewChromium"; +extern WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(const char) wxWebViewBackendChromium[] = "wxWebViewChromium"; wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewChromium, wxWebView); From b0af1d72fcf2cfc07b092741292ab22e8222a0c4 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 28 Aug 2014 14:34:07 +0800 Subject: [PATCH 104/275] Remove wxUSE_WEBVIEW_CHROMIUM check in webview.cpp --- src/common/webview.cpp | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/common/webview.cpp b/src/common/webview.cpp index bce730ecd6..965576ae65 100644 --- a/src/common/webview.cpp +++ b/src/common/webview.cpp @@ -17,8 +17,6 @@ #include "wx/webview.h" -#if !wxUSE_WEBVIEW_CHROMIUM - #if defined(__WXOSX__) #include "wx/osx/webview_webkit.h" #elif defined(__WXGTK__) @@ -27,8 +25,6 @@ #include "wx/msw/webview_ie.h" #endif -#endif - // DLL options compatibility check: #include "wx/app.h" WX_CHECK_BUILD_OPTIONS("wxWEBVIEW") @@ -101,8 +97,6 @@ wxStringWebViewFactoryMap::iterator wxWebView::FindFactory(const wxString &backe // static void wxWebView::InitFactoryMap() { -#if !wxUSE_WEBVIEW_CHROMIUM - #ifdef __WXMSW__ if(m_factoryMap.find(wxWebViewBackendIE) == m_factoryMap.end()) RegisterFactory(wxWebViewBackendIE, wxSharedPtr @@ -112,8 +106,6 @@ void wxWebView::InitFactoryMap() RegisterFactory(wxWebViewBackendWebKit, wxSharedPtr (new wxWebViewFactoryWebKit)); #endif - -#endif } #endif // wxUSE_WEBVIEW From 52cf2502caaffa556edbaba43d32521e02b164b2 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 28 Aug 2014 14:45:33 +0800 Subject: [PATCH 105/275] [Win] Fix Debug build error in VS2010. --- build/msw/wx_vc10_webviewchromium.vcxproj | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build/msw/wx_vc10_webviewchromium.vcxproj b/build/msw/wx_vc10_webviewchromium.vcxproj index c5ce5551ef..724e85590f 100644 --- a/build/msw/wx_vc10_webviewchromium.vcxproj +++ b/build/msw/wx_vc10_webviewchromium.vcxproj @@ -329,10 +329,10 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true - $(OutDir);..\..\src\cef\Release\;..\..\src\cef\Release\lib;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + $(OutDir);..\..\src\cef\Debug\;..\..\src\cef\Debug\lib;..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) true MachineX86 @@ -515,4 +515,4 @@ - \ No newline at end of file + From c65280fa3caf6e8ea65d98e4290f9835dac60c04 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 28 Aug 2014 14:48:31 +0800 Subject: [PATCH 106/275] [Windows] Update VS2012&2013 project files. --- build/msw/wx_vc11_webviewchromium.vcxproj | 19 ++++++------------- build/msw/wx_vc12_webviewchromium.vcxproj | 16 +++++----------- 2 files changed, 11 insertions(+), 24 deletions(-) diff --git a/build/msw/wx_vc11_webviewchromium.vcxproj b/build/msw/wx_vc11_webviewchromium.vcxproj index 348259cf44..a7ad278c15 100644 --- a/build/msw/wx_vc11_webviewchromium.vcxproj +++ b/build/msw/wx_vc11_webviewchromium.vcxproj @@ -1,4 +1,4 @@ - + @@ -309,7 +309,7 @@ /MP %(AdditionalOptions) Disabled $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) Sync EnableFastChecks MultiThreadedDebugDLL @@ -329,10 +329,10 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true - $(OutDir);..\..\src\cef\Release\;..\..\src\cef\Release\lib;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + $(OutDir);..\..\src\cef\Debug\;..\..\src\cef\Debug\lib;..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) true MachineX86 @@ -390,7 +390,7 @@ /MP %(AdditionalOptions) MaxSpeed $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) Sync MultiThreadedDLL true @@ -411,7 +411,7 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true $(OutDir);..\..\src\cef\Release\;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) @@ -479,9 +479,6 @@ Create Create - - - @@ -514,12 +511,8 @@ true true - - - - diff --git a/build/msw/wx_vc12_webviewchromium.vcxproj b/build/msw/wx_vc12_webviewchromium.vcxproj index b51b145eb8..114da5e3a6 100644 --- a/build/msw/wx_vc12_webviewchromium.vcxproj +++ b/build/msw/wx_vc12_webviewchromium.vcxproj @@ -309,7 +309,7 @@ /MP %(AdditionalOptions) Disabled $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) Sync EnableFastChecks MultiThreadedDebugDLL @@ -329,10 +329,10 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true - $(OutDir);..\..\src\cef\Release\;..\..\src\cef\Release\lib;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + $(OutDir);..\..\src\cef\Debug\;..\..\src\cef\Debug\lib;..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) true MachineX86 @@ -390,7 +390,7 @@ /MP %(AdditionalOptions) MaxSpeed $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) + WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) Sync MultiThreadedDLL true @@ -411,7 +411,7 @@ %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) + wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib true $(OutDir);..\..\src\cef\Release\;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) @@ -479,9 +479,6 @@ Create Create - - - @@ -514,9 +511,6 @@ true true - - - From bb48281f10c82bfcf07e154254b33131b1d104e8 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Thu, 28 Aug 2014 14:58:48 +0800 Subject: [PATCH 107/275] [Win] Add VS2012&VS2013 build supports for wxWebViewChromium sample. --- .../webview_chromium_vc11.vcxproj | 274 ++++++++++++++++++ .../webview_chromium_vc12.vcxproj | 273 +++++++++++++++++ 2 files changed, 547 insertions(+) create mode 100644 samples/webview_chromium/webview_chromium_vc11.vcxproj create mode 100644 samples/webview_chromium/webview_chromium_vc12.vcxproj diff --git a/samples/webview_chromium/webview_chromium_vc11.vcxproj b/samples/webview_chromium/webview_chromium_vc11.vcxproj new file mode 100644 index 0000000000..9810ae6221 --- /dev/null +++ b/samples/webview_chromium/webview_chromium_vc11.vcxproj @@ -0,0 +1,274 @@ + + + + + Debug + Win32 + + + DLL Debug + Win32 + + + DLL Release + Win32 + + + Release + Win32 + + + + webview_chromium + {7688215B-1082-5681-9D37-E950D6210117} + + + + Application + false + Unicode + v110 + + + Application + false + Unicode + v110 + + + Application + false + Unicode + v110 + + + Application + false + Unicode + v110 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + vc_mswud\ + vc_mswud\webview_chromium\ + true + true + vc_mswu\ + vc_mswu\webview_chromium\ + false + true + vc_mswuddll\ + vc_mswuddll\webview_chromium\ + true + true + vc_mswudll\ + vc_mswudll\webview_chromium\ + false + true + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + .\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + vc_mswud\webview_chromium\ + vc_mswud\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxmsw31ud_webview.lib;wxmsw31ud_webviewchromium.lib;wxmsw31ud_stc.lib;wxmsw31ud_adv.lib;wxmsw31ud_core.lib;wxbase31ud.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintillad.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswud\webview_chromium.exe + true + .\..\..\lib\vc_lib;.\..\..\src\cef\Debug\;.\..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) + true + vc_mswud\webview_chromium.pdb + Windows + MachineX86 + + + vc_mswud\webview_chromium_vc9.bsc + true + + + + + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + vc_mswu\webview_chromium\ + vc_mswu\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + wxmsw31u_webviewchromium.lib;wxmsw31u_webview.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswu\webview_chromium.exe + true + .\..\..\lib\vc_lib;.\..\..\src\cef\Release\;.\..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + true + vc_mswu\webview_chromium.pdb + Windows + MachineX86 + true + true + + + vc_mswu\webview_chromium_vc9.bsc + true + + + + + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + vc_mswuddll\webview_chromium\ + vc_mswuddll\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxmsw31ud_webview.lib;wxmsw31ud_webviewchromium.lib;wxmsw31ud_stc.lib;wxmsw31ud_adv.lib;wxmsw31ud_core.lib;wxbase31ud.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintillad.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswuddll\webview_chromium.exe + true + .\..\..\lib\vc_dll;.\..\..\src\cef\Debug\;.\..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) + true + vc_mswuddll\webview_chromium.pdb + Windows + MachineX86 + + + vc_mswuddll\webview_chromium_vc9.bsc + true + + + + + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + vc_mswudll\webview_chromium\ + vc_mswudll\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxmsw31u_webviewchromium.lib;wxmsw31u_webview.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswudll\webview_chromium.exe + true + .\..\..\lib\vc_dll;.\..\..\src\cef\Release\;.\..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + true + vc_mswudll\webview_chromium.pdb + Windows + MachineX86 + true + true + + + vc_mswudll\webview_chromium_vc9.bsc + true + + + + + + + + + + + + + diff --git a/samples/webview_chromium/webview_chromium_vc12.vcxproj b/samples/webview_chromium/webview_chromium_vc12.vcxproj new file mode 100644 index 0000000000..c0a65984e2 --- /dev/null +++ b/samples/webview_chromium/webview_chromium_vc12.vcxproj @@ -0,0 +1,273 @@ + + + + + Debug + Win32 + + + DLL Debug + Win32 + + + DLL Release + Win32 + + + Release + Win32 + + + + webview_chromium + {7688215B-1082-5681-9D37-E950D6210117} + + + + Application + false + Unicode + v120 + + + Application + false + Unicode + v120 + + + Application + false + Unicode + v120 + + + Application + false + Unicode + v120 + + + + + + + + + + + + + + + + + + + <_ProjectFileVersion>10.0.40219.1 + vc_mswud\ + vc_mswud\webview_chromium\ + true + true + vc_mswu\ + vc_mswu\webview_chromium\ + false + true + vc_mswuddll\ + vc_mswuddll\webview_chromium\ + true + true + vc_mswudll\ + vc_mswudll\webview_chromium\ + false + true + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + AllRules.ruleset + + + + + + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + .\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + vc_mswud\webview_chromium\ + vc_mswud\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_lib\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxmsw31ud_webview.lib;wxmsw31ud_webviewchromium.lib;wxmsw31ud_stc.lib;wxmsw31ud_adv.lib;wxmsw31ud_core.lib;wxbase31ud.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintillad.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswud\webview_chromium.exe + true + .\..\..\lib\vc_lib;.\..\..\src\cef\Debug\;.\..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) + true + vc_mswud\webview_chromium.pdb + Windows + MachineX86 + + + vc_mswud\webview_chromium_vc9.bsc + true + + + + + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + vc_mswu\webview_chromium\ + vc_mswu\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_lib\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + wxmsw31u_webviewchromium.lib;wxmsw31u_webview.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswu\webview_chromium.exe + true + .\..\..\lib\vc_lib;.\..\..\src\cef\Release\;.\..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + true + vc_mswu\webview_chromium.pdb + Windows + MachineX86 + true + true + + + vc_mswu\webview_chromium_vc9.bsc + true + + + + + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + Disabled + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + Sync + EnableFastChecks + MultiThreadedDebugDLL + true + true + vc_mswuddll\webview_chromium\ + vc_mswuddll\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_dll\mswud;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxmsw31ud_webview.lib;wxmsw31ud_webviewchromium.lib;wxmsw31ud_stc.lib;wxmsw31ud_adv.lib;wxmsw31ud_core.lib;wxbase31ud.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintillad.lib;wxtiffd.lib;wxjpegd.lib;wxpngd.lib;wxzlibd.lib;wxregexud.lib;wxexpatd.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswuddll\webview_chromium.exe + true + .\..\..\lib\vc_dll;.\..\..\src\cef\Debug\;.\..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) + true + vc_mswuddll\webview_chromium.pdb + Windows + MachineX86 + + + vc_mswuddll\webview_chromium_vc9.bsc + true + + + + + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + /MP %(AdditionalOptions) + MaxSpeed + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + WIN32;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;wxUSE_WEBVIEW_CHROMIUM=1;%(PreprocessorDefinitions) + Sync + MultiThreadedDLL + true + vc_mswudll\webview_chromium\ + vc_mswudll\webview_chromium.pdb + Level4 + true + ProgramDatabase + + + _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXUSINGDLL;_WINDOWS;NOPCH;%(PreprocessorDefinitions) + 0x0409 + .\..\..\lib\vc_dll\mswu;.\..\..\include;.;.\..\..\samples;.\..\..\src\cef;%(AdditionalIncludeDirectories) + + + %(AdditionalOptions) + wxmsw31u_webviewchromium.lib;wxmsw31u_webview.lib;wxmsw31u_stc.lib;wxmsw31u_adv.lib;wxmsw31u_core.lib;wxbase31u.lib;libcef.lib;libcef_dll_wrapper.lib;wxscintilla.lib;wxtiff.lib;wxjpeg.lib;wxpng.lib;wxzlib.lib;wxregexu.lib;wxexpat.lib;kernel32.lib;user32.lib;gdi32.lib;comdlg32.lib;winspool.lib;winmm.lib;shell32.lib;comctl32.lib;ole32.lib;oleaut32.lib;uuid.lib;rpcrt4.lib;advapi32.lib;wsock32.lib;wininet.lib;%(AdditionalDependencies) + vc_mswudll\webview_chromium.exe + true + .\..\..\lib\vc_dll;.\..\..\src\cef\Release\;.\..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) + true + vc_mswudll\webview_chromium.pdb + Windows + MachineX86 + true + true + + + vc_mswudll\webview_chromium_vc9.bsc + true + + + + + + + + + + + + From f54fdb566b29191ad0eff08fb605471fefc556fc Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Sun, 31 Aug 2014 19:27:22 +0100 Subject: [PATCH 108/275] Update wxWebViewChromium MSW build files. --- build/msw/wx_vc10_webviewchromium.vcxproj | 2 +- build/msw/wx_vc11_webviewchromium.vcxproj | 2 +- build/msw/wx_vc12_webviewchromium.vcxproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build/msw/wx_vc10_webviewchromium.vcxproj b/build/msw/wx_vc10_webviewchromium.vcxproj index 724e85590f..ba2f6d3dd5 100644 --- a/build/msw/wx_vc10_webviewchromium.vcxproj +++ b/build/msw/wx_vc10_webviewchromium.vcxproj @@ -91,7 +91,7 @@ - + diff --git a/build/msw/wx_vc11_webviewchromium.vcxproj b/build/msw/wx_vc11_webviewchromium.vcxproj index a7ad278c15..373451f00b 100644 --- a/build/msw/wx_vc11_webviewchromium.vcxproj +++ b/build/msw/wx_vc11_webviewchromium.vcxproj @@ -91,7 +91,7 @@ - + diff --git a/build/msw/wx_vc12_webviewchromium.vcxproj b/build/msw/wx_vc12_webviewchromium.vcxproj index 114da5e3a6..11af69538e 100644 --- a/build/msw/wx_vc12_webviewchromium.vcxproj +++ b/build/msw/wx_vc12_webviewchromium.vcxproj @@ -91,7 +91,7 @@ - + From eb4bff4cf2c57cc5940629d4b1a6414f430d9064 Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 10 Sep 2014 12:04:13 +0800 Subject: [PATCH 109/275] Update Vistual Studio project files. Remove wx_vc1[012]_webviewchromium files, and use wx_vc_webviewchromium.vcxproj for VS2010/2012/2013 which follows the trunk. --- build/msw/wx_vc10.sln | 5 + build/msw/wx_vc11.sln | 5 + build/msw/wx_vc11_webviewchromium.vcxproj | 518 ------------------ build/msw/wx_vc12.sln | 5 + build/msw/wx_vc12_webviewchromium.vcxproj | 518 ------------------ ...ium.vcxproj => wx_webviewchromium.vcxproj} | 27 +- 6 files changed, 17 insertions(+), 1061 deletions(-) delete mode 100644 build/msw/wx_vc11_webviewchromium.vcxproj delete mode 100644 build/msw/wx_vc12_webviewchromium.vcxproj rename build/msw/{wx_vc10_webviewchromium.vcxproj => wx_webviewchromium.vcxproj} (97%) diff --git a/build/msw/wx_vc10.sln b/build/msw/wx_vc10.sln index f0dd96cc61..a27cc7561a 100644 --- a/build/msw/wx_vc10.sln +++ b/build/msw/wx_vc10.sln @@ -61,6 +61,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_webview.vcxpr {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webviewchromium", "wx_webviewchromium.vcxproj", "{BA6DA15A-B722-4296-9E8A-3900B933E57D}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" ProjectSection(ProjectDependencies) = postProject {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} diff --git a/build/msw/wx_vc11.sln b/build/msw/wx_vc11.sln index 8512ffee51..d45ffe4aef 100644 --- a/build/msw/wx_vc11.sln +++ b/build/msw/wx_vc11.sln @@ -61,6 +61,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_webview.vcxpr {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webviewchromium", "wx_webviewchromium.vcxproj", "{BA6DA15A-B722-4296-9E8A-3900B933E57D}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" ProjectSection(ProjectDependencies) = postProject {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} diff --git a/build/msw/wx_vc11_webviewchromium.vcxproj b/build/msw/wx_vc11_webviewchromium.vcxproj deleted file mode 100644 index 373451f00b..0000000000 --- a/build/msw/wx_vc11_webviewchromium.vcxproj +++ /dev/null @@ -1,518 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - Release - Win32 - - - Release - x64 - - - - webviewchromium - {BA6DA15A-B722-4296-9E8A-3900B933E57D} - - - - DynamicLibrary - false - Unicode - v110 - - - DynamicLibrary - false - Unicode - v110 - - - DynamicLibrary - false - Unicode - v110 - - - DynamicLibrary - false - Unicode - v110 - - - StaticLibrary - false - Unicode - v110 - - - StaticLibrary - false - Unicode - v110 - - - StaticLibrary - false - Unicode - v110 - - - StaticLibrary - false - Unicode - v110 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - true - true - true - true - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - false - false - true - true - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - - - - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - $(OutDir)$(TargetName)$(TargetExt) - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - true - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - true - MachineX86 - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - $(OutDir)$(TargetName)$(TargetExt) - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);..\..\src\cef\Debug\;..\..\src\cef\Debug\lib;..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) - true - MachineX86 - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);%(AdditionalLibraryDirectories) - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);..\..\src\cef\Release\;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) - false - MachineX86 - true - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);%(AdditionalLibraryDirectories) - false - true - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - Create - Create - Create - Create - Create - Create - Create - Create - - - - - - true - true - true - true - - - - - - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - - - - - - diff --git a/build/msw/wx_vc12.sln b/build/msw/wx_vc12.sln index 6b7f680f9a..572fa959d9 100644 --- a/build/msw/wx_vc12.sln +++ b/build/msw/wx_vc12.sln @@ -63,6 +63,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_webview.vcxpr {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webviewchromium", "wx_webviewchromium.vcxproj", "{BA6DA15A-B722-4296-9E8A-3900B933E57D}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" ProjectSection(ProjectDependencies) = postProject {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} diff --git a/build/msw/wx_vc12_webviewchromium.vcxproj b/build/msw/wx_vc12_webviewchromium.vcxproj deleted file mode 100644 index 11af69538e..0000000000 --- a/build/msw/wx_vc12_webviewchromium.vcxproj +++ /dev/null @@ -1,518 +0,0 @@ - - - - - Debug - Win32 - - - Debug - x64 - - - DLL Debug - Win32 - - - DLL Debug - x64 - - - DLL Release - Win32 - - - DLL Release - x64 - - - Release - Win32 - - - Release - x64 - - - - webviewchromium - {BA6DA15A-B722-4296-9E8A-3900B933E57D} - - - - DynamicLibrary - false - Unicode - v120 - - - DynamicLibrary - false - Unicode - v120 - - - DynamicLibrary - false - Unicode - v120 - - - DynamicLibrary - false - Unicode - v120 - - - StaticLibrary - false - Unicode - v120 - - - StaticLibrary - false - Unicode - v120 - - - StaticLibrary - false - Unicode - v120 - - - StaticLibrary - false - Unicode - v120 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - true - true - true - true - $(wxOutDir) - $(wxOutDir) - $(wxIntRootDir)$(ProjectName)\ - $(wxIntRootDir)$(ProjectName)\ - false - false - true - true - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitLibNamePrefix)$(ProjectName) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - $(wxToolkitDllNamePrefix)$(ProjectName)$(wxToolkitDllNameSuffix) - - - - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_LIB;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - $(OutDir)$(TargetName)$(TargetExt) - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - true - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - true - MachineX86 - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_LIB;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)lib.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - $(OutDir)$(TargetName)$(TargetExt) - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);..\..\src\cef\Debug\;..\..\src\cef\Debug\lib;..\..\src\cef\out\Debug\lib\;%(AdditionalLibraryDirectories) - true - MachineX86 - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - Disabled - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - Sync - EnableFastChecks - MultiThreadedDebugDLL - true - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - - - _DEBUG;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);%(AdditionalLibraryDirectories) - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;..\..\src\cef;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW_CHROMIUM;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;$(wxToolkitLibNamePrefix)webview.lib;libcef.lib;libcef_dll_wrapper.lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);..\..\src\cef\Release\;..\..\src\cef\out\Release\lib\;%(AdditionalLibraryDirectories) - false - MachineX86 - true - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - /MP %(AdditionalOptions) - MaxSpeed - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - WIN32;_USRDLL;DLL_EXPORTS;_CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - Sync - MultiThreadedDLL - true - Use - wx/wxprec.h - $(IntDir)..\wxprec_$(ProjectName)dll.pch - $(OutDir)$(TargetName).pdb - Level4 - true - AnySuitable - true - Speed - - - _CRT_SECURE_NO_DEPRECATE=1;_CRT_NON_CONFORMING_SWPRINTFS=1;_SCL_SECURE_NO_WARNINGS=1;__WXMSW__;NDEBUG;_UNICODE;WXBUILDING;WXDLLNAME=$(TargetName);WXUSINGDLL;WXMAKINGDLL_WEBVIEW;%(PreprocessorDefinitions) - 0x0409 - $(OutDir)$(wxIncSubDir);..\..\include;..\..\src\tiff\libtiff;..\..\src\jpeg;..\..\src\png;..\..\src\zlib;..\..\src\regex;..\..\src\expat\lib;%(AdditionalIncludeDirectories) - - - %(AdditionalOptions) - wxtiff$(wxSuffixDebug).lib;wxjpeg$(wxSuffixDebug).lib;wxpng$(wxSuffixDebug).lib;wxzlib$(wxSuffixDebug).lib;wxregex$(wxSuffix).lib;wxexpat$(wxSuffixDebug).lib;$(wxToolkitLibNamePrefix)core.lib;$(wxBaseLibNamePrefix).lib;%(AdditionalDependencies) - $(OutDir)$(wxToolkitLibNamePrefix)$(ProjectName).lib - true - $(OutDir);%(AdditionalLibraryDirectories) - false - true - true - - - $(OutDir)wx_$(wxCompilerPrefix)_$(ProjectName).bsc - true - - - - - Create - Create - Create - Create - Create - Create - Create - Create - - - - - - true - true - true - true - - - - - - true - true - true - true - true - true - true - true - - - true - true - true - true - true - true - true - true - - - - - - diff --git a/build/msw/wx_vc10_webviewchromium.vcxproj b/build/msw/wx_webviewchromium.vcxproj similarity index 97% rename from build/msw/wx_vc10_webviewchromium.vcxproj rename to build/msw/wx_webviewchromium.vcxproj index ba2f6d3dd5..182c120e05 100644 --- a/build/msw/wx_vc10_webviewchromium.vcxproj +++ b/build/msw/wx_webviewchromium.vcxproj @@ -38,61 +38,38 @@ webviewchromium {BA6DA15A-B722-4296-9E8A-3900B933E57D} + DynamicLibrary - false - Unicode - v100 DynamicLibrary - false - Unicode - v100 DynamicLibrary - false - Unicode - v100 DynamicLibrary - false - Unicode - v100 StaticLibrary - false - Unicode - v100 StaticLibrary - false - Unicode - v100 StaticLibrary - false - Unicode - v100 StaticLibrary - false - Unicode - v100 - + From c97e1ec807daeea22d696ec3cf271a731f07505b Mon Sep 17 00:00:00 2001 From: Haojian Wu Date: Wed, 10 Sep 2014 12:13:26 +0800 Subject: [PATCH 110/275] Remove wxWebViewChromium sample xcode project file. --- .../project.pbxproj | 723 ------------------ 1 file changed, 723 deletions(-) delete mode 100644 samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj diff --git a/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj b/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj deleted file mode 100644 index 9065156a1a..0000000000 --- a/samples/webview_chromium/webview_chromium.xcodeproj/project.pbxproj +++ /dev/null @@ -1,723 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 45; - objects = { - -/* Begin PBXBuildFile section */ - 405B1AE010EF25D200676938 /* libwx_osx_cocoa_static.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */; }; - 40AC73361325727300982A5C /* libwx_osx_cocoa.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */; }; - 40AC73371325728400982A5C /* libwx_osx_cocoa.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */; }; - 763672BB19583E83002CC711 /* Chromium Embedded Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; - 763672BC19583EA3002CC711 /* libcef_dll_wrapper.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */; }; - 763672BD19583EC1002CC711 /* webview_chromium Helper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */; }; - 763672BE19583ECF002CC711 /* Chromium Embedded Framework.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; - 769F79321953E1DD00ED92BF /* Chromium Embedded Framework.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; - 769F79331953E1E600ED92BF /* webview_chromium Helper.app in CopyFiles */ = {isa = PBXBuildFile; fileRef = 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */; }; - 769F79351953E46500ED92BF /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 769F79341953E46500ED92BF /* AppKit.framework */; }; - 769F79361953E47100ED92BF /* Chromium Embedded Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; - 769F79371953E48400ED92BF /* libcef_dll_wrapper.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */; }; - 76DA77E21953DF3400E1DD9D /* process_helper_mac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76DA77E11953DF3400E1DD9D /* process_helper_mac.cpp */; }; - 76DA77E41953DF4B00E1DD9D /* webview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76DA77E31953DF4B00E1DD9D /* webview.cpp */; }; - 76DA77E51953DF4B00E1DD9D /* webview.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 76DA77E31953DF4B00E1DD9D /* webview.cpp */; }; - 76DA77E71953DF9800E1DD9D /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77E61953DF9800E1DD9D /* AppKit.framework */; }; - 76DA77E91953DFB200E1DD9D /* libcef_dll_wrapper.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */; }; - 76DA77EB1953DFD200E1DD9D /* Chromium Embedded Framework.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 405B1A8910EF202100676938 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = D2AAC0C705546C1D00DB518D; - remoteInfo = dynamic; - }; - 405B1A8B10EF202100676938 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 404BEE6110EC83280080E2B8; - remoteInfo = static; - }; - 405B1A9010EF207D00676938 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 363401F972C53D8EBD3D4BD9; - remoteInfo = dynamic; - }; - 405B1ADD10EF25B100676938 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = BAB02EC06578349A9171CCAC; - remoteInfo = static; - }; - 763672C219584758002CC711 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = 76DA77D61953DE8200E1DD9D; - remoteInfo = webview_helper; - }; - 769F792F1953E18700ED92BF /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; - proxyType = 1; - remoteGlobalIDString = 76DA77D61953DE8200E1DD9D; - remoteInfo = webview_helper_static; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXCopyFilesBuildPhase section */ - 405B1A9410EF209B00676938 /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 763672BE19583ECF002CC711 /* Chromium Embedded Framework.framework in CopyFiles */, - 763672BD19583EC1002CC711 /* webview_chromium Helper.app in CopyFiles */, - 40AC73371325728400982A5C /* libwx_osx_cocoa.dylib in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 769F79311953E1C700ED92BF /* CopyFiles */ = { - isa = PBXCopyFilesBuildPhase; - buildActionMask = 2147483647; - dstPath = ""; - dstSubfolderSpec = 10; - files = ( - 769F79331953E1E600ED92BF /* webview_chromium Helper.app in CopyFiles */, - 769F79321953E1DD00ED92BF /* Chromium Embedded Framework.framework in CopyFiles */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXCopyFilesBuildPhase section */ - -/* Begin PBXFileReference section */ - 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = wxcocoa.xcodeproj; path = ../../build/osx/wxcocoa.xcodeproj; sourceTree = SOURCE_ROOT; }; - 405B1ACB10EF253300676938 /* webview_chromium.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = webview_chromium.app; sourceTree = BUILT_PRODUCTS_DIR; }; - 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxcocoa.xcconfig; path = ../../build/osx/wxcocoa.xcconfig; sourceTree = SOURCE_ROOT; }; - 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxdebug.xcconfig; path = ../../build/osx/wxdebug.xcconfig; sourceTree = SOURCE_ROOT; }; - 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = wxrelease.xcconfig; path = ../../build/osx/wxrelease.xcconfig; sourceTree = SOURCE_ROOT; }; - 763672B819583DBA002CC711 /* webview_helper_static copy-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; name = "webview_helper_static copy-Info.plist"; path = "/Users/hokein/GitHub/wxWidgets/samples/webview_chromium/webview_helper_static copy-Info.plist"; sourceTree = ""; }; - 769F79341953E46500ED92BF /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "webview_chromium Helper.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 76DA77E11953DF3400E1DD9D /* process_helper_mac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = process_helper_mac.cpp; path = mac/process_helper_mac.cpp; sourceTree = ""; }; - 76DA77E31953DF4B00E1DD9D /* webview.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = webview.cpp; sourceTree = ""; }; - 76DA77E61953DF9800E1DD9D /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.8.sdk/System/Library/Frameworks/AppKit.framework; sourceTree = DEVELOPER_DIR; }; - 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcef_dll_wrapper.a; path = ../../cef/xcodebuild/Debug/libcef_dll_wrapper.a; sourceTree = ""; }; - 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = "Chromium Embedded Framework.framework"; path = "../../cef/Release/Chromium Embedded Framework.framework"; sourceTree = ""; }; - 8D1107320486CEB800E47090 /* webview_chromium.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = webview_chromium.app; sourceTree = BUILT_PRODUCTS_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 405B1AC410EF253300676938 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 769F79371953E48400ED92BF /* libcef_dll_wrapper.a in Frameworks */, - 769F79361953E47100ED92BF /* Chromium Embedded Framework.framework in Frameworks */, - 769F79351953E46500ED92BF /* AppKit.framework in Frameworks */, - 405B1AE010EF25D200676938 /* libwx_osx_cocoa_static.a in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 76DA77DA1953DE8200E1DD9D /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 76DA77EB1953DFD200E1DD9D /* Chromium Embedded Framework.framework in Frameworks */, - 76DA77E91953DFB200E1DD9D /* libcef_dll_wrapper.a in Frameworks */, - 76DA77E71953DF9800E1DD9D /* AppKit.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8D11072E0486CEB800E47090 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 763672BC19583EA3002CC711 /* libcef_dll_wrapper.a in Frameworks */, - 763672BB19583E83002CC711 /* Chromium Embedded Framework.framework in Frameworks */, - 40AC73361325727300982A5C /* libwx_osx_cocoa.dylib in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 19C28FACFE9D520D11CA2CBB /* Products */ = { - isa = PBXGroup; - children = ( - 8D1107320486CEB800E47090 /* webview_chromium.app */, - 405B1ACB10EF253300676938 /* webview_chromium.app */, - 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */, - ); - name = Products; - sourceTree = ""; - }; - 29B97314FDCFA39411CA2CEA /* minimal_cocoa */ = { - isa = PBXGroup; - children = ( - 769F79341953E46500ED92BF /* AppKit.framework */, - 76DA77EA1953DFD200E1DD9D /* Chromium Embedded Framework.framework */, - 76DA77E81953DFB200E1DD9D /* libcef_dll_wrapper.a */, - 76DA77E61953DF9800E1DD9D /* AppKit.framework */, - 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */, - 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */, - 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */, - 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */, - 405B1A9710EF227D00676938 /* src */, - 19C28FACFE9D520D11CA2CBB /* Products */, - 763672B819583DBA002CC711 /* webview_helper_static copy-Info.plist */, - ); - name = minimal_cocoa; - sourceTree = ""; - }; - 405B1A8510EF202100676938 /* Products */ = { - isa = PBXGroup; - children = ( - 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */, - 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */, - ); - name = Products; - sourceTree = ""; - }; - 405B1A9710EF227D00676938 /* src */ = { - isa = PBXGroup; - children = ( - 76DA77E31953DF4B00E1DD9D /* webview.cpp */, - 76DA77E11953DF3400E1DD9D /* process_helper_mac.cpp */, - ); - name = src; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 405B1ABF10EF253300676938 /* webview_chromium_static */ = { - isa = PBXNativeTarget; - buildConfigurationList = 405B1AC810EF253300676938 /* Build configuration list for PBXNativeTarget "webview_chromium_static" */; - buildPhases = ( - 405B1AC210EF253300676938 /* Sources */, - 405B1AC410EF253300676938 /* Frameworks */, - 769F79311953E1C700ED92BF /* CopyFiles */, - 769F79381953E49E00ED92BF /* Fix CEF Link */, - 769F79391953E4C800ED92BF /* Make More Helper */, - 769F793A1953E51600ED92BF /* Match-O flags */, - ); - buildRules = ( - ); - dependencies = ( - 769F79301953E18700ED92BF /* PBXTargetDependency */, - 405B1ADE10EF25B100676938 /* PBXTargetDependency */, - ); - name = webview_chromium_static; - productInstallPath = "$(HOME)/Applications"; - productName = minimal_cocoa; - productReference = 405B1ACB10EF253300676938 /* webview_chromium.app */; - productType = "com.apple.product-type.application"; - }; - 76DA77D61953DE8200E1DD9D /* webview_helper */ = { - isa = PBXNativeTarget; - buildConfigurationList = 76DA77DC1953DE8200E1DD9D /* Build configuration list for PBXNativeTarget "webview_helper" */; - buildPhases = ( - 76DA77D91953DE8200E1DD9D /* Sources */, - 76DA77DA1953DE8200E1DD9D /* Frameworks */, - 76DA77EC1953DFEB00E1DD9D /* Fix CEF Link */, - 76DA77ED1953E02500E1DD9D /* Change Mach-O Flags */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = webview_helper; - productInstallPath = "$(HOME)/Applications"; - productName = minimal_cocoa; - productReference = 76DA77DF1953DE8200E1DD9D /* webview_chromium Helper.app */; - productType = "com.apple.product-type.application"; - }; - 8D1107260486CEB800E47090 /* webview_chromium_dynamic */ = { - isa = PBXNativeTarget; - buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "webview_chromium_dynamic" */; - buildPhases = ( - 8D11072C0486CEB800E47090 /* Sources */, - 8D11072E0486CEB800E47090 /* Frameworks */, - 405B1A9410EF209B00676938 /* CopyFiles */, - 763672BF19583EE0002CC711 /* Fix CEF link */, - 763672C019583F07002CC711 /* Make more helpers */, - 763672C119583F40002CC711 /* Change match-o type */, - ); - buildRules = ( - ); - dependencies = ( - 763672C319584758002CC711 /* PBXTargetDependency */, - 405B1A9110EF207D00676938 /* PBXTargetDependency */, - ); - name = webview_chromium_dynamic; - productInstallPath = "$(HOME)/Applications"; - productName = minimal_cocoa; - productReference = 8D1107320486CEB800E47090 /* webview_chromium.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - 29B97313FDCFA39411CA2CEA /* Project object */ = { - isa = PBXProject; - attributes = { - }; - buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "webview_chromium" */; - compatibilityVersion = "Xcode 3.1"; - developmentRegion = English; - hasScannedForEncodings = 1; - knownRegions = ( - English, - Japanese, - French, - German, - ); - mainGroup = 29B97314FDCFA39411CA2CEA /* minimal_cocoa */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 405B1A8510EF202100676938 /* Products */; - ProjectRef = 405B1A8410EF202100676938 /* wxcocoa.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - 8D1107260486CEB800E47090 /* webview_chromium_dynamic */, - 405B1ABF10EF253300676938 /* webview_chromium_static */, - 76DA77D61953DE8200E1DD9D /* webview_helper */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 405B1A8A10EF202100676938 /* libwx_osx_cocoa.dylib */ = { - isa = PBXReferenceProxy; - fileType = "compiled.mach-o.dylib"; - path = libwx_osx_cocoa.dylib; - remoteRef = 405B1A8910EF202100676938 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 405B1A8C10EF202100676938 /* libwx_osx_cocoa_static.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = libwx_osx_cocoa_static.a; - remoteRef = 405B1A8B10EF202100676938 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXShellScriptBuildPhase section */ - 763672BF19583EE0002CC711 /* Fix CEF link */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", - ); - name = "Fix CEF link"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec install_name_tool -change \"@executable_path/Chromium Embedded Framework\" \"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework\" \"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}\"\nexit 1"; - showEnvVarsInLog = 0; - }; - 763672C019583F07002CC711 /* Make more helpers */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", - ); - name = "Make more helpers"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec ../../cef/tools/make_more_helpers.sh Frameworks webview_chromium\nexit 1"; - showEnvVarsInLog = 0; - }; - 763672C119583F40002CC711 /* Change match-o type */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", - ); - name = "Change match-o type"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec ../../cef/tools/change_mach_o_flags_from_xcode.sh\nexit 1\n"; - showEnvVarsInLog = 0; - }; - 769F79381953E49E00ED92BF /* Fix CEF Link */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", - ); - name = "Fix CEF Link"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec install_name_tool -change \"@executable_path/Chromium Embedded Framework\" \"@executable_path/../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework\" \"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}\"\nexit 1"; - showEnvVarsInLog = 0; - }; - 769F79391953E4C800ED92BF /* Make More Helper */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", - ); - name = "Make More Helper"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec ../../cef/tools/make_more_helpers.sh Frameworks webview_chromium\nexit 1\n"; - showEnvVarsInLog = 0; - }; - 769F793A1953E51600ED92BF /* Match-O flags */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", - ); - name = "Match-O flags"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec ../../cef/tools/change_mach_o_flags_from_xcode.sh\nexit 1\n"; - showEnvVarsInLog = 0; - }; - 76DA77EC1953DFEB00E1DD9D /* Fix CEF Link */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", - ); - name = "Fix CEF Link"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec install_name_tool -change \"@executable_path/Chromium Embedded Framework\" \"@executable_path/../../../../Frameworks/Chromium Embedded Framework.framework/Chromium Embedded Framework\" \"${BUILT_PRODUCTS_DIR}/${EXECUTABLE_PATH}\"\nexit 1\n"; - showEnvVarsInLog = 0; - }; - 76DA77ED1953E02500E1DD9D /* Change Mach-O Flags */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - "$(BUILT_PRODUCTS_DIR)/$(EXECUTABLE_PATH)", - ); - name = "Change Mach-O Flags"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "exec ../../cef/tools/change_mach_o_flags_from_xcode.sh\nexit 1\n"; - showEnvVarsInLog = 0; - }; -/* End PBXShellScriptBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 405B1AC210EF253300676938 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 76DA77E51953DF4B00E1DD9D /* webview.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 76DA77D91953DE8200E1DD9D /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 76DA77E21953DF3400E1DD9D /* process_helper_mac.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - 8D11072C0486CEB800E47090 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 76DA77E41953DF4B00E1DD9D /* webview.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 405B1A9110EF207D00676938 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = dynamic; - targetProxy = 405B1A9010EF207D00676938 /* PBXContainerItemProxy */; - }; - 405B1ADE10EF25B100676938 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = static; - targetProxy = 405B1ADD10EF25B100676938 /* PBXContainerItemProxy */; - }; - 763672C319584758002CC711 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 76DA77D61953DE8200E1DD9D /* webview_helper */; - targetProxy = 763672C219584758002CC711 /* PBXContainerItemProxy */; - }; - 769F79301953E18700ED92BF /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - target = 76DA77D61953DE8200E1DD9D /* webview_helper */; - targetProxy = 769F792F1953E18700ED92BF /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 405B1AC910EF253300676938 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/Release\"", - ); - INFOPLIST_FILE = "webview_chromium-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/xcodebuild/Debug\"", - ); - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS)", - "-Wl,-pie", - ); - PRODUCT_NAME = webview_chromium; - USER_HEADER_SEARCH_PATHS = "\"$(WXROOT)/include\" \"$(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include\" \"$(WXROOT)/src/zlib\" \"$(WXROOT)/src/jpeg\" \"$(WXROOT)/src/png\" \"$(WXROOT)/src/regex\" \"$(WXROOT)/src/expat/lib\" \"$(WXROOT)/src/tiff/libtiff\" \"$(WXROOT)/src/stc/scintilla/src\" \"$(WXROOT)/src/stc/scintilla/include\" \"$(WXROOT)/src/stc/scintilla/lexlib\" \"$(WXROOT)/cef\""; - }; - name = Debug; - }; - 405B1ACA10EF253300676938 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/Release\"", - ); - INFOPLIST_FILE = "webview_chromium-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/xcodebuild/Release\"", - ); - OTHER_LDFLAGS = ( - "$(OTHER_LDFLAGS)", - "-Wl,-pie", - ); - PRODUCT_NAME = webview_chromium; - USER_HEADER_SEARCH_PATHS = "\"$(WXROOT)/include\" \"$(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include\" \"$(WXROOT)/src/zlib\" \"$(WXROOT)/src/jpeg\" \"$(WXROOT)/src/png\" \"$(WXROOT)/src/regex\" \"$(WXROOT)/src/expat/lib\" \"$(WXROOT)/src/tiff/libtiff\" \"$(WXROOT)/src/stc/scintilla/src\" \"$(WXROOT)/src/stc/scintilla/include\" \"$(WXROOT)/src/stc/scintilla/lexlib\" \"$(WXROOT)/cef\""; - }; - name = Release; - }; - 76DA77DD1953DE8200E1DD9D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/Debug\"", - ); - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ""; - INFOPLIST_FILE = "helper-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/xcodebuild/Debug\"", - ); - OTHER_LDFLAGS = "-Wl,-pie"; - PRODUCT_NAME = "webview_chromium Helper"; - SDKROOT = macosx10.8; - USER_HEADER_SEARCH_PATHS = "\"$(WXROOT)/cef\""; - }; - name = Debug; - }; - 76DA77DE1953DE8200E1DD9D /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/Release\"", - ); - GCC_PRECOMPILE_PREFIX_HEADER = NO; - GCC_PREFIX_HEADER = ""; - GCC_PREPROCESSOR_DEFINITIONS = ""; - INFOPLIST_FILE = "helper-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/xcodebuild/Release\"", - ); - OTHER_LDFLAGS = "-Wl,-pie"; - PRODUCT_NAME = "webview_chromium Helper"; - SDKROOT = macosx10.8; - USER_HEADER_SEARCH_PATHS = "\"$(WXROOT)/cef\""; - }; - name = Release; - }; - C01FCF4B08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; - buildSettings = { - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/Release\"", - ); - INFOPLIST_FILE = "webview_chromium-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - /Users/hokein/GitHub/wxWidgets/build/osx/Build/Products/Debug, - /Users/hokein/GitHub/wxWidgets/cef/xcodebuild/Debug, - ); - OTHER_LDFLAGS = ( - "-framework", - WebKit, - "-framework", - IOKit, - "-framework", - Carbon, - "-framework", - Cocoa, - "-framework", - AudioToolbox, - "-framework", - OpenGL, - "-framework", - QTKit, - "-Wl,-pie", - ); - PRODUCT_NAME = webview_chromium; - SDKROOT = macosx10.8; - USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include \"$(WXROOT)/cef/\""; - }; - name = Debug; - }; - C01FCF4C08A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 407A752213B0E1EB006BC2D5 /* wxcocoa.xcconfig */; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - FRAMEWORK_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/Release\"", - ); - INFOPLIST_FILE = "webview_chromium-Info.plist"; - LIBRARY_SEARCH_PATHS = ( - "$(inherited)", - "\"$(WXROOT)/cef/xcodebuild/Release\"", - ); - OTHER_LDFLAGS = ( - "-framework", - WebKit, - "-framework", - IOKit, - "-framework", - Carbon, - "-framework", - Cocoa, - "-framework", - AudioToolbox, - "-framework", - OpenGL, - "-framework", - QTKit, - "-Wl,-pie", - ); - PRODUCT_NAME = webview_chromium; - SDKROOT = macosx10.8; - USER_HEADER_SEARCH_PATHS = "$(WXROOT)/include $(WXROOT)/build/osx/setup/$(WXTOOLKIT)/include \"$(WXROOT)/cef/\""; - }; - name = Release; - }; - C01FCF4F08A954540054247B /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 407A752313B0E1EB006BC2D5 /* wxdebug.xcconfig */; - buildSettings = { - INFOPLIST_FILE = Info_cocoa.plist; - WXROOT = "$(PROJECT_DIR)/../.."; - }; - name = Debug; - }; - C01FCF5008A954540054247B /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 407A752413B0E1EB006BC2D5 /* wxrelease.xcconfig */; - buildSettings = { - INFOPLIST_FILE = Info_cocoa.plist; - WXROOT = "$(PROJECT_DIR)/../.."; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 405B1AC810EF253300676938 /* Build configuration list for PBXNativeTarget "webview_chromium_static" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 405B1AC910EF253300676938 /* Debug */, - 405B1ACA10EF253300676938 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - 76DA77DC1953DE8200E1DD9D /* Build configuration list for PBXNativeTarget "webview_helper" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 76DA77DD1953DE8200E1DD9D /* Debug */, - 76DA77DE1953DE8200E1DD9D /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "webview_chromium_dynamic" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4B08A954540054247B /* Debug */, - C01FCF4C08A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - C01FCF4E08A954540054247B /* Build configuration list for PBXProject "webview_chromium" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - C01FCF4F08A954540054247B /* Debug */, - C01FCF5008A954540054247B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; -} From 8a0bb51f8070299873054f8eeb9914b90beabea9 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Sat, 13 Sep 2014 07:17:59 +0100 Subject: [PATCH 111/275] Tidy up wxWebViewChromium documentation. --- interface/wx/webview_chromium.h | 92 +++++---------------------------- 1 file changed, 13 insertions(+), 79 deletions(-) diff --git a/interface/wx/webview_chromium.h b/interface/wx/webview_chromium.h index a815765ceb..5a92d732db 100644 --- a/interface/wx/webview_chromium.h +++ b/interface/wx/webview_chromium.h @@ -140,6 +140,9 @@ class wxWebViewChromium : public wxWebView { public: + /** + wxWebViewChromium constructor, arguments as per wxWebView::New. + */ wxWebViewChromium(wxWindow* parent, wxWindowID id, const wxString& url = wxWebViewDefaultURLStr, @@ -148,85 +151,16 @@ public: long style = 0, const wxString& name = wxWebViewNameStr); - void OnSize(wxSizeEvent &event); - - void SetPageSource(const wxString& pageSource); - - void SetPageText(const wxString& pageText); - - bool Create(wxWindow* parent, - wxWindowID id, - const wxString& url = wxWebViewDefaultURLStr, - const wxPoint& pos = wxDefaultPosition, - const wxSize& size = wxDefaultSize, - long style = 0, - const wxString& name = wxWebViewNameStr); - - virtual void LoadURL(const wxString& url); - virtual void LoadHistoryItem(wxSharedPtr item); - virtual wxVector > GetBackwardHistory(); - virtual wxVector > GetForwardHistory(); - - virtual bool CanGoForward() const; - virtual bool CanGoBack() const; - virtual void GoBack(); - virtual void GoForward(); - virtual void ClearHistory(); - virtual void EnableHistory(bool enable = true); - virtual void Stop(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); - - virtual wxString GetPageSource() const; - virtual wxString GetPageText() const; - - virtual bool IsBusy() const; - virtual wxString GetCurrentURL() const; - virtual wxString GetCurrentTitle() const; - - virtual void SetZoomType(wxWebViewZoomType type); - virtual wxWebViewZoomType GetZoomType() const; - virtual bool CanSetZoomType(wxWebViewZoomType type) const; - - virtual void Print(); - - virtual wxWebViewZoom GetZoom() const; - virtual void SetZoom(wxWebViewZoom zoom); - - virtual void* GetNativeBackend() const; - - virtual long Find(const wxString& text, int flags = wxWEBVIEW_FIND_DEFAULT) { return wxNOT_FOUND; } - - //Clipboard functions - virtual bool CanCut() const { return true; } - virtual bool CanCopy() const { return true; } - virtual bool CanPaste() const { return true; } - virtual void Cut(); - virtual void Copy(); - virtual void Paste(); - - //Undo / redo functionality - virtual bool CanUndo() const { return true; } - virtual bool CanRedo() const { return true; } - virtual void Undo(); - virtual void Redo(); - - //Editing functions - virtual void SetEditable(bool enable = true); - virtual bool IsEditable() const { return false; } - - //Selection - virtual void SelectAll(); - virtual bool HasSelection() const { return false; } - virtual void DeleteSelection(); - virtual wxString GetSelectedText() const { return ""; } - virtual wxString GetSelectedSource() const { return ""; } - virtual void ClearSelection(); - - virtual void RunScript(const wxString& javascript); - - //Virtual Filesystem Support - virtual void RegisterHandler(wxSharedPtr handler); - + /** + Creation function for two-step creation. + */ + virtual bool Create(wxWindow* parent, + wxWindowID id, + const wxString& url = wxWebViewDefaultURLStr, + const wxPoint& pos = wxDefaultPosition, + const wxSize& size = wxDefaultSize, + long style = 0, + const wxString& name = wxWebViewNameStr); /** StartUp function for Windows platform. From 0347008aa30099c02eb3e90a8628133d9542ab19 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Sun, 19 Oct 2014 09:05:39 +0100 Subject: [PATCH 112/275] Build system fixes for wxWebViewChromium. --- build/bakefiles/Bakefiles.bkgen | 7 ++++++- build/bakefiles/build_cfg.bkl | 1 + build/bakefiles/common.bkl | 3 +++ build/bakefiles/multilib.bkl | 11 +++-------- build/bakefiles/wxpresets/presets/wx.bkl | 3 ++- build/bakefiles/wxpresets/presets/wx_win32.bkl | 2 ++ build/bakefiles/wxwin.py | 6 ++++-- samples/samples.bkl | 9 ++++++++- samples/webview_chromium/webview_chromium.bkl | 3 +-- 9 files changed, 30 insertions(+), 15 deletions(-) diff --git a/build/bakefiles/Bakefiles.bkgen b/build/bakefiles/Bakefiles.bkgen index e715f0b1ee..183a17ad3b 100644 --- a/build/bakefiles/Bakefiles.bkgen +++ b/build/bakefiles/Bakefiles.bkgen @@ -56,6 +56,11 @@ autoconf,borland,dmars_smake,dmars,mingw,watcom + + + borland,mingw,msevc4prj,msvs2003prj,msvs2005prj,msvs2008prj + + -Iformats @@ -234,7 +239,7 @@ gnu - + gnu >$(BUILD_CFG_FILE) @echo USE_STC=$(USE_STC) >>$(BUILD_CFG_FILE) @echo USE_WEBVIEW=$(USE_WEBVIEW) >>$(BUILD_CFG_FILE) + @echo USE_WEBVIEW_CHROMIUM=$(USE_WEBVIEW_CHROMIUM) >>$(BUILD_CFG_FILE) @echo USE_XRC=$(USE_XRC) >>$(BUILD_CFG_FILE) @echo COMPILER=$(COMPILER) >>$(BUILD_CFG_FILE) @echo COMPILER_VERSION=$(COMPILER_VERSION) >>$(BUILD_CFG_FILE) diff --git a/build/bakefiles/common.bkl b/build/bakefiles/common.bkl index 5febc1ac6e..d82dd1f1ab 100644 --- a/build/bakefiles/common.bkl +++ b/build/bakefiles/common.bkl @@ -184,6 +184,9 @@ $(mk.evalExpr(wxwin.mkLibName('webview'))) + + $(mk.evalExpr(wxwin.mkLibName('webview_chromium'))) + $(mk.evalExpr(wxwin.mkLibName('mono'))) diff --git a/build/bakefiles/multilib.bkl b/build/bakefiles/multilib.bkl index 24e0e01f51..42b2a303b0 100644 --- a/build/bakefiles/multilib.bkl +++ b/build/bakefiles/multilib.bkl @@ -197,8 +197,7 @@ - wxUSE_WEBVIEW_CHROMIUM=1 + cond="SHARED=='1' and USE_GUI=='1' and USE_WEBVIEW_CHROMIUM=='1' and MONOLITHIC=='0' and FORMAT=='autoconf'"> WXUSINGDLL WXMAKINGDLL_WEBVIEW_CHROMIUM $(WEBVIEWCHROMIUM_SRC) @@ -215,17 +214,13 @@ - wxUSE_WEBVIEW_CHROMIUM=1 + cond="SHARED=='0' and USE_GUI=='1' and USE_WEBVIEW_CHROMIUM=='1' and MONOLITHIC=='0' and FORMAT=='autoconf'"> $(WEBVIEWCHROMIUM_SRC) $(WEBVIEWCHROMIUM_HDR) $(CEF_INCLUDE_DIR) - - - webview=webviewlib+webviewdll - webviewchromium=webviewchromiumlib+webviewchromiumdll + diff --git a/build/bakefiles/wxpresets/presets/wx.bkl b/build/bakefiles/wxpresets/presets/wx.bkl index 529212d65c..6d40c84c70 100644 --- a/build/bakefiles/wxpresets/presets/wx.bkl +++ b/build/bakefiles/wxpresets/presets/wx.bkl @@ -88,6 +88,7 @@ NOTE: as a reference here is a list of all wxWidgets libraries satisfying the dependency constraints mentioned in description: + webview_chromium webview richtext aui @@ -124,7 +125,7 @@ tag definitions. --> - base core net xml xrc html adv media gl qa aui ribbon propgrid richtext stc webview + base core net xml xrc html adv media gl qa aui ribbon propgrid richtext stc webview webview_chromium @@ -210,6 +211,7 @@ $(WXLIB_PROPGRID_NAME) $(WXLIB_RICHTEXT_NAME) $(WXLIB_WEBVIEW_NAME) + $(WXLIB_WEBVIEW_CHROMIUM_NAME) diff --git a/build/bakefiles/wxwin.py b/build/bakefiles/wxwin.py index d1e7cc541a..2ea0007be7 100644 --- a/build/bakefiles/wxwin.py +++ b/build/bakefiles/wxwin.py @@ -39,11 +39,13 @@ def mk_wxid(id): # All libs that are part of the main library: MAIN_LIBS = ['mono', 'base', 'core', 'adv', 'html', 'xml', 'net', 'webview', - 'media', 'qa', 'xrc', 'aui', 'ribbon', 'propgrid', 'richtext', 'stc'] + 'media', 'qa', 'xrc', 'aui', 'ribbon', 'propgrid', 'richtext', 'stc', + 'webview_chromium'] # List of library names/ids for categories with different names: LIBS_NOGUI = ['xml', 'net'] LIBS_GUI = ['core', 'adv', 'html', 'gl', 'qa', 'xrc', 'media', - 'aui', 'propgrid', 'richtext', 'stc', 'ribbon', 'webview'] + 'aui', 'propgrid', 'richtext', 'stc', 'ribbon', 'webview', + 'webview_chromium'] # Additional libraries that must be linked in: EXTRALIBS = { 'gl' : '$(EXTRALIBS_OPENGL)', diff --git a/samples/samples.bkl b/samples/samples.bkl index 93411ec871..2121379201 100644 --- a/samples/samples.bkl +++ b/samples/samples.bkl @@ -89,7 +89,6 @@ - @@ -108,4 +107,12 @@ + + + + + diff --git a/samples/webview_chromium/webview_chromium.bkl b/samples/webview_chromium/webview_chromium.bkl index c5674510c6..d9997a79ce 100644 --- a/samples/webview_chromium/webview_chromium.bkl +++ b/samples/webview_chromium/webview_chromium.bkl @@ -44,9 +44,8 @@ webview.cpp - wxUSE_WEBVIEW_CHROMIUM=1 + webview_chromium webview - webviewchromium stc adv core From bce2c1d82d6c35e22f108e7634261757c3724de9 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Wed, 29 Oct 2014 16:49:10 +0000 Subject: [PATCH 113/275] Documentation updates for wxWebViewChromium. --- docs/doxygen/mainpages/libs.h | 7 ++ interface/wx/webview_chromium.h | 126 ++++++++++++++++---------------- 2 files changed, 69 insertions(+), 64 deletions(-) diff --git a/docs/doxygen/mainpages/libs.h b/docs/doxygen/mainpages/libs.h index 84a566bbd3..84cbd78df1 100644 --- a/docs/doxygen/mainpages/libs.h +++ b/docs/doxygen/mainpages/libs.h @@ -41,6 +41,7 @@ digraph Dependencies wxSTC [fillcolor = green, URL = "\ref page_libs_wxstc"]; wxXRC [fillcolor = green, URL = "\ref page_libs_wxxrc"]; wxWebView [fillcolor = green, URL = "\ref page_libs_wxwebview"]; + wxWebViewChromium [fillcolor = green, URL = "\ref page_libs_wxwebview_chromium"]; wxCore -> wxBase; wxNet -> wxBase; @@ -58,6 +59,7 @@ digraph Dependencies wxSTC -> wxCore; wxXRC -> wxAdvanced; wxXRC -> wxHTML; wxXRC -> wxXML; wxWebView -> wxCore; + wxWebViewChromium -> wxWebView; } @enddot @@ -196,6 +198,11 @@ The wxWebView library contains the wxWebView control and its associated classes. Requires @ref page_libs_wxcore, @ref page_libs_wxbase. +@section page_libs_wxwebview_chromium wxWebViewChromium + +The wxWebViewChromium library contains the wxWebViewChromium backend. + +Requires @ref page_libs_wxwebview. @section page_libs_wxxml wxXML diff --git a/interface/wx/webview_chromium.h b/interface/wx/webview_chromium.h index 5a92d732db..a243b7f394 100644 --- a/interface/wx/webview_chromium.h +++ b/interface/wx/webview_chromium.h @@ -8,90 +8,74 @@ /** @class wxWebViewChromium - wxWebViewChromium is a Chromium backend base on Chromium Embedded Framework(CEF3), - which uses the same rendering engine with Google Chrome Browser. The current - CEF3 required version is 3.1750.1738. This backend is available for - MSW/Linux/Mac OS X port. Custom schemes and virtual file systems are also supported. + wxWebViewChromium is a Chromium backend for wxWebView based on the + Chromium Embedded Framework(CEF3). The current CEF3 required version is + 3.1750.1738. This backend is available for Windows, Linux and OS X only. - @section differences API Differences + @section requirements CEF3 Requirements - wxWebViewChromium aims to support the full wxWebView API, but there are some features - unsupported by CEF3 API, see the following differences. - - - GetSelectedSource/GetSelectedText: return "" - - HasSelection: Not supported by CEF3, return false - - IsEditable: Not supported by CEF3, return false - - CanUndo/CanRedo/CanCut/CanCopy/CanPaste: Not supported by CEF3, return true - - Find: return -1 - - @section requirements Requirements - - Chromium Embedded Framework: 3.1750.1738. - - On Windows platform, you will need to change the vistual stdio building - properties of `libcef_dll_wrapper` to consistent with wxWidgets, see following steps: + If you are compiling your own copy of CEF3 then your compile flags must + match those you are using to compile wxWidgets. Specifically on Windows + it is likely you will need to adjust the following properties in the CEF3 + provided build files: - C/C++ - General - Treat Warngings as Error - No - C/C++ - Code Generation - Runtime Library - Multithreaded [Debug] DLL - C/C++ - Code Generation - Enable C++ Exceptions - Yes - C/C++ - Language - Enable Run-Time Type Information - Yes - On Linux platform, some dependency libraries are required to install, including build-essential, - libgtk2.0-dev, libgtkglext1-dev and libnss3-dev. + @section instructions Build Instructions - 1. Download cef3 binary and extract it to wxWidgets src directory.(/src/cef is default directory) - 2. Build libcef_dll_wrapper static library. + __General__ - @section instructions Builing Instructions - - wxWebViewChromium backend feature is shipped in an extra `libwebview_chromium` which depends on `libwebview`. + The wxWebViewChromium backend is built into a seperate webview_chromium + library which depends on the webview library. - __Windows Platform__ - - wxWidgets provides Visual Stdio 2010/2012/2013 project file to build wxWebViewChromium. - - 1. Set `wxUSE_WEBVIEW_CHROMIUM` to 1 in `wx_root/include/wx/msw/setup0.h` to enable wxWebViewChromium feature. - 2. Open `build/msw/wc_vc10.sln` project file in Visual Stdio 2010, and build `wxWidgets` library. - 3. Open `samples/webview_chromium/webview_chromium_vc10.vcxproj` file in Visual Stdio 2010, and build it. - 4. Copy CEF3 related resources(libcef.dll, libffmpegsumo.so, locales/\*, cef.apk, devtools_resources.pak) to webview_chromium binary directory. - - __Linux Platform__ - - wxWebviewChromium feature is disabled defaultly in makefile build, you should enable it through `enable-webviewchromium` option. - - 1. Regenerate the building files by running `bakefile_gen -f autoconf` command under `build/bakefiles` directory. - 2. Run `./autogen.sh` under ``. - 3. Run `./configure --enable-webviewchromium` and `make` commands. - 4. Copy CEF3 related resources as above step5 in windows Platform. + Once you have a copy of CEF3, either from compiling it yourself or using + prebuild binaries you should copy it into `wx_root/src/cef`. To run the + webview_chromium sample you need to copy the CEF3 resources into the + sample directory. + + When builing wxWidgets you need to enusre wxWebViewChromium is enabled, + either by passing --enable-webviewchromium for autoconf based builds or + setting wxUSE_WEBVIEW_CHROMIUM equal to one in setup.h for Visual Studio + based builds. __Mac OS X Platform__ - Require OS X 10.8 or above. Support makefile builds the same as Linux platfrom mentioned above. + OS X 10.8 or above is required. - Due to the application bundle structure on OS X, wxWebviewChromium is a little complicated than Windows/Linux platforms. - We need an extra `helper` application for executing separate other chromim processes(renderer, plugin, etc), so they - have separated app bundles and Info.plist. - - For application using webviewChromium, below are details steps, you can retrieve it in `webview_chromium.bkl` - (samples/webview_chromium/webview_chromium.bkl) files: - - 1. Build webviewchromium library. - - Use system tool `install_name_tool -change` to correct `Chromium Embedded Framework.framework/Chromium Embedded Framework` location. + Due to the application bundle structure on OS X, wxWebviewChromium is a + little complicated than on Windows/Linux platforms. An extra helper + application for executing separate Chromium processes(renderer, plugin, + etc) is required. + + For applications using wxWebviewChromium below are details steps to make + is worked, based off the webview_chromium sample bakefile. + + 1. Build the webview_chromium library. + - Use system tool `install_name_tool -change` to correct `Chromium + Embedded Framework.framework/Chromium Embedded Framework` location. 2. Compiled/link/package the `helper` app: - Require `process_helper_mac.cpp` - - Reuqire link frameworks: Chromium Embedded Framework.framework, AppKit.frameworks. + - Reuqire link frameworks: Chromium Embedded Framework.framework, + AppKit.frameworks. - Reuqire app bundle configuration: Info.plist - - Use system tool `install_name_tool -change` to correct `Chromium Embedded Framework.framework/Chromium Embedded Framework` location. + - Use system tool `install_name_tool -change` to correct `Chromium + Embedded Framework.framework/Chromium Embedded Framework` location. 3. Compiled/link/package the `webviewchromium` app: - Require `webview.cpp` - - Reuqire link frameworks: Chromium Embedded Framework.framework, AppKit.frameworks. + - Reuqire link frameworks: Chromium Embedded Framework.framework, + AppKit.frameworks. - Reuqire app bundle configuration: Info.plist - - Use system tool `install_name_tool -change` to correct `Chromium Embedded Framework.framework/Chromium Embedded Framework` location. - 4. Create a `Contents/Frameworks` directory in `webviewchromium.app` bundle and copy `helper.app`, `webviewchromium.dylib`, 'webview.dylib' - and `Chromium Embedded Framework` in it. - 5. Use `samples/webview_chromium/mac/tools/make_more_helper.sh` to make sub-process helper app bundles based on `helper` app. - - + - Use system tool `install_name_tool -change` to correct `Chromium + Embedded Framework.framework/Chromium Embedded Framework` location. + 4. Create a `Contents/Frameworks` directory in `webviewchromium.app` bundle + and copy `helper.app`, `webviewchromium.dylib`, 'webview.dylib' + and `Chromium Embedded Framework` into it. + 5. Use `samples/webview_chromium/mac/tools/make_more_helper.sh` to make + sub-process helper app bundles based on `helper` app. + Below is the wxWebviewChromium sample app bundle directory structure: webview_chromium.app @@ -134,7 +118,21 @@ |-- PkgInfo `-- Resources `-- wxmac.icns <= resources. - + + @section differences API Differences + + wxWebViewChromium aims to support the full wxWebView API, but there are + some features which are currently unsupported by the CEF3 API, these are: + + - GetSelectedSource/GetSelectedText: returns "" + - HasSelection: returns false + - IsEditable: returns false + - CanUndo/CanRedo/CanCut/CanCopy/CanPaste: returns true + - Find: returns -1 + + @since 3.1.0 + @library{wxwebview_chromium} + @category{webview} **/ class wxWebViewChromium : public wxWebView From ace8f9259c9dc91dfdc602ba1f379b08c38a3677 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Sun, 1 Feb 2015 10:10:20 +0000 Subject: [PATCH 114/275] Add support for CEF 1916. --- src/common/webview_chromium.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index e32f6e3d30..d200c23512 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -139,8 +139,10 @@ wxWebViewChromium::~wxWebViewChromium() CefRefPtr browser = m_clientHandler->GetBrowser(); if ( browser.get() ) { +#if CHROME_VERSION_BUILD < 1916 // Let the browser window know we are about to destroy it. browser->GetHost()->ParentWindowWillClose(); +#endif } } From 5101c8ed6697b960717e40e7868bd0ce02613547 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Sun, 1 Feb 2015 10:24:23 +0000 Subject: [PATCH 115/275] Add support for CEF 2062. --- include/wx/webview_chromium.h | 8 ++++++++ src/common/webview_chromium.cpp | 13 ++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index d87d9e9ade..616a2b3724 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -24,6 +24,10 @@ #include "include/cef_browser.h" #include "include/cef_client.h" #include "include/cef_scheme.h" +#include "include/cef_version.h" +#if CHROME_VERSION_BUILD >= 2062 +#include "include/base/cef_lock.h" +#endif #ifdef __VISUALC__ #pragma warning(pop) @@ -140,7 +144,11 @@ private: size_t m_offset; IMPLEMENT_REFCOUNTING(SchemeHandler); +#if CHROME_VERSION_BUILD >= 2062 + base::Lock m_lock; +#else IMPLEMENT_LOCKING(SchemeHandler); +#endif }; class SchemeHandlerFactory : public CefSchemeHandlerFactory diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index d200c23512..b977535bb1 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -25,7 +25,6 @@ #include "include/cef_app.h" #include "include/cef_browser.h" #include "include/cef_string_visitor.h" -#include "include/cef_version.h" #ifdef __VISUALC__ #pragma warning(pop) @@ -735,7 +734,11 @@ bool SchemeHandler::ProcessRequest(CefRefPtr request, { bool handled = false; - AutoLock lock_scope( this ); +#if CHROME_VERSION_BUILD >= 2062 + base::AutoLock lock_scope(m_lock); +#else + AutoLock lock_scope(this); +#endif std::string url = request->GetURL(); wxFSFile* file = m_handler->GetFile( url ); @@ -782,7 +785,11 @@ bool SchemeHandler::ReadResponse(void* data_out, bool has_data = false; bytes_read = 0; - AutoLock lock_scope( this ); +#if CHROME_VERSION_BUILD >= 2062 + base::AutoLock lock_scope(m_lock); +#else + AutoLock lock_scope(this); +#endif if ( m_offset < m_data.length() ) { From 8e52ae6a91fc91ccbbdf33f1c198cc7b1fefa907 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Sun, 1 Feb 2015 12:08:34 +0000 Subject: [PATCH 116/275] Update wxWebViewChromium documentation. - Add supported CEF versions. - Clarify required runtime files. --- interface/wx/webview_chromium.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/interface/wx/webview_chromium.h b/interface/wx/webview_chromium.h index a243b7f394..811a29c5d8 100644 --- a/interface/wx/webview_chromium.h +++ b/interface/wx/webview_chromium.h @@ -9,7 +9,7 @@ @class wxWebViewChromium wxWebViewChromium is a Chromium backend for wxWebView based on the - Chromium Embedded Framework(CEF3). The current CEF3 required version is + Chromium Embedded Framework (CEF3). The current CEF3 required version is 3.1750.1738. This backend is available for Windows, Linux and OS X only. @section requirements CEF3 Requirements @@ -19,11 +19,13 @@ it is likely you will need to adjust the following properties in the CEF3 provided build files: - - C/C++ - General - Treat Warngings as Error - No - C/C++ - Code Generation - Runtime Library - Multithreaded [Debug] DLL - C/C++ - Code Generation - Enable C++ Exceptions - Yes - C/C++ - Language - Enable Run-Time Type Information - Yes + The following release branches of CEF have been tested: 1650, 1750, 1916, + 2062 and 2171. + @section instructions Build Instructions __General__ @@ -34,11 +36,15 @@ Once you have a copy of CEF3, either from compiling it yourself or using prebuild binaries you should copy it into `wx_root/src/cef`. To run the webview_chromium sample you need to copy the CEF3 resources into the - sample directory. + sample directory. The following files need to be copied: + + - The shared objects in the wx_root/src/cef/Debug or + wx_root/src/cef/Release folder, depending on your build type. + - The contents of the wx_root/src/cef/Resources folder. When builing wxWidgets you need to enusre wxWebViewChromium is enabled, either by passing --enable-webviewchromium for autoconf based builds or - setting wxUSE_WEBVIEW_CHROMIUM equal to one in setup.h for Visual Studio + setting wxUSE_WEBVIEW_CHROMIUM equal to 1 in setup.h for Visual Studio based builds. __Mac OS X Platform__ From 7d236bfa319a5eb7546b1385a25c9d9b680b0fac Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Sun, 1 Feb 2015 12:11:29 +0000 Subject: [PATCH 117/275] Increase speed of wxWebViewChromium timer. --- samples/webview_chromium/webview.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index d69a129996..81cc07afda 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -535,8 +535,7 @@ WebFrame::WebFrame(const wxString& url) : Connect(wxID_ANY, wxEVT_TIMER, wxTimerEventHandler(WebFrame::OnTimer), NULL, this); m_timer = new wxTimer(this); - // Running each 100 milliseconds. - m_timer->Start(100); + m_timer->Start(25); } WebFrame::~WebFrame() From 919aeed16c7eb4a66b7ef405eeac1afe7d87ac82 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Thu, 12 Feb 2015 21:01:19 +0000 Subject: [PATCH 118/275] Typo fixes in wxWebViewChromium docs. --- interface/wx/webview_chromium.h | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/interface/wx/webview_chromium.h b/interface/wx/webview_chromium.h index 811a29c5d8..9d24bbfd37 100644 --- a/interface/wx/webview_chromium.h +++ b/interface/wx/webview_chromium.h @@ -30,11 +30,11 @@ __General__ - The wxWebViewChromium backend is built into a seperate webview_chromium + The wxWebViewChromium backend is built into a separate webview_chromium library which depends on the webview library. Once you have a copy of CEF3, either from compiling it yourself or using - prebuild binaries you should copy it into `wx_root/src/cef`. To run the + prebuilt binaries you should copy it into `wx_root/src/cef`. To run the webview_chromium sample you need to copy the CEF3 resources into the sample directory. The following files need to be copied: @@ -42,7 +42,7 @@ wx_root/src/cef/Release folder, depending on your build type. - The contents of the wx_root/src/cef/Resources folder. - When builing wxWidgets you need to enusre wxWebViewChromium is enabled, + When building wxWidgets you need to ensure wxWebViewChromium is enabled, either by passing --enable-webviewchromium for autoconf based builds or setting wxUSE_WEBVIEW_CHROMIUM equal to 1 in setup.h for Visual Studio based builds. @@ -73,7 +73,7 @@ - Require `webview.cpp` - Reuqire link frameworks: Chromium Embedded Framework.framework, AppKit.frameworks. - - Reuqire app bundle configuration: Info.plist + - Require app bundle configuration: Info.plist - Use system tool `install_name_tool -change` to correct `Chromium Embedded Framework.framework/Chromium Embedded Framework` location. 4. Create a `Contents/Frameworks` directory in `webviewchromium.app` bundle @@ -182,7 +182,7 @@ public: /** Shutdown CEF - The function should be callde before client application exits. + The function should be called before client application exits. Since there is a bug of CEF3, the behavior is different between Mac OS X with Linux/Windows platforms. On Mac OS X, it should @@ -192,12 +192,12 @@ public: static void Shutdown(); /** - Run CEF3 messageloop once. + Run the CEF3 message loop once. - The client app using wxWebviewChromium should integrate CEF messageloop in - its own messageloop to give CEF3 a chance to run. + The client app using wxWebviewChromium should integrate the CEF message + loop in its own message loop to give CEF3 a chance to run. - Developer can integrate the messageloop through the following two ways: + Developers can integrate the message loop through the following two ways: 1. Implement wxApp::ProcessIdle @code class WebApp From 40f79082322402a692e15c5f7a265a479bc4815a Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Thu, 12 Feb 2015 21:05:47 +0000 Subject: [PATCH 119/275] Update wxWebViewChromium copyright dates. --- include/wx/webview_chromium.h | 2 +- samples/webview_chromium/mac/process_helper_mac.cpp | 2 +- samples/webview_chromium/mac/webview_chromium-Info.plist | 2 +- samples/webview_chromium/webview.cpp | 2 +- src/common/webview_chromium.cpp | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 616a2b3724..2d90cc3070 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Author: Steven Lamerton -// Copyright: (c) 2013 Steven Lamerton +// Copyright: (c) 2013 -2015 Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/webview_chromium/mac/process_helper_mac.cpp b/samples/webview_chromium/mac/process_helper_mac.cpp index d09469e164..a3876d14d8 100644 --- a/samples/webview_chromium/mac/process_helper_mac.cpp +++ b/samples/webview_chromium/mac/process_helper_mac.cpp @@ -3,7 +3,7 @@ // Purpose: webview_chromium launch helper // Author: Haojian Wu // Created: 2014-06-22 -// Copyright: (c) 2014 wxWidgets development team +// Copyright: (c) 2014 - 2015 wxWidgets development team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/samples/webview_chromium/mac/webview_chromium-Info.plist b/samples/webview_chromium/mac/webview_chromium-Info.plist index 0782319334..ac1fd6ea00 100644 --- a/samples/webview_chromium/mac/webview_chromium-Info.plist +++ b/samples/webview_chromium/mac/webview_chromium-Info.plist @@ -34,7 +34,7 @@ CFBundleVersion 3.1.0 NSHumanReadableCopyright - Copyright 2005-2014 wxWidgets + Copyright 2005-2015 wxWidgets NSPrincipalClass wxNSApplication diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 81cc07afda..1b7eef7456 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -3,7 +3,7 @@ // Purpose: wxWebView sample // Author: Marianne Gagnon // Id: $Id: webview.cpp 73453 2013-02-01 09:38:53Z SJL $ -// Copyright: (c) 2010 Marianne Gagnon, Steven Lamerton +// Copyright: (c) 2010 - 2015 Marianne Gagnon, Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index b977535bb1..1b58b9efb0 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -1,6 +1,6 @@ ///////////////////////////////////////////////////////////////////////////// // Author: Steven Lamerton -// Copyright: (c) 2013 Steven Lamerton +// Copyright: (c) 2013 - 2015 Steven Lamerton // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// From 6b314420ecabd559096fdd036b40811b980b52e5 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Thu, 12 Feb 2015 21:14:10 +0000 Subject: [PATCH 120/275] wxWebViewChromium style fixes. --- src/common/webview_chromium.cpp | 29 +++++++++++------------------ 1 file changed, 11 insertions(+), 18 deletions(-) diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 1b58b9efb0..ef2b37d0cd 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -37,11 +37,13 @@ wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewChromium, wxWebView); class wxStringVisitor : public CefStringVisitor { public: - enum StringType { + enum StringType + { PAGE_SOURCE, PAGE_TEXT, }; - wxStringVisitor(wxWebViewChromium* webview, StringType type) : m_type(type), m_webview(webview) {} + wxStringVisitor(wxWebViewChromium* webview, StringType type) : + m_type(type), m_webview(webview) {} void Visit(const CefString& string) { switch(m_type) @@ -68,14 +70,6 @@ bool wxWebViewChromium::Create(wxWindow* parent, long style, const wxString& name) { -#ifdef __WXMSW__ - if ( !wxControl::Create(parent, id, pos, size, style, - wxDefaultValidator, name) ) - { - return false; - } -#endif - #ifdef __WXGTK__ style |= wxHSCROLL | wxVSCROLL; if ( !PreCreation( parent, pos, size ) || @@ -84,10 +78,12 @@ bool wxWebViewChromium::Create(wxWindow* parent, wxFAIL_MSG( wxT("wxWebViewChromium creation failed") ); return false; } -#endif - -#ifdef __WXOSX__ - wxControl::Create(parent, id, pos, size, style, wxDefaultValidator, name); +#else + if ( !wxControl::Create(parent, id, pos, size, style, + wxDefaultValidator, name) ) + { + return false; + } #endif m_historyLoadingFromList = false; @@ -449,7 +445,7 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, CefMainArgs args(argc, argv); #endif // If there is no subprocess then we need to execute on this process - if ( path == "" ) + if ( path.empty() ) { #if CHROME_VERSION_BUILD >= 1750 code = CefExecuteProcess(args, NULL, NULL); @@ -469,9 +465,6 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, settings.log_severity = LOGSEVERITY_INFO; CefString(&settings.log_file).FromASCII("./debug.log"); #endif - // We use a multithreaded message loop so we don't have to integrate - // with the wx message loop - //settings.multi_threaded_message_loop = true; CefString(&settings.browser_subprocess_path) = path.ToStdString(); #if CHROME_VERSION_BUILD >= 1750 From 0ceba8cc593ee6664dfac9adf7fbf2dced51cff9 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Sat, 14 Feb 2015 20:13:47 +0000 Subject: [PATCH 121/275] List wxWebView backends in configure output --- configure.in | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/configure.in b/configure.in index fc07ca1642..5421da5d20 100644 --- a/configure.in +++ b/configure.in @@ -8399,7 +8399,22 @@ echo " zlib ${wxUSE_ZLIB}" echo " expat ${wxUSE_EXPAT}" echo " libmspack ${wxUSE_LIBMSPACK}" echo " sdl ${wxUSE_LIBSDL}" -echo " webview_chromium ${wxUSE_WEBVIEW_CHROMIUM}" +echo $ECHO_N " webview ${wxUSE_WEBVIEW}$ECHO_C" +if test "$wxUSE_WEBVIEW" = "yes"; then + echo $ECHO_N " (with backends:$ECHO_C" + if test "$wxUSE_WEBVIEW_WEBKIT" = "yes"; then + echo $ECHO_N " WebKit$ECHO_C" + fi + if test "$wxUSE_WEBVIEW_IE" = "yes"; then + echo $ECHO_N " IE$ECHO_C" + fi + if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then + echo $ECHO_N " Chromium$ECHO_C" + fi + echo ")" +else + echo +fi echo "" dnl vi: set et sts=4 sw=4 com=\:dnl: From af3d5e293a137d25f3dd7c12bea2acb7d0fd1460 Mon Sep 17 00:00:00 2001 From: Steven Lamerton Date: Sun, 15 Feb 2015 11:11:35 +0000 Subject: [PATCH 122/275] Improve wxWebView configure script backend searching - Only disable wxWebView if no backends are present - Check for Chromium headers if enabled - Remove some unused variables --- configure.in | 83 ++++++++++++++++++++++++++++------------------------ 1 file changed, 45 insertions(+), 38 deletions(-) diff --git a/configure.in b/configure.in index 5421da5d20..378edfc63a 100644 --- a/configure.in +++ b/configure.in @@ -7152,7 +7152,9 @@ if test "$wxUSE_RICHTEXT" = "yes"; then fi if test "$wxUSE_WEBVIEW" = "yes"; then - USE_WEBVIEW_WEBKIT=0 + dnl Work through the backends and see if any are available, if not then + dnl disable wxWebView and print a warning. + FOUND_WEBVIEW_BACKEND=0 USE_WEBVIEW_WEBKIT2=0 if test "$wxUSE_WEBVIEW_WEBKIT" = "yes"; then if test "$wxUSE_GTK" = 1; then @@ -7174,15 +7176,17 @@ if test "$wxUSE_WEBVIEW" = "yes"; then webkitgtk="webkitgtk-${TOOLKIT_VERSION}.0" fi PKG_CHECK_MODULES([WEBKIT], - [$webkitgtk >= 1.3.1], - [ - USE_WEBVIEW_WEBKIT=1 + [$webkitgtk >= 1.3.1], + [ + FOUND_WEBVIEW_BACKEND=1 + AC_DEFINE(wxUSE_WEBVIEW_WEBKIT) CPPFLAGS="$CPPFLAGS $WEBKIT_CFLAGS" EXTRALIBS_WEBVIEW="$WEBKIT_LIBS" - ], - [ - AC_MSG_WARN([webkitgtk not found.]) - ]) + ], + [ + wxUSE_WEBVIEW_WEBKIT="no" + AC_MSG_WARN([WebKitGTK+ not found]) + ]) fi elif test "$wxUSE_MAC" = 1 -a "$USE_DARWIN" = 1; then dnl Under Mac we always have the libraries but check for the @@ -7191,10 +7195,12 @@ if test "$wxUSE_WEBVIEW" = "yes"; then CPPFLAGS="-x objective-c++ $CPPFLAGS" AC_CHECK_HEADER([WebKit/HIWebView.h], [ - USE_WEBVIEW_WEBKIT=1 + FOUND_WEBVIEW_BACKEND=1 + AC_DEFINE(wxUSE_WEBVIEW_WEBKIT) WEBKIT_LINK="-framework WebKit" ], [ + wxUSE_WEBVIEW_WEBKIT="no" AC_MSG_WARN([WebKit headers not found]) ], [ @@ -7205,38 +7211,39 @@ if test "$wxUSE_WEBVIEW" = "yes"; then fi fi - wxUSE_WEBVIEW="no" - if test "$wxUSE_GTK" = 1 -o "$wxUSE_MAC" = 1; then - if test "$USE_WEBVIEW_WEBKIT" = 1; then - wxUSE_WEBVIEW="yes" - AC_DEFINE(wxUSE_WEBVIEW_WEBKIT) - elif test "$USE_WEBVIEW_WEBKIT2" = 1; then - wxUSE_WEBVIEW="yes" - AC_DEFINE(wxUSE_WEBVIEW_WEBKIT2) - else - AC_MSG_WARN([WebKit not available, disabling wxWebView]) - fi - elif test "$wxUSE_MSW" = 1; then - if test "$wxUSE_WEBVIEW_IE" = "yes"; then - dnl TODO: Check for the required headers/libraries under Windows - dnl too and do the right thing automatically there too. - wxUSE_WEBVIEW="yes" - AC_DEFINE(wxUSE_WEBVIEW_IE) - fi + if test "$wxUSE_MSW" = 1 -a "$wxUSE_WEBVIEW_IE" = "yes"; then + dnl TODO: Check for the required headers/libraries under Windows + dnl too and do the right thing automatically there too. + FOUND_WEBVIEW_BACKEND=1 + AC_DEFINE(wxUSE_WEBVIEW_IE) + else + wxUSE_WEBVIEW_IE="no" fi -fi - -if test "$wxUSE_WEBVIEW" = "yes"; then - USE_WEBVIEW=1 - AC_DEFINE(wxUSE_WEBVIEW) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then - USE_WEBVIEW_CHROMIUM=1 - AC_DEFINE(wxUSE_WEBVIEW_CHROMIUM) - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview_chromium" + dnl Search for the Chromium headers in src/cef + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I$srcdir/src/cef $CPPFLAGS" + AC_CHECK_HEADER([include/cef_version.h], + [ + FOUND_WEBVIEW_BACKEND=1 + AC_DEFINE(wxUSE_WEBVIEW_CHROMIUM) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview_chromium" + ], + [ + wxUSE_WEBVIEW_CHROMIUM="no" + AC_MSG_WARN([Chromium headers not found]) + ], + []) + CPPFLAGS="$old_CPPFLAGS" + fi + if test "$FOUND_WEBVIEW_BACKEND" = 1; then + wxUSE_WEBVIEW="yes" + AC_DEFINE(wxUSE_WEBVIEW) + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" + else + wxUSE_WEBVIEW="no" + AC_MSG_WARN([No wxWebView backends found, disabling wxWebView]) fi -else - USE_WEBVIEW=0 fi dnl --------------------------------------------------------------------------- From 2ca4d08bea2cbffd9def2de865822b268e3ad9db Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Wed, 31 Jan 2018 22:26:57 +0100 Subject: [PATCH 123/275] Add webviewchromium library to VC14 and VC15 solution files --- build/msw/wx_vc14.sln | 5 +++++ build/msw/wx_vc15.sln | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/build/msw/wx_vc14.sln b/build/msw/wx_vc14.sln index f384886c5d..e67e05817b 100644 --- a/build/msw/wx_vc14.sln +++ b/build/msw/wx_vc14.sln @@ -63,6 +63,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_webview.vcxpr {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webviewchromium", "wx_webviewchromium.vcxproj", "{BA6DA15A-B722-4296-9E8A-3900B933E57D}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" ProjectSection(ProjectDependencies) = postProject {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} diff --git a/build/msw/wx_vc15.sln b/build/msw/wx_vc15.sln index f1aa83c830..275a3629d7 100644 --- a/build/msw/wx_vc15.sln +++ b/build/msw/wx_vc15.sln @@ -63,6 +63,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webview", "wx_webview.vcxpr {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} EndProjectSection EndProject +Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "webviewchromium", "wx_webviewchromium.vcxproj", "{BA6DA15A-B722-4296-9E8A-3900B933E57D}" + ProjectSection(ProjectDependencies) = postProject + {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} = {6744DAD8-9C70-574A-BFF2-9F8DDDB24A75} + EndProjectSection +EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "qa", "wx_qa.vcxproj", "{E21129E0-7C08-5936-9D8C-0D60B5319BA7}" ProjectSection(ProjectDependencies) = postProject {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} = {3E6DCA27-5FA3-53EC-BBD6-2D42294B7AE6} From fdfc13202c707cf6b5feb2052bf152acc9cf1009 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Wed, 31 Jan 2018 22:37:09 +0100 Subject: [PATCH 124/275] Add CEF folder to gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 9486205356..152d027436 100644 --- a/.gitignore +++ b/.gitignore @@ -319,6 +319,8 @@ /src/*.opt /src/*.plg +/src/cef + # /src/common/ /src/common/y_tab.c From 9e0020732c994560e5765241e8f27fd023c447c7 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Wed, 31 Jan 2018 22:41:52 +0100 Subject: [PATCH 125/275] Change wxWebViewChromium::RunScript to current API Returning a value is currently not supported and will return false --- include/wx/webview_chromium.h | 2 +- src/common/webview_chromium.cpp | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 2d90cc3070..1efb2e03fb 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -262,7 +262,7 @@ public: virtual wxString GetSelectedSource() const { return ""; } virtual void ClearSelection(); - virtual void RunScript(const wxString& javascript); + virtual bool RunScript(const wxString& javascript, wxString* output = NULL) wxOVERRIDE; //Virtual Filesystem Support virtual void RegisterHandler(wxSharedPtr handler); diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index ef2b37d0cd..873b61da7d 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -343,10 +343,15 @@ void wxWebViewChromium::ClearSelection() RunScript(jsclear); } -void wxWebViewChromium::RunScript(const wxString& javascript) +bool wxWebViewChromium::RunScript(const wxString& javascript, wxString* output) { m_clientHandler->GetBrowser()->GetMainFrame()->ExecuteJavaScript(javascript.ToStdString(), "", 0); + // Returning a result is currently unsupported + if (output) + return false; + else + return true; } bool wxWebViewChromium::IsBusy() const From 98a91eef40b499dc0e9ae5cfddd014b6832f8149 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Thu, 1 Feb 2018 20:27:11 +0100 Subject: [PATCH 126/275] Use single code base for webview_chromium and webview sample While extra project/build files are required because of extra linked libraries the core UI source only needs a few small tweaks. --- samples/webview/webview.cpp | 74 +- samples/webview_chromium/refresh.xpm | 234 ------ samples/webview_chromium/stop.xpm | 331 -------- samples/webview_chromium/webview.cpp | 1100 +------------------------- samples/webview_chromium/wxlogo.xpm | 84 -- 5 files changed, 84 insertions(+), 1739 deletions(-) delete mode 100644 samples/webview_chromium/refresh.xpm delete mode 100644 samples/webview_chromium/stop.xpm delete mode 100644 samples/webview_chromium/wxlogo.xpm diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp index 362f2bc60b..75f657ed4f 100644 --- a/samples/webview/webview.cpp +++ b/samples/webview/webview.cpp @@ -21,7 +21,8 @@ #include "wx/wx.h" #endif -#if !wxUSE_WEBVIEW_WEBKIT && !wxUSE_WEBVIEW_WEBKIT2 && !wxUSE_WEBVIEW_IE +#if !wxUSE_WEBVIEW_WEBKIT && !wxUSE_WEBVIEW_WEBKIT2 && !wxUSE_WEBVIEW_IE && \ + !wxUSE_WEBVIEW_CHROMIUM #error "A wxWebView backend is required by this sample" #endif @@ -39,6 +40,11 @@ #include "wx/filesys.h" #include "wx/fs_arc.h" #include "wx/fs_mem.h" +#include "wx/timer.h" + +#ifdef wxWEBVIEW_SAMPLE_CHROMIUM +#include "wx/webview_chromium.h" +#endif #ifndef wxHAS_IMAGES_IN_RESOURCES #include "../sample.xpm" @@ -71,6 +77,7 @@ public: } virtual bool OnInit() wxOVERRIDE; + virtual int OnExit() wxOVERRIDE; #if wxUSE_CMDLINE_PARSER virtual void OnInitCmdLine(wxCmdLineParser& parser) wxOVERRIDE @@ -105,6 +112,7 @@ public: virtual ~WebFrame(); void UpdateState(); + void OnTimer(wxTimerEvent& evt); void OnIdle(wxIdleEvent& evt); void OnUrl(wxCommandEvent& evt); void OnBack(wxCommandEvent& evt); @@ -164,11 +172,17 @@ public: void OnFindText(wxCommandEvent& evt); void OnFindOptions(wxCommandEvent& evt); void OnEnableContextMenu(wxCommandEvent& evt); + void OnClose(wxCloseEvent& evt); private: wxTextCtrl* m_url; wxWebView* m_browser; +#ifdef wxWEBVIEW_SAMPLE_CHROMIUM + // A timer to run CEF message loop. + wxTimer* m_timer; +#endif + wxToolBar* m_toolbar; wxToolBarToolBase* m_toolbar_back; wxToolBarToolBase* m_toolbar_forward; @@ -254,6 +268,18 @@ wxIMPLEMENT_APP(WebApp); bool WebApp::OnInit() { +#ifdef wxWEBVIEW_SAMPLE_CHROMIUM + // We spawn a separate subprocess + int code = 0; +#ifdef __WXMSW__ + if(!wxWebViewChromium::StartUp(code, "")) +#else + if(!wxWebViewChromium::StartUp(code, "", + wxApp::argc, wxApp::argv)) +#endif + exit(code); +#endif // wxWEBVIEW_SAMPLE_CHROMIUM + if ( !wxApp::OnInit() ) return false; @@ -284,6 +310,14 @@ bool WebApp::OnInit() return true; } +int WebApp::OnExit() +{ +#if defined(wxWEBVIEW_SAMPLE_CHROMIUM) && (defined(__WXMSW__) || defined(__WXGTK__)) + wxWebViewChromium::Shutdown(); +#endif + return wxApp::OnExit(); +} + WebFrame::WebFrame(const wxString& url) : wxFrame(NULL, wxID_ANY, "wxWebView Sample") { @@ -366,7 +400,14 @@ WebFrame::WebFrame(const wxString& url) : topsizer->Add(m_info, wxSizerFlags().Expand()); // Create the webview +#ifdef wxWEBVIEW_SAMPLE_CHROMIUM + wxWebView::RegisterFactory(wxWebViewBackendChromium, wxSharedPtr + (new wxWebViewFactoryChromium)); + + m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxSize(800, 525), wxWebViewBackendChromium); +#else m_browser = wxWebView::New(this, wxID_ANY, url); +#endif topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1)); //We register the wxfs:// protocol for testing purposes @@ -608,6 +649,13 @@ WebFrame::WebFrame(const wxString& url) : //Connect the idle events Connect(wxID_ANY, wxEVT_IDLE, wxIdleEventHandler(WebFrame::OnIdle), NULL, this); + Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, wxCloseEventHandler(WebFrame::OnClose), NULL, this); + Connect(wxID_ANY, wxEVT_TIMER, wxTimerEventHandler(WebFrame::OnTimer), NULL, this); + +#ifdef wxWEBVIEW_SAMPLE_CHROMIUM + m_timer = new wxTimer(this); + m_timer->Start(25); +#endif } WebFrame::~WebFrame() @@ -637,6 +685,13 @@ void WebFrame::UpdateState() m_url->SetValue( m_browser->GetCurrentURL() ); } +void WebFrame::OnTimer(wxTimerEvent& WXUNUSED(evt)) +{ +#ifdef wxWEBVIEW_SAMPLE_CHROMIUM + wxWebViewChromium::DoCEFWork(); +#endif +} + void WebFrame::OnIdle(wxIdleEvent& WXUNUSED(evt)) { if(m_browser->IsBusy()) @@ -1276,3 +1331,20 @@ SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) : sizer->Add(text, 1, wxEXPAND); SetSizer(sizer); } + +void WebFrame::OnClose(wxCloseEvent & evt) +{ +#ifdef wxWEBVIEW_SAMPLE_CHROMIUM + wxUnusedVar(evt); + delete m_timer; +// On Windows/Linux, calling `Shutdown` here will cause a crash when closing WebFrame. +// This is a temporary fix. +#ifdef __WXOSX__ + wxWebViewChromium::Shutdown(); +#endif + + Destroy(); +#else + evt.Skip(); +#endif +} diff --git a/samples/webview_chromium/refresh.xpm b/samples/webview_chromium/refresh.xpm deleted file mode 100644 index d976c2b7e7..0000000000 --- a/samples/webview_chromium/refresh.xpm +++ /dev/null @@ -1,234 +0,0 @@ -/* XPM */ -static const char * refresh_xpm[] = { -"24 24 207 2", -" c None", -". c #3162A2", -"+ c #507BB3", -"@ c #6A90C0", -"# c #7296C4", -"$ c #7397C4", -"% c #7094C2", -"& c #648BBD", -"* c #507CB3", -"= c #3061A2", -"- c #8EACD1", -"; c #B3CBE4", -"> c #B7CEE6", -", c #B8CEE6", -"' c #B5CDE5", -") c #B4CBE5", -"! c #B0C9E3", -"~ c #AEC6E1", -"{ c #9FBBDB", -"] c #648DBE", -"^ c #2F60A2", -"/ c #3262A4", -"( c #3364A3", -"_ c #3C6BA8", -": c #A7C0DD", -"< c #C1D6EA", -"[ c #BAD0E7", -"} c #B6CDE5", -"| c #B6CCE6", -"1 c #B5CDE6", -"2 c #B3CBE5", -"3 c #AFC8E3", -"4 c #AAC5E2", -"5 c #ABC6E2", -"6 c #A0BCDB", -"7 c #4975AF", -"8 c #3666A5", -"9 c #89ACD3", -"0 c #2C5EA0", -"a c #82A3CB", -"b c #B5CCE4", -"c c #7095C3", -"d c #658CBC", -"e c #678EBE", -"f c #7196C2", -"g c #84A4CC", -"h c #A9C3E0", -"i c #B8CFE7", -"j c #ACC6E3", -"k c #A0BEDE", -"l c #9CBCDD", -"m c #9EBDDE", -"n c #6C93C1", -"o c #7B9FCA", -"p c #ABC7E3", -"q c #2B5DA0", -"r c #4976AE", -"s c #8EADD0", -"t c #4975AE", -"u c #3667A6", -"v c #3666A6", -"w c #4170AB", -"x c #5B83B6", -"y c #9BB9DA", -"z c #97B9DC", -"A c #7EA7D3", -"B c #7CA5D2", -"C c #88AED6", -"D c #8AAFD6", -"E c #A4C1E0", -"F c #406DAB", -"G c #4F7BB2", -"H c #4A77B3", -"I c #4C79B4", -"J c #2E5EA2", -"K c #6F95C3", -"L c #95B6D9", -"M c #7FA8D3", -"N c #76A1D0", -"O c #709DCE", -"P c #2B5DA1", -"Q c #3667A5", -"R c #4D7AB4", -"S c #648DC3", -"T c #4A78B3", -"U c #3262A2", -"V c #2C5FA0", -"W c #6B91C0", -"X c #97B8DB", -"Y c #74A0CF", -"Z c #709ECE", -"` c #ACC7E3", -" . c #2D5EA0", -".. c #3767A6", -"+. c #5985BD", -"@. c #78A3D0", -"#. c #6C9BCC", -"$. c #AEC9E5", -"%. c #3263A3", -"&. c #3768A7", -"*. c #9BB8DA", -"=. c #9CB9DA", -"-. c #9CBADA", -";. c #9FBBDC", -">. c #A8C1DF", -",. c #2D5FA0", -"'. c #22569B", -"). c #23579C", -"!. c #21569A", -"~. c #21559B", -"{. c #275A9E", -"]. c #3364A4", -"^. c #24589C", -"/. c #24579C", -"(. c #416FAB", -"_. c #C0D3E8", -":. c #B8CCE4", -"<. c #B5CBE3", -"[. c #AFC7E1", -"}. c #B0C8E2", -"|. c #88A9CF", -"1. c #4471AC", -"2. c #B9D1E8", -"3. c #94B6DA", -"4. c #95B7DB", -"5. c #A3C1DF", -"6. c #A4BEDC", -"7. c #2D60A0", -"8. c #BBD1E9", -"9. c #BCD1E8", -"0. c #416EA9", -"a. c #3868A7", -"b. c #BAD1E9", -"c. c #96B7DB", -"d. c #98B9DC", -"e. c #A2C0DF", -"f. c #AAC4DF", -"g. c #5F88BA", -"h. c #80A8D7", -"i. c #CDDCEC", -"j. c #7A9FC8", -"k. c #4273B1", -"l. c #3465A4", -"m. c #4371AC", -"n. c #B9D1E9", -"o. c #B4CCE5", -"p. c #9DBCDD", -"q. c #8EB2D8", -"r. c #91B3D9", -"s. c #719AC8", -"t. c #4171AC", -"u. c #3A6AA8", -"v. c #3A75BD", -"w. c #9CBBDB", -"x. c #608BC1", -"y. c #3A6EAD", -"z. c #4C80BB", -"A. c #3365A4", -"B. c #C6DAED", -"C. c #6F94C1", -"D. c #8CABD1", -"E. c #9BBBDD", -"F. c #6C9ACD", -"G. c #6596CA", -"H. c #709DCF", -"I. c #7AA4D2", -"J. c #6A96C8", -"K. c #5885BB", -"L. c #4F7EB7", -"M. c #497AB6", -"N. c #487AB6", -"O. c #4275B5", -"P. c #4C7FBB", -"Q. c #578BC6", -"R. c #396CAA", -"S. c #789CC6", -"T. c #5681B6", -"U. c #8AAFD7", -"V. c #77A2D1", -"W. c #6496CA", -"X. c #6294C9", -"Y. c #6395CA", -"Z. c #5F92C9", -"`. c #5C8FC7", -" + c #598DC6", -".+ c #588DC7", -"++ c #4175B2", -"@+ c #31619F", -"#+ c #6089BB", -"$+ c #77A0CE", -"%+ c #6E9CCD", -"&+ c #6696CA", -"*+ c #6193C9", -"=+ c #5F91C8", -"-+ c #5C90C7", -";+ c #5A8EC6", -">+ c #558AC3", -",+ c #4072AF", -"'+ c #27528A", -")+ c #2A5285", -"!+ c #3C6599", -"~+ c #4B77B0", -"{+ c #4E7DB6", -"]+ c #4C7CB7", -"^+ c #4877B2", -"/+ c #3B69A2", -"(+ c #3361A0", -" ", -" . + @ # $ % & * ", -" = - ; > , ' ) ! ~ { ] ^ / ( ", -" _ : < [ } | 1 2 3 4 5 > 6 7 8 9 0 ", -" a b a c d e f g h i j k l m n o p q ", -" r s t u v w x y z A B C D E q ", -" F G H I J K L M N O 4 P ", -" Q R S T U V W X Y Z ` . ", -" ..+. t L @.Z #.$.0 ", -" %. &.{ *.=.-.;.>.,. ", -" '.).!.~.~.{.]. %.^./.^./.).'. ", -" (._.:.<.[.}.|.V ]. ", -" 1.2.3.4.5.6.7. %. ", -" 1.8.X l 9.0. a.( ", -" 1.b.c.d.e.f.g. h.i.j.k.l. ", -" m.n.o.p.3.q.r.s.t.u. v.w.x.y.z.A. ", -" m.B.C.D.E.F.G.H.I.J.K.L.M.N.O.P.Q.R. ", -" (.S. T.U.V.W.X.Y.Y.X.Z.`. +.+++ ", -" ]. @+#+$+%+&+*+=+-+;+>+,+ ", -" '+)+!+~+{+]+^+/+(+ ", -" ", -" ", -" ", -" "}; diff --git a/samples/webview_chromium/stop.xpm b/samples/webview_chromium/stop.xpm deleted file mode 100644 index ab0c179adc..0000000000 --- a/samples/webview_chromium/stop.xpm +++ /dev/null @@ -1,331 +0,0 @@ -/* XPM */ -static const char * stop_xpm[] = { -"24 24 304 2", -" c None", -". c #920F0F", -"+ c #931212", -"@ c #931111", -"# c #8F0909", -"$ c #981414", -"% c #DC6666", -"& c #F07575", -"* c #EF7272", -"= c #EE7171", -"- c #EE6F6F", -"; c #EE6D6D", -"> c #EE6C6C", -", c #E46969", -"' c #980F0F", -") c #8E0606", -"! c #EA7B7B", -"~ c #E25858", -"{ c #D84040", -"] c #D83F3F", -"^ c #D83E3E", -"/ c #D83D3D", -"( c #D73C3C", -"_ c #D73A3A", -": c #DD4A4A", -"< c #EC7272", -"[ c #950909", -"} c #9A1616", -"| c #EB7C7C", -"1 c #E15959", -"2 c #D74040", -"3 c #D94444", -"4 c #D94343", -"5 c #D94242", -"6 c #D94141", -"7 c #D93F3F", -"8 c #D73D3D", -"9 c #D73939", -"0 c #DD4747", -"a c #E96D6D", -"b c #A21818", -"c c #9D1717", -"d c #DC6868", -"e c #E25959", -"f c #D94545", -"g c #D84545", -"h c #DA4545", -"i c #D84242", -"j c #D84141", -"k c #D63D3D", -"l c #D73B3B", -"m c #D63838", -"n c #DC4747", -"o c #D95555", -"p c #9D1414", -"q c #940909", -"r c #E15757", -"s c #DC4848", -"t c #F64949", -"u c #D94747", -"v c #D94646", -"w c #D73F3F", -"x c #EA4141", -"y c #E53D3D", -"z c #D53A3A", -"A c #D43838", -"B c #DB4747", -"C c #E66161", -"D c #920606", -"E c #9D1818", -"F c #EC7C7C", -"G c #DF5353", -"H c #DC4545", -"I c #F15A5A", -"J c #EEB2B2", -"K c #F55757", -"L c #DB4545", -"M c #EA4545", -"N c #F38383", -"O c #F27979", -"P c #DC3D3D", -"Q c #D33838", -"R c #D13535", -"S c #D84343", -"T c #E35C5C", -"U c #980E0E", -"V c #BD4949", -"W c #E25656", -"X c #D74343", -"Y c #F44F4F", -"Z c #EBBFBF", -"` c #E4EBEB", -" . c #EBC7C7", -".. c #F15D5D", -"+. c #DB4141", -"@. c #EA4747", -"#. c #F09C9C", -"$. c #E4EFEF", -"%. c #E5DDDD", -"&. c #FC5858", -"*. c #D53939", -"=. c #D13737", -"-. c #CE3333", -";. c #B93434", -">. c #DC4949", -",. c #E34545", -"'. c #F48F8F", -"). c #E7E6E6", -"!. c #E8E9E9", -"~. c #EDCBCB", -"{. c #F45A5A", -"]. c #EA4C4C", -"^. c #F2A3A3", -"/. c #E9E9E9", -"(. c #E7E9E9", -"_. c #F0B0B0", -":. c #E74848", -"<. c #CF3636", -"[. c #CE3535", -"}. c #D23A3A", -"|. c #BC4949", -"1. c #DD4848", -"2. c #E74444", -"3. c #F29E9E", -"4. c #EAE9E9", -"5. c #EBF0F0", -"6. c #F0CECE", -"7. c #F79191", -"8. c #EAF4F4", -"9. c #EBECEC", -"0. c #EFC4C4", -"a. c #EA4B4B", -"b. c #D13939", -"c. c #CF3737", -"d. c #CD3434", -"e. c #D13A3A", -"f. c #B83333", -"g. c #D73E3E", -"h. c #E74646", -"i. c #F59E9E", -"j. c #EFE8E8", -"k. c #EEF1F1", -"l. c #EEF5F5", -"m. c #F3BABA", -"n. c #EA5050", -"o. c #D23B3B", -"p. c #D03A3A", -"q. c #CF3939", -"r. c #CC3535", -"s. c #CA3131", -"t. c #B83232", -"u. c #BD4848", -"v. c #D83A3A", -"w. c #F05D5D", -"x. c #F5BEBE", -"y. c #F1F2F2", -"z. c #F2E6E6", -"A. c #FE7A7A", -"B. c #CF3434", -"C. c #C92121", -"D. c #C61212", -"E. c #C10707", -"F. c #C00505", -"G. c #BE0404", -"H. c #C30C0C", -"I. c #B72222", -"J. c #BC4848", -"K. c #DC4343", -"L. c #D73838", -"M. c #E95A5A", -"N. c #F8ADAD", -"O. c #F2F9F9", -"P. c #F3F3F3", -"Q. c #F4F2F2", -"R. c #F3F7F7", -"S. c #F2D5D5", -"T. c #F05050", -"U. c #C30000", -"V. c #BF0000", -"W. c #BE0000", -"X. c #BD0000", -"Y. c #BB0000", -"Z. c #C00707", -"`. c #B71F1F", -" + c #BC4646", -".+ c #DC4141", -"++ c #D63636", -"@+ c #D63737", -"#+ c #EA5C5C", -"$+ c #F6B9B9", -"%+ c #F4FAFA", -"&+ c #F9C5C5", -"*+ c #FCACAC", -"=+ c #F4F0F0", -"-+ c #F1F6F6", -";+ c #EB5F5F", -">+ c #C00101", -",+ c #B90000", -"'+ c #BF0707", -")+ c #B61D1D", -"!+ c #BC4545", -"~+ c #DA3E3E", -"{+ c #D73535", -"]+ c #D63434", -"^+ c #EA6363", -"/+ c #F5BFBF", -"(+ c #F1F1F1", -"_+ c #F5F6F6", -":+ c #FAC9C9", -"<+ c #DF3C3C", -"[+ c #D21B1B", -"}+ c #FBADAD", -"|+ c #F5F4F4", -"1+ c #F2F2F2", -"2+ c #F1D7D7", -"3+ c #F07373", -"4+ c #B80000", -"5+ c #BD0707", -"6+ c #B61C1C", -"7+ c #B53B3B", -"8+ c #E75D5D", -"9+ c #D63333", -"0+ c #D53333", -"a+ c #D42F2F", -"b+ c #F58686", -"c+ c #F3D4D4", -"d+ c #F2F3F3", -"e+ c #F6D3D3", -"f+ c #E44343", -"g+ c #C40000", -"h+ c #C20000", -"i+ c #D82C2C", -"j+ c #F7B7B7", -"k+ c #F0E9E9", -"l+ c #FA8F8F", -"m+ c #BE0A0A", -"n+ c #B70000", -"o+ c #B60000", -"p+ c #C20C0C", -"q+ c #B41919", -"r+ c #8B0101", -"s+ c #C44848", -"t+ c #EC5F5F", -"u+ c #D52A2A", -"v+ c #D22424", -"w+ c #CE1C1C", -"x+ c #E96969", -"y+ c #FBC4C4", -"z+ c #E44949", -"A+ c #C40101", -"B+ c #C10000", -"C+ c #D53131", -"D+ c #FBBEBE", -"E+ c #F09292", -"F+ c #C00E0E", -"G+ c #B50000", -"H+ c #C71212", -"I+ c #980707", -"J+ c #890101", -"K+ c #B52828", -"L+ c #E63D3D", -"M+ c #C90202", -"N+ c #C70000", -"O+ c #C80505", -"P+ c #D32424", -"Q+ c #C61B1B", -"R+ c #C11111", -"S+ c #C81313", -"T+ c #8C0101", -"U+ c #880000", -"V+ c #BE2E2E", -"W+ c #DC2D2D", -"X+ c #C50000", -"Y+ c #BC0000", -"Z+ c #C30D0D", -"`+ c #CE2424", -" @ c #850000", -".@ c #BE2B2B", -"+@ c #E33434", -"@@ c #C00000", -"#@ c #CC1616", -"$@ c #CB2222", -"%@ c #910404", -"&@ c #790000", -"*@ c #B21D1D", -"=@ c #E03131", -"-@ c #B40000", -";@ c #CD1818", -">@ c #C61F1F", -",@ c #830000", -"'@ c #730000", -")@ c #B92525", -"!@ c #E14444", -"~@ c #E04141", -"{@ c #DF3F3F", -"]@ c #DE3C3C", -"^@ c #DE3A3A", -"/@ c #DE3737", -"(@ c #DD3535", -"_@ c #DD3232", -":@ c #C42121", -"<@ c #7E0000", -"[@ c #720000", -"}@ c #770000", -" . + + + + + + @ @ # ", -" $ % & * * * = - ; > , ' ", -" ) ! ~ { { { ] ^ / ( _ : < [ ", -" } | 1 2 3 3 4 5 6 7 ^ 8 9 0 a b ", -" c d e 6 f g f h 4 i j 7 k l m n o p ", -" q | r 4 f s t u v h i 6 w x y z A B C D ", -" E F G w 4 H I J K L f i j M N O P Q R S T U ", -" V W / 6 X Y Z ` ...+.j @.#.$.%.&.*.=.-.f ;. ", -" V >.7 { i ,.'.).!.~.{.].^./.(._.:.=.<.[.}.;. ", -" |.1.^ ] 7 { 2.3.4.5.6.7.8.9.0.a.b.c.[.d.e.f. ", -" |.0 ( 8 ^ ] g.h.i.j.k.l.k.m.n.o.p.q.r.s.<.t. ", -" u.H v.l ( / / *.w.x.y.y.z.A.B.C.D.E.F.G.H.I. ", -" J.K.L.9 _ _ _ M.N.O.P.Q.R.S.T.U.V.W.X.Y.Z.`. ", -" +.+++@+L.@+#+$+O.%+&+*+=+-+S.;+>+X.Y.,+'+)+ ", -" !+~+{+{+]+^+/+(+_+:+<+[+}+|+1+2+3+Y.,+4+5+6+ ", -" 7+8+9+0+a+b+c+d+e+f+g+h+i+j+P.k+l+m+n+o+p+q+ ", -" r+s+t+u+v+w+x+y+z+A+h+B+X.C+D+E+F+n+G+H+v+I+ ", -" J+K+L+M+N+O+P+A+h+B+V.X.Y.Q+R+4+o+S+v+T+ ", -" U+V+W+N+X+U.h+B+V.X.Y+Y.,+4+o+Z+`+T+ ", -" @.@+@A+h+@@W.X.Y+Y.,+4+G+#@$@%@ ", -" &@*@=@V.Y+Y.,+4+o+G+-@;@>@,@ ", -" '@)@!@~@{@]@^@/@(@_@:@<@ ", -" [@&@&@&@&@&@&@&@&@}@ ", -" "}; diff --git a/samples/webview_chromium/webview.cpp b/samples/webview_chromium/webview.cpp index 1b7eef7456..c88ccfd8c7 100644 --- a/samples/webview_chromium/webview.cpp +++ b/samples/webview_chromium/webview.cpp @@ -1,1100 +1,22 @@ ///////////////////////////////////////////////////////////////////////////// // Name: webview.cpp -// Purpose: wxWebView sample -// Author: Marianne Gagnon -// Id: $Id: webview.cpp 73453 2013-02-01 09:38:53Z SJL $ -// Copyright: (c) 2010 - 2015 Marianne Gagnon, Steven Lamerton +// Purpose: wxWebViewChromium sample proxy +// Author: Tobias Taschner +// Copyright: (c) 2018 wxWidgets development team // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -// ---------------------------------------------------------------------------- -// headers -// ---------------------------------------------------------------------------- +/* + The chromium sample is identical to the webview sample but needs different + libraries to be linked and uses a different project/build files +*/ -// For compilers that support precompilation, includes "wx/wx.h". -#include "wx/wxprec.h" - -#ifdef __BORLANDC__ - #pragma hdrstop -#endif - -#ifndef WX_PRECOMP - #include "wx/wx.h" -#endif +#include "wx/wx.h" #if !wxUSE_WEBVIEW_CHROMIUM #error "A wxWebView Chromium backend is required by this sample" #endif -#include "wx/artprov.h" -#include "wx/cmdline.h" -#include "wx/notifmsg.h" -#include "wx/settings.h" -#include "wx/webview.h" -#include "wx/webviewarchivehandler.h" -#include "wx/webviewfshandler.h" -#include "wx/infobar.h" -#include "wx/filesys.h" -#include "wx/fs_arc.h" -#include "wx/fs_mem.h" -#include "wx/timer.h" - -#include "wx/webview_chromium.h" - -#ifndef wxHAS_IMAGES_IN_RESOURCES - #include "../sample.xpm" -#endif - -#if wxUSE_STC -#include "wx/stc/stc.h" -#else -#error "wxStyledTextControl is needed by this sample" -#endif - -#if defined(__WXMSW__) || defined(__WXOSX__) -#include "stop.xpm" -#include "refresh.xpm" -#endif - -#include "wxlogo.xpm" - - -//We map menu items to their history items -WX_DECLARE_HASH_MAP(int, wxSharedPtr, - wxIntegerHash, wxIntegerEqual, wxMenuHistoryMap); - -class WebApp : public wxApp -{ -public: - WebApp() : - m_url("http://www.wxwidgets.org") - { - } - - virtual bool OnInit(); - virtual int OnExit(); -private: - wxString m_url; -}; - -class WebFrame : public wxFrame -{ -public: - WebFrame(const wxString& url); - virtual ~WebFrame(); - - void UpdateState(); - void OnTimer(wxTimerEvent& evt); - void OnIdle(wxIdleEvent& evt); - void OnUrl(wxCommandEvent& evt); - void OnBack(wxCommandEvent& evt); - void OnForward(wxCommandEvent& evt); - void OnStop(wxCommandEvent& evt); - void OnReload(wxCommandEvent& evt); - void OnClearHistory(wxCommandEvent& evt); - void OnEnableHistory(wxCommandEvent& evt); - void OnNavigationRequest(wxWebViewEvent& evt); - void OnNavigationComplete(wxWebViewEvent& evt); - void OnDocumentLoaded(wxWebViewEvent& evt); - void OnNewWindow(wxWebViewEvent& evt); - void OnTitleChanged(wxWebViewEvent& evt); - void OnViewSourceRequest(wxCommandEvent& evt); - void OnViewTextRequest(wxCommandEvent& evt); - void OnToolsClicked(wxCommandEvent& evt); - void OnSetZoom(wxCommandEvent& evt); - void OnError(wxWebViewEvent& evt); - void OnPrint(wxCommandEvent& evt); - void OnCut(wxCommandEvent& evt); - void OnCopy(wxCommandEvent& evt); - void OnPaste(wxCommandEvent& evt); - void OnUndo(wxCommandEvent& evt); - void OnRedo(wxCommandEvent& evt); - void OnMode(wxCommandEvent& evt); - void OnZoomLayout(wxCommandEvent& evt); - void OnHistory(wxCommandEvent& evt); - void OnScrollLineUp(wxCommandEvent&) { m_browser->LineUp(); } - void OnScrollLineDown(wxCommandEvent&) { m_browser->LineDown(); } - void OnScrollPageUp(wxCommandEvent&) { m_browser->PageUp(); } - void OnScrollPageDown(wxCommandEvent&) { m_browser->PageDown(); } - void OnRunScript(wxCommandEvent& evt); - void OnClearSelection(wxCommandEvent& evt); - void OnDeleteSelection(wxCommandEvent& evt); - void OnSelectAll(wxCommandEvent& evt); - void OnLoadScheme(wxCommandEvent& evt); - void OnUseMemoryFS(wxCommandEvent& evt); - void OnFind(wxCommandEvent& evt); - void OnFindDone(wxCommandEvent& evt); - void OnFindText(wxCommandEvent& evt); - void OnFindOptions(wxCommandEvent& evt); - void OnEnableContextMenu(wxCommandEvent& evt); - void OnClose(wxCloseEvent& evt); - -private: - wxTextCtrl* m_url; - wxWebView* m_browser; - - // A timer to run CEF message loop. - wxTimer* m_timer; - - wxToolBar* m_toolbar; - wxToolBarToolBase* m_toolbar_back; - wxToolBarToolBase* m_toolbar_forward; - wxToolBarToolBase* m_toolbar_stop; - wxToolBarToolBase* m_toolbar_reload; - wxToolBarToolBase* m_toolbar_tools; - - wxToolBarToolBase* m_find_toolbar_done; - wxToolBarToolBase* m_find_toolbar_next; - wxToolBarToolBase* m_find_toolbar_previous; - wxToolBarToolBase* m_find_toolbar_options; - wxMenuItem* m_find_toolbar_wrap; - wxMenuItem* m_find_toolbar_highlight; - wxMenuItem* m_find_toolbar_matchcase; - wxMenuItem* m_find_toolbar_wholeword; - - wxMenu* m_tools_menu; - wxMenu* m_tools_history_menu; - wxMenuItem* m_tools_layout; - wxMenuItem* m_tools_tiny; - wxMenuItem* m_tools_small; - wxMenuItem* m_tools_medium; - wxMenuItem* m_tools_large; - wxMenuItem* m_tools_largest; - wxMenuItem* m_tools_handle_navigation; - wxMenuItem* m_tools_handle_new_window; - wxMenuItem* m_tools_enable_history; - wxMenuItem* m_edit_cut; - wxMenuItem* m_edit_copy; - wxMenuItem* m_edit_paste; - wxMenuItem* m_edit_undo; - wxMenuItem* m_edit_redo; - wxMenuItem* m_edit_mode; - wxMenuItem* m_scroll_line_up; - wxMenuItem* m_scroll_line_down; - wxMenuItem* m_scroll_page_up; - wxMenuItem* m_scroll_page_down; - wxMenuItem* m_selection_clear; - wxMenuItem* m_selection_delete; - wxMenuItem* m_find; - wxMenuItem* m_context_menu; - - wxInfoBar *m_info; - wxStaticText* m_info_text; - wxTextCtrl* m_find_ctrl; - wxToolBar* m_find_toolbar; - - wxMenuHistoryMap m_histMenuItems; - wxString m_findText; - int m_findFlags, m_findCount; - -}; - -class SourceViewDialog : public wxDialog -{ -public: - SourceViewDialog(wxWindow* parent, wxString source); -}; - -IMPLEMENT_APP(WebApp) - -// ============================================================================ -// implementation -// ============================================================================ - -bool WebApp::OnInit() -{ - // We spawn a separate subprocess - int code = 0; -#ifdef __WXMSW__ - if(!wxWebViewChromium::StartUp(code, "")) -#else - if(!wxWebViewChromium::StartUp(code, "", - wxApp::argc, wxApp::argv)) -#endif - exit(code); - - if ( !wxApp::OnInit() ) - return false; - - //Required for virtual file system archive and memory support - wxFileSystem::AddHandler(new wxArchiveFSHandler); - wxFileSystem::AddHandler(new wxMemoryFSHandler); - - // Create the memory files - wxImage::AddHandler(new wxPNGHandler); - wxMemoryFSHandler::AddFile("logo.png", - wxBitmap(wxlogo_xpm), wxBITMAP_TYPE_PNG); - wxMemoryFSHandler::AddFile("page1.htm", - "File System Example" - "" - "

Page 1

" - "

" - "
"); - wxMemoryFSHandler::AddFile("page2.htm", - "File System Example" - "" - "

Page 2

" - "

Page 1 was better.

"); - wxMemoryFSHandler::AddFile("test.css", "h1 {color: red;}"); - - WebFrame *frame = new WebFrame(m_url); - frame->Show(); - - return true; -} - -int WebApp::OnExit() -{ -#if defined(__WXMSW__) || defined(__WXGTK__) - wxWebViewChromium::Shutdown(); -#endif - return wxApp::OnExit(); -} - -WebFrame::WebFrame(const wxString& url) : - wxFrame(NULL, wxID_ANY, "wxWebView Sample") -{ - // set the frame icon - SetIcon(wxICON(sample)); - SetTitle("wxWebView Sample"); - - wxBoxSizer* topsizer = new wxBoxSizer(wxVERTICAL); - - // Create the toolbar - m_toolbar = CreateToolBar(wxTB_TEXT); - m_toolbar->SetToolBitmapSize(wxSize(32, 32)); - - wxBitmap back = wxArtProvider::GetBitmap(wxART_GO_BACK , wxART_TOOLBAR); - wxBitmap forward = wxArtProvider::GetBitmap(wxART_GO_FORWARD , wxART_TOOLBAR); - #ifdef __WXGTK__ - wxBitmap stop = wxArtProvider::GetBitmap("gtk-stop", wxART_TOOLBAR); - #else - wxBitmap stop = wxBitmap(stop_xpm); - #endif - #ifdef __WXGTK__ - wxBitmap refresh = wxArtProvider::GetBitmap("gtk-refresh", wxART_TOOLBAR); - #else - wxBitmap refresh = wxBitmap(refresh_xpm); - #endif - - m_toolbar_back = m_toolbar->AddTool(wxID_ANY, _("Back"), back); - m_toolbar_forward = m_toolbar->AddTool(wxID_ANY, _("Forward"), forward); - m_toolbar_stop = m_toolbar->AddTool(wxID_ANY, _("Stop"), stop); - m_toolbar_reload = m_toolbar->AddTool(wxID_ANY, _("Reload"), refresh); - m_url = new wxTextCtrl(m_toolbar, wxID_ANY, wxT(""), wxDefaultPosition, wxSize(400, -1), wxTE_PROCESS_ENTER ); - m_toolbar->AddControl(m_url, _("URL")); - m_toolbar_tools = m_toolbar->AddTool(wxID_ANY, _("Menu"), wxBitmap(wxlogo_xpm)); - - m_toolbar->Realize(); - - // Set find values. - m_findFlags = wxWEBVIEW_FIND_DEFAULT; - m_findText = wxEmptyString; - m_findCount = 0; - - // Create panel for find toolbar. - wxPanel* panel = new wxPanel(this); - topsizer->Add(panel, wxSizerFlags().Expand()); - - // Create sizer for panel. - wxBoxSizer* panel_sizer = new wxBoxSizer(wxVERTICAL); - panel->SetSizer(panel_sizer); - - // Create the find toolbar. - m_find_toolbar = new wxToolBar(panel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTB_HORIZONTAL|wxTB_TEXT|wxTB_HORZ_LAYOUT); - m_find_toolbar->Hide(); - panel_sizer->Add(m_find_toolbar, wxSizerFlags().Expand()); - - // Create find control. - m_find_ctrl = new wxTextCtrl(m_find_toolbar, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize(140,-1), wxTE_PROCESS_ENTER); - - - //Find options menu - wxMenu* findmenu = new wxMenu; - m_find_toolbar_wrap = findmenu->AppendCheckItem(wxID_ANY,"Wrap"); - m_find_toolbar_matchcase = findmenu->AppendCheckItem(wxID_ANY,"Match Case"); - m_find_toolbar_wholeword = findmenu->AppendCheckItem(wxID_ANY,"Entire Word"); - m_find_toolbar_highlight = findmenu->AppendCheckItem(wxID_ANY,"Highlight"); - // Add find toolbar tools. - m_find_toolbar->SetToolSeparation(7); - m_find_toolbar_done = m_find_toolbar->AddTool(wxID_ANY, "Close", wxArtProvider::GetBitmap(wxART_CROSS_MARK)); - m_find_toolbar->AddSeparator(); - m_find_toolbar->AddControl(m_find_ctrl, "Find"); - m_find_toolbar->AddSeparator(); - m_find_toolbar_next = m_find_toolbar->AddTool(wxID_ANY, "Next", wxArtProvider::GetBitmap(wxART_GO_DOWN, wxART_TOOLBAR, wxSize(16,16))); - m_find_toolbar_previous = m_find_toolbar->AddTool(wxID_ANY, "Previous", wxArtProvider::GetBitmap(wxART_GO_UP, wxART_TOOLBAR, wxSize(16,16))); - m_find_toolbar->AddSeparator(); - m_find_toolbar_options = m_find_toolbar->AddTool(wxID_ANY, "Options", wxArtProvider::GetBitmap(wxART_PLUS, wxART_TOOLBAR, wxSize(16,16)), "", wxITEM_DROPDOWN); - m_find_toolbar_options->SetDropdownMenu(findmenu); - m_find_toolbar->Realize(); - - // Create the info panel - m_info = new wxInfoBar(this); - topsizer->Add(m_info, wxSizerFlags().Expand()); - - // Create the webview - wxWebView::RegisterFactory(wxWebViewBackendChromium, wxSharedPtr - (new wxWebViewFactoryChromium)); - - m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxSize(800, 525), wxWebViewBackendChromium); - topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1)); - - - //We register the wxfs:// protocol for testing purposes - m_browser->RegisterHandler(wxSharedPtr(new wxWebViewArchiveHandler("wxfs"))); - //And the memory: file system - m_browser->RegisterHandler(wxSharedPtr(new wxWebViewFSHandler("memory"))); - - SetSizer(topsizer); - - //Set a more sensible size for web browsing - SetSize(wxSize(800, 600)); - - // Create a log window - new wxLogWindow(this, _("Logging"), true, false); - - // Create the Tools menu - m_tools_menu = new wxMenu(); - wxMenuItem* print = m_tools_menu->Append(wxID_ANY , _("Print")); - wxMenuItem* viewSource = m_tools_menu->Append(wxID_ANY , _("View Source")); - wxMenuItem* viewText = m_tools_menu->Append(wxID_ANY, _("View Text")); - m_tools_menu->AppendSeparator(); - m_tools_layout = m_tools_menu->AppendCheckItem(wxID_ANY, _("Use Layout Zoom")); - m_tools_tiny = m_tools_menu->AppendCheckItem(wxID_ANY, _("Tiny")); - m_tools_small = m_tools_menu->AppendCheckItem(wxID_ANY, _("Small")); - m_tools_medium = m_tools_menu->AppendCheckItem(wxID_ANY, _("Medium")); - m_tools_large = m_tools_menu->AppendCheckItem(wxID_ANY, _("Large")); - m_tools_largest = m_tools_menu->AppendCheckItem(wxID_ANY, _("Largest")); - m_tools_menu->AppendSeparator(); - m_tools_handle_navigation = m_tools_menu->AppendCheckItem(wxID_ANY, _("Handle Navigation")); - m_tools_handle_new_window = m_tools_menu->AppendCheckItem(wxID_ANY, _("Handle New Windows")); - m_tools_menu->AppendSeparator(); - - //Find - m_find = m_tools_menu->Append(wxID_ANY, _("Find")); - m_tools_menu->AppendSeparator(); - - //History menu - m_tools_history_menu = new wxMenu(); - wxMenuItem* clearhist = m_tools_history_menu->Append(wxID_ANY, _("Clear History")); - m_tools_enable_history = m_tools_history_menu->AppendCheckItem(wxID_ANY, _("Enable History")); - m_tools_history_menu->AppendSeparator(); - - m_tools_menu->AppendSubMenu(m_tools_history_menu, "History"); - - //Create an editing menu - wxMenu* editmenu = new wxMenu(); - m_edit_cut = editmenu->Append(wxID_ANY, _("Cut")); - m_edit_copy = editmenu->Append(wxID_ANY, _("Copy")); - m_edit_paste = editmenu->Append(wxID_ANY, _("Paste")); - editmenu->AppendSeparator(); - m_edit_undo = editmenu->Append(wxID_ANY, _("Undo")); - m_edit_redo = editmenu->Append(wxID_ANY, _("Redo")); - editmenu->AppendSeparator(); - m_edit_mode = editmenu->AppendCheckItem(wxID_ANY, _("Edit Mode")); - - m_tools_menu->AppendSeparator(); - m_tools_menu->AppendSubMenu(editmenu, "Edit"); - - wxMenu* scroll_menu = new wxMenu; - m_scroll_line_up = scroll_menu->Append(wxID_ANY, "Line &up"); - m_scroll_line_down = scroll_menu->Append(wxID_ANY, "Line &down"); - m_scroll_page_up = scroll_menu->Append(wxID_ANY, "Page u&p"); - m_scroll_page_down = scroll_menu->Append(wxID_ANY, "Page d&own"); - m_tools_menu->AppendSubMenu(scroll_menu, "Scroll"); - - wxMenuItem* script = m_tools_menu->Append(wxID_ANY, _("Run Script")); - - //Selection menu - wxMenu* selection = new wxMenu(); - m_selection_clear = selection->Append(wxID_ANY, _("Clear Selection")); - m_selection_delete = selection->Append(wxID_ANY, _("Delete Selection")); - wxMenuItem* selectall = selection->Append(wxID_ANY, _("Select All")); - - editmenu->AppendSubMenu(selection, "Selection"); - - wxMenuItem* loadscheme = m_tools_menu->Append(wxID_ANY, _("Custom Scheme Example")); - wxMenuItem* usememoryfs = m_tools_menu->Append(wxID_ANY, _("Memory File System Example")); - - m_context_menu = m_tools_menu->AppendCheckItem(wxID_ANY, _("Enable Context Menu")); - - //By default we want to handle navigation and new windows - m_tools_handle_navigation->Check(); - m_tools_handle_new_window->Check(); - m_tools_enable_history->Check(); - if(!m_browser->CanSetZoomType(wxWEBVIEW_ZOOM_TYPE_LAYOUT)) - m_tools_layout->Enable(false); - - - // Connect the toolbar events - Connect(m_toolbar_back->GetId(), wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler(WebFrame::OnBack), NULL, this ); - Connect(m_toolbar_forward->GetId(), wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler(WebFrame::OnForward), NULL, this ); - Connect(m_toolbar_stop->GetId(), wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler(WebFrame::OnStop), NULL, this ); - Connect(m_toolbar_reload->GetId(), wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler(WebFrame::OnReload),NULL, this ); - Connect(m_toolbar_tools->GetId(), wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler(WebFrame::OnToolsClicked), NULL, this ); - - Connect(m_url->GetId(), wxEVT_COMMAND_TEXT_ENTER, - wxCommandEventHandler(WebFrame::OnUrl), NULL, this ); - - // Connect find toolbar events. - Connect(m_find_toolbar_done->GetId(), wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler(WebFrame::OnFindDone), NULL, this ); - Connect(m_find_toolbar_next->GetId(), wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); - Connect(m_find_toolbar_previous->GetId(), wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); - - // Connect find control events. - Connect(m_find_ctrl->GetId(), wxEVT_COMMAND_TEXT_UPDATED, - wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); - Connect(m_find_ctrl->GetId(), wxEVT_COMMAND_TEXT_ENTER, - wxCommandEventHandler(WebFrame::OnFindText), NULL, this ); - - // Connect the webview events - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_NAVIGATING, - wxWebViewEventHandler(WebFrame::OnNavigationRequest), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_NAVIGATED, - wxWebViewEventHandler(WebFrame::OnNavigationComplete), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_LOADED, - wxWebViewEventHandler(WebFrame::OnDocumentLoaded), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_ERROR, - wxWebViewEventHandler(WebFrame::OnError), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_NEWWINDOW, - wxWebViewEventHandler(WebFrame::OnNewWindow), NULL, this); - Connect(m_browser->GetId(), wxEVT_COMMAND_WEBVIEW_TITLE_CHANGED, - wxWebViewEventHandler(WebFrame::OnTitleChanged), NULL, this); - - // Connect the menu events - Connect(viewSource->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnViewSourceRequest), NULL, this ); - Connect(viewText->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnViewTextRequest), NULL, this ); - Connect(print->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnPrint), NULL, this ); - Connect(m_tools_layout->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnZoomLayout), NULL, this ); - Connect(m_tools_tiny->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(m_tools_small->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(m_tools_medium->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(m_tools_large->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(m_tools_largest->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnSetZoom), NULL, this ); - Connect(clearhist->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnClearHistory), NULL, this ); - Connect(m_tools_enable_history->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnEnableHistory), NULL, this ); - Connect(m_edit_cut->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnCut), NULL, this ); - Connect(m_edit_copy->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnCopy), NULL, this ); - Connect(m_edit_paste->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnPaste), NULL, this ); - Connect(m_edit_undo->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnUndo), NULL, this ); - Connect(m_edit_redo->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnRedo), NULL, this ); - Connect(m_edit_mode->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnMode), NULL, this ); - Connect(m_scroll_line_up->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnScrollLineUp), NULL, this ); - Connect(m_scroll_line_down->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnScrollLineDown), NULL, this ); - Connect(m_scroll_page_up->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnScrollPageUp), NULL, this ); - Connect(m_scroll_page_down->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnScrollPageDown), NULL, this ); - Connect(script->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnRunScript), NULL, this ); - Connect(m_selection_clear->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnClearSelection), NULL, this ); - Connect(m_selection_delete->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnDeleteSelection), NULL, this ); - Connect(selectall->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnSelectAll), NULL, this ); - Connect(loadscheme->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnLoadScheme), NULL, this ); - Connect(usememoryfs->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnUseMemoryFS), NULL, this ); - Connect(m_find->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnFind), NULL, this ); - Connect(m_context_menu->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnEnableContextMenu), NULL, this ); - - //Connect the idle events - Connect(wxID_ANY, wxEVT_IDLE, wxIdleEventHandler(WebFrame::OnIdle), NULL, this); - Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, wxCloseEventHandler(WebFrame::OnClose), NULL, this); - Connect(wxID_ANY, wxEVT_TIMER, wxTimerEventHandler(WebFrame::OnTimer), NULL, this); - - m_timer = new wxTimer(this); - m_timer->Start(25); -} - -WebFrame::~WebFrame() -{ - delete m_tools_menu; -} - -/** - * Method that retrieves the current state from the web control and updates the GUI - * the reflect this current state. - */ -void WebFrame::UpdateState() -{ - m_toolbar->EnableTool( m_toolbar_back->GetId(), m_browser->CanGoBack() ); - m_toolbar->EnableTool( m_toolbar_forward->GetId(), m_browser->CanGoForward() ); - - if (m_browser->IsBusy()) - { - m_toolbar->EnableTool( m_toolbar_stop->GetId(), true ); - } - else - { - m_toolbar->EnableTool( m_toolbar_stop->GetId(), false ); - } - - SetTitle( m_browser->GetCurrentTitle() ); - m_url->SetValue( m_browser->GetCurrentURL() ); -} - -void WebFrame::OnTimer(wxTimerEvent& WXUNUSED(evt)) -{ - wxWebViewChromium::DoCEFWork(); -} - -void WebFrame::OnIdle(wxIdleEvent& WXUNUSED(evt)) -{ - if(m_browser->IsBusy()) - { - wxSetCursor(wxCURSOR_ARROWWAIT); - m_toolbar->EnableTool(m_toolbar_stop->GetId(), true); - } - else - { - wxSetCursor(wxNullCursor); - m_toolbar->EnableTool(m_toolbar_stop->GetId(), false); - } -} - -/** - * Callback invoked when user entered an URL and pressed enter - */ -void WebFrame::OnUrl(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->LoadURL( m_url->GetValue() ); - m_browser->SetFocus(); - UpdateState(); -} - -/** - * Callback invoked when user pressed the "back" button - */ -void WebFrame::OnBack(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->GoBack(); - UpdateState(); -} - -/** - * Callback invoked when user pressed the "forward" button - */ -void WebFrame::OnForward(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->GoForward(); - UpdateState(); -} - -/** - * Callback invoked when user pressed the "stop" button - */ -void WebFrame::OnStop(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->Stop(); - UpdateState(); -} - -/** - * Callback invoked when user pressed the "reload" button - */ -void WebFrame::OnReload(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->Reload(); - UpdateState(); -} - -void WebFrame::OnClearHistory(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->ClearHistory(); - UpdateState(); -} - -void WebFrame::OnEnableHistory(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->EnableHistory(m_tools_enable_history->IsChecked()); - UpdateState(); -} - -void WebFrame::OnCut(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->Cut(); -} - -void WebFrame::OnCopy(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->Copy(); -} - -void WebFrame::OnPaste(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->Paste(); -} - -void WebFrame::OnUndo(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->Undo(); -} - -void WebFrame::OnRedo(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->Redo(); -} - -void WebFrame::OnMode(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->SetEditable(m_edit_mode->IsChecked()); -} - -void WebFrame::OnLoadScheme(wxCommandEvent& WXUNUSED(evt)) -{ - // Since webview sample build directory is different from platforms, We traverse - // from building directory to retrieve `/samples/help/` absolute path. - wxFileName cur_dir("."); - cur_dir.MakeAbsolute(); - wxString cur_path = cur_dir.GetFullPath(); - //Under MSW we need to flip the slashes - cur_path.Replace("\\", "/"); - int samples_begin_pos = cur_path.find("samples"); - // Invalid sample directory, just return. - if (samples_begin_pos == -1) - return; - - wxString path = cur_path.substr(0, samples_begin_pos+7) + "/help/doc.zip"; - path = "wxfs:///" + path + ";protocol=zip/doc.htm"; - m_browser->LoadURL(path); -} - -void WebFrame::OnUseMemoryFS(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->LoadURL("memory:page1.htm"); -} - -void WebFrame::OnEnableContextMenu(wxCommandEvent& evt) -{ - m_browser->EnableContextMenu(evt.IsChecked()); -} - -void WebFrame::OnFind(wxCommandEvent& WXUNUSED(evt)) -{ - wxString value = m_browser->GetSelectedText(); - if(value.Len() > 150) - { - value.Truncate(150); - } - m_find_ctrl->SetValue(value); - if(!m_find_toolbar->IsShown()){ - m_find_toolbar->Show(true); - SendSizeEvent(); - } - m_find_ctrl->SelectAll(); -} - -void WebFrame::OnFindDone(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->Find(""); - m_find_toolbar->Show(false); - SendSizeEvent(); -} - -void WebFrame::OnFindText(wxCommandEvent& evt) -{ - int flags = 0; - - if(m_find_toolbar_wrap->IsChecked()) - flags |= wxWEBVIEW_FIND_WRAP; - if(m_find_toolbar_wholeword->IsChecked()) - flags |= wxWEBVIEW_FIND_ENTIRE_WORD; - if(m_find_toolbar_matchcase->IsChecked()) - flags |= wxWEBVIEW_FIND_MATCH_CASE; - if(m_find_toolbar_highlight->IsChecked()) - flags |= wxWEBVIEW_FIND_HIGHLIGHT_RESULT; - - if(m_find_toolbar_previous->GetId() == evt.GetId()) - flags |= wxWEBVIEW_FIND_BACKWARDS; - - wxString find_text = m_find_ctrl->GetValue(); - long count = m_browser->Find(find_text, flags); - - if(m_findText != find_text) - { - m_findCount = count; - m_findText = find_text; - } - - if(count != wxNOT_FOUND || find_text.IsEmpty()) - { - m_find_ctrl->SetBackgroundColour(*wxWHITE); - } - else - { - m_find_ctrl->SetBackgroundColour(wxColour(255, 101, 101)); - } - - m_find_ctrl->Refresh(); - - //Log the result, note that count is zero indexed. - if(count != m_findCount) - { - count++; - } - wxLogMessage("Searching for:%s current match:%ld/%d", m_findText.c_str(), count, m_findCount); -} - -/** - * Callback invoked when there is a request to load a new page (for instance - * when the user clicks a link) - */ -void WebFrame::OnNavigationRequest(wxWebViewEvent& evt) -{ - if(m_info->IsShown()) - { - m_info->Dismiss(); - } - - wxLogMessage("%s", "Navigation request to '" + evt.GetURL() + "' (target='" + - evt.GetTarget() + "')"); - - wxASSERT(m_browser->IsBusy()); - - //If we don't want to handle navigation then veto the event and navigation - //will not take place, we also need to stop the loading animation - if(!m_tools_handle_navigation->IsChecked()) - { - evt.Veto(); - m_toolbar->EnableTool( m_toolbar_stop->GetId(), false ); - } - else - { - UpdateState(); - } -} - -/** - * Callback invoked when a navigation request was accepted - */ -void WebFrame::OnNavigationComplete(wxWebViewEvent& evt) -{ - wxLogMessage("%s", "Navigation complete; url='" + evt.GetURL() + "'"); - UpdateState(); -} - -/** - * Callback invoked when a page is finished loading - */ -void WebFrame::OnDocumentLoaded(wxWebViewEvent& evt) -{ - //Only notify if the document is the main frame, not a subframe - if(evt.GetURL() == m_browser->GetCurrentURL()) - { - wxLogMessage("%s", "Document loaded; url='" + evt.GetURL() + "'"); - } - UpdateState(); -} - -/** - * On new window, we veto to stop extra windows appearing - */ -void WebFrame::OnNewWindow(wxWebViewEvent& evt) -{ - wxLogMessage("%s", "New window; url='" + evt.GetURL() + "'"); - - //If we handle new window events then just load them in this window as we - //are a single window browser - if(m_tools_handle_new_window->IsChecked()) - m_browser->LoadURL(evt.GetURL()); - - UpdateState(); -} - -void WebFrame::OnTitleChanged(wxWebViewEvent& evt) -{ - SetTitle(evt.GetString()); - wxLogMessage("%s", "Title changed; title='" + evt.GetString() + "'"); -} - -/** - * Invoked when user selects the "View Source" menu item - */ -void WebFrame::OnViewSourceRequest(wxCommandEvent& WXUNUSED(evt)) -{ - SourceViewDialog dlg(this, m_browser->GetPageSource()); - dlg.ShowModal(); -} - -/** - * Invoked when user selects the "View Text" menu item - */ -void WebFrame::OnViewTextRequest(wxCommandEvent& WXUNUSED(evt)) -{ - wxDialog textViewDialog(this, wxID_ANY, "Page Text", - wxDefaultPosition, wxSize(700,500), - wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER); - wxStyledTextCtrl* text = new wxStyledTextCtrl(&textViewDialog, wxID_ANY); - text->SetText(m_browser->GetPageText()); - wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); - sizer->Add(text, 1, wxEXPAND); - SetSizer(sizer); - textViewDialog.ShowModal(); -} - -/** - * Invoked when user selects the "Menu" item - */ -void WebFrame::OnToolsClicked(wxCommandEvent& WXUNUSED(evt)) -{ - if(m_browser->GetCurrentURL() == "") - return; - - m_tools_tiny->Check(false); - m_tools_small->Check(false); - m_tools_medium->Check(false); - m_tools_large->Check(false); - m_tools_largest->Check(false); - - wxWebViewZoom zoom = m_browser->GetZoom(); - switch (zoom) - { - case wxWEBVIEW_ZOOM_TINY: - m_tools_tiny->Check(); - break; - case wxWEBVIEW_ZOOM_SMALL: - m_tools_small->Check(); - break; - case wxWEBVIEW_ZOOM_MEDIUM: - m_tools_medium->Check(); - break; - case wxWEBVIEW_ZOOM_LARGE: - m_tools_large->Check(); - break; - case wxWEBVIEW_ZOOM_LARGEST: - m_tools_largest->Check(); - break; - } - - m_edit_cut->Enable(m_browser->CanCut()); - m_edit_copy->Enable(m_browser->CanCopy()); - m_edit_paste->Enable(m_browser->CanPaste()); - - m_edit_undo->Enable(m_browser->CanUndo()); - m_edit_redo->Enable(m_browser->CanRedo()); - - m_selection_clear->Enable(m_browser->HasSelection()); - m_selection_delete->Enable(m_browser->HasSelection()); - - m_context_menu->Check(m_browser->IsContextMenuEnabled()); - - //Firstly we clear the existing menu items, then we add the current ones - wxMenuHistoryMap::const_iterator it; - for( it = m_histMenuItems.begin(); it != m_histMenuItems.end(); ++it ) - { - m_tools_history_menu->Destroy(it->first); - } - m_histMenuItems.clear(); - - wxVector > back = m_browser->GetBackwardHistory(); - wxVector > forward = m_browser->GetForwardHistory(); - - wxMenuItem* item; - - unsigned int i; - for(i = 0; i < back.size(); i++) - { - item = m_tools_history_menu->AppendRadioItem(wxID_ANY, back[i]->GetTitle()); - m_histMenuItems[item->GetId()] = back[i]; - Connect(item->GetId(), wxEVT_COMMAND_MENU_SELECTED, - wxCommandEventHandler(WebFrame::OnHistory), NULL, this ); - } - - wxString title = m_browser->GetCurrentTitle(); - if ( title.empty() ) - title = "(untitled)"; - item = m_tools_history_menu->AppendRadioItem(wxID_ANY, title); - item->Check(); - - //No need to connect the current item - m_histMenuItems[item->GetId()] = wxSharedPtr(new wxWebViewHistoryItem(m_browser->GetCurrentURL(), m_browser->GetCurrentTitle())); - - for(i = 0; i < forward.size(); i++) - { - item = m_tools_history_menu->AppendRadioItem(wxID_ANY, forward[i]->GetTitle()); - m_histMenuItems[item->GetId()] = forward[i]; - Connect(item->GetId(), wxEVT_COMMAND_TOOL_CLICKED, - wxCommandEventHandler(WebFrame::OnHistory), NULL, this ); - } - - wxPoint position = ScreenToClient( wxGetMousePosition() ); - PopupMenu(m_tools_menu, position.x, position.y); -} - -/** - * Invoked when user selects the zoom size in the menu - */ -void WebFrame::OnSetZoom(wxCommandEvent& evt) -{ - if (evt.GetId() == m_tools_tiny->GetId()) - { - m_browser->SetZoom(wxWEBVIEW_ZOOM_TINY); - } - else if (evt.GetId() == m_tools_small->GetId()) - { - m_browser->SetZoom(wxWEBVIEW_ZOOM_SMALL); - } - else if (evt.GetId() == m_tools_medium->GetId()) - { - m_browser->SetZoom(wxWEBVIEW_ZOOM_MEDIUM); - } - else if (evt.GetId() == m_tools_large->GetId()) - { - m_browser->SetZoom(wxWEBVIEW_ZOOM_LARGE); - } - else if (evt.GetId() == m_tools_largest->GetId()) - { - m_browser->SetZoom(wxWEBVIEW_ZOOM_LARGEST); - } - else - { - wxFAIL; - } -} - -void WebFrame::OnZoomLayout(wxCommandEvent& WXUNUSED(evt)) -{ - if(m_tools_layout->IsChecked()) - m_browser->SetZoomType(wxWEBVIEW_ZOOM_TYPE_LAYOUT); - else - m_browser->SetZoomType(wxWEBVIEW_ZOOM_TYPE_TEXT); -} - -void WebFrame::OnHistory(wxCommandEvent& evt) -{ - m_browser->LoadHistoryItem(m_histMenuItems[evt.GetId()]); -} - -void WebFrame::OnRunScript(wxCommandEvent& WXUNUSED(evt)) -{ - wxTextEntryDialog dialog(this, "Enter JavaScript to run.", wxGetTextFromUserPromptStr, "", wxOK|wxCANCEL|wxCENTRE|wxTE_MULTILINE); - if(dialog.ShowModal() == wxID_OK) - { - m_browser->RunScript(dialog.GetValue()); - } -} - -void WebFrame::OnClearSelection(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->ClearSelection(); -} - -void WebFrame::OnDeleteSelection(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->DeleteSelection(); -} - -void WebFrame::OnSelectAll(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->SelectAll(); -} - -/** - * Callback invoked when a loading error occurs - */ -void WebFrame::OnError(wxWebViewEvent& evt) -{ -#define WX_ERROR_CASE(type) \ - case type: \ - category = #type; \ - break; - - wxString category; - switch (evt.GetInt()) - { - WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_CONNECTION); - WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_CERTIFICATE); - WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_AUTH); - WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_SECURITY); - WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_NOT_FOUND); - WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_REQUEST); - WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_USER_CANCELLED); - WX_ERROR_CASE(wxWEBVIEW_NAV_ERR_OTHER); - } - - wxLogMessage("%s", "Error; url='" + evt.GetURL() + "', error='" + category + " (" + evt.GetString() + ")'"); - - //Show the info bar with an error - m_info->ShowMessage(_("An error occurred loading ") + evt.GetURL() + "\n" + - "'" + category + "'", wxICON_ERROR); - - UpdateState(); -} - -/** - * Invoked when user selects "Print" from the menu - */ -void WebFrame::OnPrint(wxCommandEvent& WXUNUSED(evt)) -{ - m_browser->Print(); -} - -SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) : - wxDialog(parent, wxID_ANY, "Source Code", - wxDefaultPosition, wxSize(700,500), - wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER) -{ - wxStyledTextCtrl* text = new wxStyledTextCtrl(this, wxID_ANY); - text->SetMarginWidth(1, 30); - text->SetMarginType(1, wxSTC_MARGIN_NUMBER); - text->SetText(source); - - text->StyleClearAll(); - text->SetLexer(wxSTC_LEX_HTML); - text->StyleSetForeground(wxSTC_H_DOUBLESTRING, wxColour(255,0,0)); - text->StyleSetForeground(wxSTC_H_SINGLESTRING, wxColour(255,0,0)); - text->StyleSetForeground(wxSTC_H_ENTITY, wxColour(255,0,0)); - text->StyleSetForeground(wxSTC_H_TAG, wxColour(0,150,0)); - text->StyleSetForeground(wxSTC_H_TAGUNKNOWN, wxColour(0,150,0)); - text->StyleSetForeground(wxSTC_H_ATTRIBUTE, wxColour(0,0,150)); - text->StyleSetForeground(wxSTC_H_ATTRIBUTEUNKNOWN, wxColour(0,0,150)); - text->StyleSetForeground(wxSTC_H_COMMENT, wxColour(150,150,150)); - - wxBoxSizer* sizer = new wxBoxSizer(wxVERTICAL); - sizer->Add(text, 1, wxEXPAND); - SetSizer(sizer); -} - -void WebFrame::OnClose(wxCloseEvent & WXUNUSED(evt)) -{ - delete m_timer; -// On Windows/Linux, calling `Shutdown` here will cause a crash when closing WebFrame. -// This is a temporary fix. -#ifdef __WXOSX__ - wxWebViewChromium::Shutdown(); -#endif - - Destroy(); -} +// Include the default webview sample +#define wxWEBVIEW_SAMPLE_CHROMIUM +#include "../webview/webview.cpp" diff --git a/samples/webview_chromium/wxlogo.xpm b/samples/webview_chromium/wxlogo.xpm deleted file mode 100644 index ca7708ead6..0000000000 --- a/samples/webview_chromium/wxlogo.xpm +++ /dev/null @@ -1,84 +0,0 @@ -/* XPM */ -static const char * wxlogo_xpm[] = { -"24 24 57 1", -" c None", -". c #000006", -"+ c #00003F", -"@ c #00003C", -"# c #000034", -"$ c #000000", -"% c #00000E", -"& c #000085", -"* c #000079", -"= c #000081", -"- c #000070", -"; c #00000D", -"> c #8686CB", -", c #FFFFFF", -"' c #000078", -") c #000080", -"! c #00006F", -"~ c #7F7FC7", -"{ c #00007F", -"] c #000083", -"^ c #000088", -"/ c #000076", -"( c #000047", -"_ c #000040", -": c #EDED00", -"< c #FFFF00", -"[ c #202000", -"} c #0E0000", -"| c #7F0000", -"1 c #770000", -"2 c #7E0000", -"3 c #E0E000", -"4 c #FFFF88", -"5 c #FFFF3F", -"6 c #1E1E00", -"7 c #1F0000", -"8 c #FF0000", -"9 c #FFFF80", -"0 c #1E0000", -"a c #FF8686", -"b c #00000F", -"c c #000082", -"d c #FFFF7F", -"e c #FF7F7F", -"f c #000007", -"g c #000044", -"h c #00003E", -"i c #00001F", -"j c #DE0000", -"k c #E00000", -"l c #C30000", -"m c #DEDE00", -"n c #DD0000", -"o c #DDDD00", -"p c #EAEA00", -"q c #780000", -"r c #680000", -" ", -" ", -" ", -" ", -" .+@@@@@@@#$ ", -" %&*======-$ ", -" ;>,')))))!$ ", -" ;~,')){]^/ ", -" ;~,'))=(%;$$$$$$$$", -" ;~,'))=_:<<<<<<<<[", -"}|1112;~,'))=_345<<<<<<6", -"788888;>,'))=_3,9<<<<<<6", -"0a,888b&*===c_3,d<<<<<<6", -"0e,888fg__h@@i3,d<<<<<<6", -"0e,888jkkl$ $m,d<<<<<<6", -"0e,888888n$ $o,9<<<<<<6", -"0e,888888n$ $o45<<<<<<6", -"0a,888888n$ $p<<<<<<<<[", -"788888888k$ $$$$$$$$$$", -"}|qqqqqqqr$ ", -" ", -" ", -" ", -" "}; From 3faf123fb615c70c4e78526b1682f348f03248e6 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Fri, 2 Feb 2018 16:18:19 +0100 Subject: [PATCH 127/275] Update configure with autoconf and fix building tests --- configure | 131 ++++++++++++++++++++++++++++++++++++++------------- configure.in | 3 ++ 2 files changed, 101 insertions(+), 33 deletions(-) diff --git a/configure b/configure index 8cb4a36c68..36a364acb0 100755 --- a/configure +++ b/configure @@ -1232,6 +1232,7 @@ enable_printarch enable_svg enable_webkit enable_webview +enable_webviewchromium enable_graphics_ctx enable_clipboard enable_dnd @@ -2172,6 +2173,7 @@ Optional Features: --enable-svg use wxSVGFileDC device context --enable-webkit use wxWebKitCtrl (Mac-only, use wxWebView instead) --enable-webview use wxWebView library + --enable-webviewchromium use wxWebView Chromium backend --enable-graphics_ctx use graphics context 2D drawing API --enable-clipboard use wxClipboard class --enable-dnd use Drag'n'Drop classes @@ -8801,6 +8803,35 @@ fi eval "$wx_cv_use_webview" + enablestring= + defaultval= + if test -z "$defaultval"; then + if test x"$enablestring" = xdisable; then + defaultval=yes + else + defaultval=no + fi + fi + + # Check whether --enable-webviewchromium was given. +if test "${enable_webviewchromium+set}" = set; then : + enableval=$enable_webviewchromium; + if test "$enableval" = yes; then + wx_cv_use_webviewchromium='wxUSE_WEBVIEW_CHROMIUM=yes' + else + wx_cv_use_webviewchromium='wxUSE_WEBVIEW_CHROMIUM=no' + fi + +else + + wx_cv_use_webviewchromium='wxUSE_WEBVIEW_CHROMIUM=${'DEFAULT_wxUSE_WEBVIEW_CHROMIUM":-$defaultval}" + +fi + + + eval "$wx_cv_use_webviewchromium" + + if test "$wxUSE_MAC" != 1; then enablestring= @@ -37656,7 +37687,7 @@ if test "$wxUSE_RICHTEXT" = "yes"; then fi if test "$wxUSE_WEBVIEW" = "yes"; then - USE_WEBVIEW_WEBKIT=0 + FOUND_WEBVIEW_BACKEND=0 USE_WEBVIEW_WEBKIT2=0 if test "$wxUSE_WEBVIEW_WEBKIT" = "yes"; then if test "$wxUSE_GTK" = 1; then @@ -37806,13 +37837,15 @@ fi echo "$WEBKIT_PKG_ERRORS" >&5 - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: webkitgtk not found." >&5 -$as_echo "$as_me: WARNING: webkitgtk not found." >&2;} + wxUSE_WEBVIEW_WEBKIT="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: WebKitGTK+ not found" >&5 +$as_echo "$as_me: WARNING: WebKitGTK+ not found" >&2;} elif test $pkg_failed = untried; then - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: webkitgtk not found." >&5 -$as_echo "$as_me: WARNING: webkitgtk not found." >&2;} + wxUSE_WEBVIEW_WEBKIT="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: WebKitGTK+ not found" >&5 +$as_echo "$as_me: WARNING: WebKitGTK+ not found" >&2;} else WEBKIT_CFLAGS=$pkg_cv_WEBKIT_CFLAGS @@ -37820,7 +37853,9 @@ else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } - USE_WEBVIEW_WEBKIT=1 + FOUND_WEBVIEW_BACKEND=1 + $as_echo "#define wxUSE_WEBVIEW_WEBKIT 1" >>confdefs.h + CPPFLAGS="$CPPFLAGS $WEBKIT_CFLAGS" EXTRALIBS_WEBVIEW="$WEBKIT_LIBS" @@ -37836,11 +37871,14 @@ fi " if test "x$ac_cv_header_WebKit_HIWebView_h" = xyes; then : - USE_WEBVIEW_WEBKIT=1 + FOUND_WEBVIEW_BACKEND=1 + $as_echo "#define wxUSE_WEBVIEW_WEBKIT 1" >>confdefs.h + WEBKIT_LINK="-framework WebKit" else + wxUSE_WEBVIEW_WEBKIT="no" { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: WebKit headers not found" >&5 $as_echo "$as_me: WARNING: WebKit headers not found" >&2;} @@ -37851,36 +37889,48 @@ fi fi fi - wxUSE_WEBVIEW="no" - if test "$wxUSE_GTK" = 1 -o "$wxUSE_MAC" = 1; then - if test "$USE_WEBVIEW_WEBKIT" = 1; then - wxUSE_WEBVIEW="yes" - $as_echo "#define wxUSE_WEBVIEW_WEBKIT 1" >>confdefs.h + if test "$wxUSE_MSW" = 1 -a "$wxUSE_WEBVIEW_IE" = "yes"; then + FOUND_WEBVIEW_BACKEND=1 + $as_echo "#define wxUSE_WEBVIEW_IE 1" >>confdefs.h - elif test "$USE_WEBVIEW_WEBKIT2" = 1; then - wxUSE_WEBVIEW="yes" - $as_echo "#define wxUSE_WEBVIEW_WEBKIT2 1" >>confdefs.h - - else - { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: WebKit not available, disabling wxWebView" >&5 -$as_echo "$as_me: WARNING: WebKit not available, disabling wxWebView" >&2;} - fi - elif test "$wxUSE_MSW" = 1; then - if test "$wxUSE_WEBVIEW_IE" = "yes"; then - wxUSE_WEBVIEW="yes" - $as_echo "#define wxUSE_WEBVIEW_IE 1" >>confdefs.h - - fi + else + wxUSE_WEBVIEW_IE="no" fi + if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then + old_CPPFLAGS="$CPPFLAGS" + CPPFLAGS="-I$srcdir/src/cef $CPPFLAGS" + ac_fn_c_check_header_mongrel "$LINENO" "include/cef_version.h" "ac_cv_header_include_cef_version_h" "$ac_includes_default" +if test "x$ac_cv_header_include_cef_version_h" = xyes; then : + + FOUND_WEBVIEW_BACKEND=1 + USE_WEBVIEW_CHROMIUM=1 + $as_echo "#define wxUSE_WEBVIEW_CHROMIUM 1" >>confdefs.h + + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview_chromium" + +else + + wxUSE_WEBVIEW_CHROMIUM="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Chromium headers not found" >&5 +$as_echo "$as_me: WARNING: Chromium headers not found" >&2;} + fi -if test "$wxUSE_WEBVIEW" = "yes"; then - USE_WEBVIEW=1 - $as_echo "#define wxUSE_WEBVIEW 1" >>confdefs.h - SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" -else - USE_WEBVIEW=0 + CPPFLAGS="$old_CPPFLAGS" + fi + if test "$FOUND_WEBVIEW_BACKEND" = 1; then + wxUSE_WEBVIEW="yes" + USE_WEBVIEW=1 + $as_echo "#define wxUSE_WEBVIEW 1" >>confdefs.h + + SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" + else + USE_WEBVIEW=0 + wxUSE_WEBVIEW="no" + { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No wxWebView backends found, disabling wxWebView" >&5 +$as_echo "$as_me: WARNING: No wxWebView backends found, disabling wxWebView" >&2;} + fi fi @@ -43255,6 +43305,21 @@ echo " zlib ${wxUSE_ZLIB}" echo " expat ${wxUSE_EXPAT}" echo " libmspack ${wxUSE_LIBMSPACK}" echo " sdl ${wxUSE_LIBSDL}" - +echo $ECHO_N " webview ${wxUSE_WEBVIEW}$ECHO_C" +if test "$wxUSE_WEBVIEW" = "yes"; then + echo $ECHO_N " (with backends:$ECHO_C" + if test "$wxUSE_WEBVIEW_WEBKIT" = "yes"; then + echo $ECHO_N " WebKit$ECHO_C" + fi + if test "$wxUSE_WEBVIEW_IE" = "yes"; then + echo $ECHO_N " IE$ECHO_C" + fi + if test "$wxUSE_WEBVIEW_CHROMIUM" = "yes"; then + echo $ECHO_N " Chromium$ECHO_C" + fi + echo ")" +else + echo +fi echo "" diff --git a/configure.in b/configure.in index 378edfc63a..0a86be49ed 100644 --- a/configure.in +++ b/configure.in @@ -7226,6 +7226,7 @@ if test "$wxUSE_WEBVIEW" = "yes"; then AC_CHECK_HEADER([include/cef_version.h], [ FOUND_WEBVIEW_BACKEND=1 + USE_WEBVIEW_CHROMIUM=1 AC_DEFINE(wxUSE_WEBVIEW_CHROMIUM) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview_chromium" ], @@ -7238,9 +7239,11 @@ if test "$wxUSE_WEBVIEW" = "yes"; then fi if test "$FOUND_WEBVIEW_BACKEND" = 1; then wxUSE_WEBVIEW="yes" + USE_WEBVIEW=1 AC_DEFINE(wxUSE_WEBVIEW) SAMPLES_SUBDIRS="$SAMPLES_SUBDIRS webview" else + USE_WEBVIEW=0 wxUSE_WEBVIEW="no" AC_MSG_WARN([No wxWebView backends found, disabling wxWebView]) fi From 82700ba90f07dd08cdc59de940de40010c1915bd Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Sat, 3 Feb 2018 10:49:53 +0100 Subject: [PATCH 128/275] Remove support for CEF versions before 3000 --- include/wx/webview_chromium.h | 6 ------ src/common/webview_chromium.cpp | 30 ++++-------------------------- 2 files changed, 4 insertions(+), 32 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 1efb2e03fb..2387f2ed28 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -25,9 +25,7 @@ #include "include/cef_client.h" #include "include/cef_scheme.h" #include "include/cef_version.h" -#if CHROME_VERSION_BUILD >= 2062 #include "include/base/cef_lock.h" -#endif #ifdef __VISUALC__ #pragma warning(pop) @@ -144,11 +142,7 @@ private: size_t m_offset; IMPLEMENT_REFCOUNTING(SchemeHandler); -#if CHROME_VERSION_BUILD >= 2062 base::Lock m_lock; -#else - IMPLEMENT_LOCKING(SchemeHandler); -#endif }; class SchemeHandlerFactory : public CefSchemeHandlerFactory diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 873b61da7d..5443575611 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -30,6 +30,10 @@ #pragma warning(pop) #endif +#if CHROME_VERSION_BUILD < 3000 +#error "Unsupported CEF version" +#endif + extern WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(const char) wxWebViewBackendChromium[] = "wxWebViewChromium"; wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewChromium, wxWebView); @@ -131,14 +135,6 @@ bool wxWebViewChromium::Create(wxWindow* parent, wxWebViewChromium::~wxWebViewChromium() { - CefRefPtr browser = m_clientHandler->GetBrowser(); - if ( browser.get() ) - { -#if CHROME_VERSION_BUILD < 1916 - // Let the browser window know we are about to destroy it. - browser->GetHost()->ParentWindowWillClose(); -#endif - } } void wxWebViewChromium::OnSize(wxSizeEvent& event) @@ -452,19 +448,13 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, // If there is no subprocess then we need to execute on this process if ( path.empty() ) { -#if CHROME_VERSION_BUILD >= 1750 code = CefExecuteProcess(args, NULL, NULL); -#else - code = CefExecuteProcess(args, NULL); -#endif if ( code >= 0 ) return false; } CefSettings settings; -#if CHROME_VERSION_BUILD >= 1750 settings.no_sandbox = true; -#endif #ifdef __WXDEBUG__ settings.log_severity = LOGSEVERITY_INFO; @@ -472,11 +462,7 @@ bool wxWebViewChromium::StartUp(int &code, const wxString &path, #endif CefString(&settings.browser_subprocess_path) = path.ToStdString(); -#if CHROME_VERSION_BUILD >= 1750 return CefInitialize(args, settings, NULL, NULL); -#else - return CefInitialize(args, settings, NULL); -#endif } void wxWebViewChromium::DoCEFWork() @@ -732,11 +718,7 @@ bool SchemeHandler::ProcessRequest(CefRefPtr request, { bool handled = false; -#if CHROME_VERSION_BUILD >= 2062 base::AutoLock lock_scope(m_lock); -#else - AutoLock lock_scope(this); -#endif std::string url = request->GetURL(); wxFSFile* file = m_handler->GetFile( url ); @@ -783,11 +765,7 @@ bool SchemeHandler::ReadResponse(void* data_out, bool has_data = false; bytes_read = 0; -#if CHROME_VERSION_BUILD >= 2062 base::AutoLock lock_scope(m_lock); -#else - AutoLock lock_scope(this); -#endif if ( m_offset < m_data.length() ) { From 276cb671b74983662b71a0ee68f80546a90038f7 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Sat, 3 Feb 2018 11:23:58 +0100 Subject: [PATCH 129/275] Remove CEF implementation details from header By moving all CEF implementation details a client does not require the CEF headers to use wxWebViewChromium --- include/wx/webview_chromium.h | 150 +------------------------------- src/common/webview_chromium.cpp | 139 +++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 148 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 2387f2ed28..da0edbce57 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -11,158 +11,12 @@ #if wxUSE_WEBVIEW && wxUSE_WEBVIEW_CHROMIUM -#include "wx/control.h" #include "wx/webview.h" -#include "wx/sharedptr.h" -#include "wx/vector.h" - -#ifdef __VISUALC__ -#pragma warning(push) -#pragma warning(disable:4100) -#endif - -#include "include/cef_browser.h" -#include "include/cef_client.h" -#include "include/cef_scheme.h" -#include "include/cef_version.h" -#include "include/base/cef_lock.h" - -#ifdef __VISUALC__ -#pragma warning(pop) -#endif extern WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(const char) wxWebViewBackendChromium[]; class wxWebViewChromium; - -// ClientHandler implementation. -class ClientHandler : public CefClient, - public CefContextMenuHandler, - public CefDisplayHandler, - public CefLifeSpanHandler, - public CefLoadHandler -{ -public: - ClientHandler() : m_loadErrorCode(-1) {} - virtual ~ClientHandler() {} - - virtual CefRefPtr GetContextMenuHandler() { return this; } - virtual CefRefPtr GetLifeSpanHandler() { return this; } - virtual CefRefPtr GetLoadHandler() { return this; } - virtual CefRefPtr GetDisplayHandler() { return this; } - - // CefDisplayHandler methods - virtual void OnLoadingStateChange(CefRefPtr browser, - bool isLoading, bool canGoBack, - bool canGoForward); - virtual void OnAddressChange(CefRefPtr browser, - CefRefPtr frame, - const CefString& url); - virtual void OnTitleChange(CefRefPtr browser, - const CefString& title); - virtual bool OnConsoleMessage(CefRefPtr browser, - const CefString& message, - const CefString& source, - int line); - - // CefContextMenuHandler methods - virtual void OnBeforeContextMenu(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - CefRefPtr model); - virtual bool OnContextMenuCommand(CefRefPtr browser, - CefRefPtr frame, - CefRefPtr params, - int command_id, - CefContextMenuHandler::EventFlags event_flags); - virtual void OnContextMenuDismissed(CefRefPtr browser, - CefRefPtr frame); - - // CefLifeSpanHandler methods - virtual bool OnBeforePopup(CefRefPtr browser, - CefRefPtr frame, - const CefString& target_url, - const CefString& target_frame_name, - const CefPopupFeatures& popupFeatures, - CefWindowInfo& windowInfo, - CefRefPtr& client, - CefBrowserSettings& settings, - bool* no_javascript_access); - virtual void OnAfterCreated(CefRefPtr browser); - virtual bool DoClose(CefRefPtr browser); - virtual void OnBeforeClose(CefRefPtr browser); - - // CefLoadHandler methods - virtual void OnLoadStart(CefRefPtr browser, - CefRefPtr frame); - virtual void OnLoadEnd(CefRefPtr browser, - CefRefPtr frame, - int httpStatusCode); - virtual void OnLoadError(CefRefPtr browser, - CefRefPtr frame, - ErrorCode errorCode, - const CefString& errorText, - const CefString& failedUrl); - - CefRefPtr GetBrowser() { return m_browser; } - - void SetWebView(wxWebViewChromium *webview) { m_webview = webview; } - -private: - CefRefPtr m_browser; - wxWebViewChromium *m_webview; - int m_browserId; - // Record the load error code: enum wxWebViewNavigationError - // -1 means no error. - int m_loadErrorCode; - IMPLEMENT_REFCOUNTING(ClientHandler); -}; - -class SchemeHandler : public CefResourceHandler -{ -public: - SchemeHandler(const wxSharedPtr& handler) : m_handler(handler), m_offset(0) {} - - // CefResourceHandler methods - virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback); - virtual void GetResponseHeaders(CefRefPtr response, - int64& response_length, - CefString& redirectUrl); - virtual bool ReadResponse(void* data_out, - int bytes_to_read, - int& bytes_read, - CefRefPtr callback); - virtual void Cancel() {} - -private: - wxSharedPtr m_handler; - std::string m_data; - std::string m_mime_type; - size_t m_offset; - - IMPLEMENT_REFCOUNTING(SchemeHandler); - base::Lock m_lock; -}; - -class SchemeHandlerFactory : public CefSchemeHandlerFactory -{ -public: - SchemeHandlerFactory(wxSharedPtr handler): m_handler(handler) {} - - // Return a new scheme handler instance to handle the request. - virtual CefRefPtr Create(CefRefPtr WXUNUSED(browser), - CefRefPtr WXUNUSED(frame), - const CefString& WXUNUSED(scheme_name), - CefRefPtr WXUNUSED(request)) - { - return new SchemeHandler( m_handler ); - } - - IMPLEMENT_REFCOUNTING(SchemeHandlerFactory); -private: - wxSharedPtr m_handler; -}; +class ClientHandler; class WXDLLIMPEXP_WEBVIEW_CHROMIUM wxWebViewChromium : public wxWebView { @@ -293,7 +147,7 @@ private: //We also friend ClientHandler so it can access the history friend class ClientHandler; - CefRefPtr m_clientHandler; + ClientHandler* m_clientHandler; wxDECLARE_DYNAMIC_CLASS(wxWebViewChromium); }; diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 5443575611..b67da71bab 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -24,7 +24,11 @@ #include "include/cef_app.h" #include "include/cef_browser.h" +#include "include/cef_client.h" +#include "include/cef_scheme.h" #include "include/cef_string_visitor.h" +#include "include/cef_version.h" +#include "include/base/cef_lock.h" #ifdef __VISUALC__ #pragma warning(pop) @@ -38,6 +42,135 @@ extern WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(const char) wxWebViewBackendChromium[] wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewChromium, wxWebView); +// ClientHandler implementation. +class ClientHandler : public CefClient, + public CefContextMenuHandler, + public CefDisplayHandler, + public CefLifeSpanHandler, + public CefLoadHandler +{ +public: + ClientHandler() : m_loadErrorCode(-1) {} + virtual ~ClientHandler() {} + + virtual CefRefPtr GetContextMenuHandler() { return this; } + virtual CefRefPtr GetLifeSpanHandler() { return this; } + virtual CefRefPtr GetLoadHandler() { return this; } + virtual CefRefPtr GetDisplayHandler() { return this; } + + // CefDisplayHandler methods + virtual void OnLoadingStateChange(CefRefPtr browser, + bool isLoading, bool canGoBack, + bool canGoForward); + virtual void OnAddressChange(CefRefPtr browser, + CefRefPtr frame, + const CefString& url); + virtual void OnTitleChange(CefRefPtr browser, + const CefString& title); + virtual bool OnConsoleMessage(CefRefPtr browser, + const CefString& message, + const CefString& source, + int line); + + // CefContextMenuHandler methods + virtual void OnBeforeContextMenu(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr params, + CefRefPtr model); + virtual bool OnContextMenuCommand(CefRefPtr browser, + CefRefPtr frame, + CefRefPtr params, + int command_id, + CefContextMenuHandler::EventFlags event_flags); + virtual void OnContextMenuDismissed(CefRefPtr browser, + CefRefPtr frame); + + // CefLifeSpanHandler methods + virtual bool OnBeforePopup(CefRefPtr browser, + CefRefPtr frame, + const CefString& target_url, + const CefString& target_frame_name, + const CefPopupFeatures& popupFeatures, + CefWindowInfo& windowInfo, + CefRefPtr& client, + CefBrowserSettings& settings, + bool* no_javascript_access); + virtual void OnAfterCreated(CefRefPtr browser); + virtual bool DoClose(CefRefPtr browser); + virtual void OnBeforeClose(CefRefPtr browser); + + // CefLoadHandler methods + virtual void OnLoadStart(CefRefPtr browser, + CefRefPtr frame); + virtual void OnLoadEnd(CefRefPtr browser, + CefRefPtr frame, + int httpStatusCode); + virtual void OnLoadError(CefRefPtr browser, + CefRefPtr frame, + ErrorCode errorCode, + const CefString& errorText, + const CefString& failedUrl); + + CefRefPtr GetBrowser() { return m_browser; } + + void SetWebView(wxWebViewChromium *webview) { m_webview = webview; } + +private: + CefRefPtr m_browser; + wxWebViewChromium *m_webview; + int m_browserId; + // Record the load error code: enum wxWebViewNavigationError + // -1 means no error. + int m_loadErrorCode; + IMPLEMENT_REFCOUNTING(ClientHandler); +}; + +class SchemeHandler : public CefResourceHandler +{ +public: + SchemeHandler(const wxSharedPtr& handler) : m_handler(handler), m_offset(0) {} + + // CefResourceHandler methods + virtual bool ProcessRequest(CefRefPtr request, + CefRefPtr callback); + virtual void GetResponseHeaders(CefRefPtr response, + int64& response_length, + CefString& redirectUrl); + virtual bool ReadResponse(void* data_out, + int bytes_to_read, + int& bytes_read, + CefRefPtr callback); + virtual void Cancel() {} + +private: + wxSharedPtr m_handler; + std::string m_data; + std::string m_mime_type; + size_t m_offset; + + IMPLEMENT_REFCOUNTING(SchemeHandler); + base::Lock m_lock; +}; + +class SchemeHandlerFactory : public CefSchemeHandlerFactory +{ +public: + SchemeHandlerFactory(wxSharedPtr handler) : m_handler(handler) {} + + // Return a new scheme handler instance to handle the request. + virtual CefRefPtr Create(CefRefPtr WXUNUSED(browser), + CefRefPtr WXUNUSED(frame), + const CefString& WXUNUSED(scheme_name), + CefRefPtr WXUNUSED(request)) + { + return new SchemeHandler(m_handler); + } + + IMPLEMENT_REFCOUNTING(SchemeHandlerFactory); +private: + wxSharedPtr m_handler; +}; + class wxStringVisitor : public CefStringVisitor { public: @@ -99,6 +232,7 @@ bool wxWebViewChromium::Create(wxWindow* parent, CefWindowInfo info; m_clientHandler = new ClientHandler(); + m_clientHandler->AddRef(); m_clientHandler->SetWebView(this); #ifdef __WXMSW__ @@ -135,6 +269,11 @@ bool wxWebViewChromium::Create(wxWindow* parent, wxWebViewChromium::~wxWebViewChromium() { + if (m_clientHandler) + { + m_clientHandler->Release(); + m_clientHandler = NULL; + } } void wxWebViewChromium::OnSize(wxSizeEvent& event) From 09bd796a76aa9fab95ae571fd5af64070d3927b6 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Sat, 3 Feb 2018 16:51:10 +0100 Subject: [PATCH 130/275] Add webview_chromium library to msw/version.rc --- src/msw/version.rc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/msw/version.rc b/src/msw/version.rc index f1ddd9dbcc..870749f09f 100644 --- a/src/msw/version.rc +++ b/src/msw/version.rc @@ -68,6 +68,8 @@ #define WXLIBDESC "styled text" #elif defined WXMAKINGDLL_WEBVIEW #define WXLIBDESC "webview" +#elif defined WXMAKINGDLL_WEBVIEW_CHROMIUM + #define WXLIBDESC "webview_chromium" #elif defined WXMAKINGDLL #define WXLIBDESC "monolithic" #else From f1bb68f3fc26a30f51cdf6ddd3beda4f1c879c3f Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Fri, 2 Feb 2018 16:24:35 +0100 Subject: [PATCH 131/275] Add wxWebViewChromium to CMake If wxUSE_WEBVIEW_CHROMIUM is enabled CEF is automatically downloaded during the build process --- build/cmake/files.cmake | 8 +++ build/cmake/lib/CMakeLists.txt | 1 + .../cmake/lib/webview_chromium/CMakeLists.txt | 59 +++++++++++++++++++ .../cef_update_version_info.cmake | 34 +++++++++++ .../webview_chromium/cef_version_info.cmake | 37 ++++++++++++ .../cef_version_info.cmake.in | 37 ++++++++++++ .../lib/webview_chromium/fixup_cef.cmake | 16 +++++ build/cmake/options.cmake | 1 + build/cmake/samples/CMakeLists.txt | 4 +- build/cmake/samples/webview.cmake | 36 +++++++++++ build/cmake/setup.h.in | 2 + build/files | 8 +++ samples/webview/compatibility.manifest | 17 ++++++ 13 files changed, 259 insertions(+), 1 deletion(-) create mode 100644 build/cmake/lib/webview_chromium/CMakeLists.txt create mode 100644 build/cmake/lib/webview_chromium/cef_update_version_info.cmake create mode 100644 build/cmake/lib/webview_chromium/cef_version_info.cmake create mode 100644 build/cmake/lib/webview_chromium/cef_version_info.cmake.in create mode 100644 build/cmake/lib/webview_chromium/fixup_cef.cmake create mode 100644 build/cmake/samples/webview.cmake create mode 100644 samples/webview/compatibility.manifest diff --git a/build/cmake/files.cmake b/build/cmake/files.cmake index d6d9c6becb..bb55e83681 100644 --- a/build/cmake/files.cmake +++ b/build/cmake/files.cmake @@ -2935,6 +2935,14 @@ set(WEBVIEW_GTK_SRC src/gtk/webview_webkit.cpp ) +set(WEBVIEWCHROMIUM_HDR + wx/webview.h + wx/webview_chromium.h +) +set(WEBVIEWCHROMIUM_SRC + src/common/webview_chromium.cpp +) + set(XRC_SRC src/xrc/xh_activityindicator.cpp src/xrc/xh_animatctrl.cpp diff --git a/build/cmake/lib/CMakeLists.txt b/build/cmake/lib/CMakeLists.txt index 45a7696d01..4f09b688db 100644 --- a/build/cmake/lib/CMakeLists.txt +++ b/build/cmake/lib/CMakeLists.txt @@ -60,6 +60,7 @@ if(wxUSE_GUI) add_opt_lib(media wxUSE_MEDIACTRL) add_opt_lib(gl wxUSE_OPENGL) add_opt_lib(qa wxUSE_DEBUGREPORT) + add_opt_lib(webview_chromium wxUSE_WEBVIEW_CHROMIUM) endif() # wxUSE_GUI # Include cmake file for every library diff --git a/build/cmake/lib/webview_chromium/CMakeLists.txt b/build/cmake/lib/webview_chromium/CMakeLists.txt new file mode 100644 index 0000000000..3ebc33ba25 --- /dev/null +++ b/build/cmake/lib/webview_chromium/CMakeLists.txt @@ -0,0 +1,59 @@ +############################################################################# +# Name: build/cmake/lib/webview_chromium/CMakeLists.txt +# Purpose: CMake file for webview_chromium library +# Author: Tobias Taschner +# Created: 2018-02-03 +# Copyright: (c) 2018 wxWidgets development team +# Licence: wxWindows licence +############################################################################# + +include(../../source_groups.cmake) + +include(cef_version_info.cmake) + +ExternalProject_Add( + cef + URL ${CEF_URL} + URL_HASH SHA1=${CEF_SHA1} + PATCH_COMMAND + ${CMAKE_COMMAND} -P ${CMAKE_CURRENT_SOURCE_DIR}/fixup_cef.cmake + CMAKE_ARGS -DUSE_ATL=OFF -DUSE_SANDBOX=OFF + BUILD_COMMAND + ${CMAKE_COMMAND} --build . --target libcef_dll_wrapper --config $ + INSTALL_COMMAND "" +) + +ExternalProject_Get_property(cef SOURCE_DIR) +ExternalProject_Get_property(cef BINARY_DIR) +add_library(libcef_dll_wrapper STATIC IMPORTED) +get_property(HAVE_MULTI_CONFIG_GENERATOR GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) +if(HAVE_MULTI_CONFIG_GENERATOR) + set_target_properties(libcef_dll_wrapper PROPERTIES + IMPORTED_LOCATION_DEBUG ${BINARY_DIR}/libcef_dll_wrapper/Debug/libcef_dll_wrapper${CMAKE_STATIC_LIBRARY_SUFFIX} + IMPORTED_LOCATION_RELEASE ${BINARY_DIR}/libcef_dll_wrapper/Release/libcef_dll_wrapper${CMAKE_STATIC_LIBRARY_SUFFIX} + ) +else() + set_target_properties(libcef_dll_wrapper PROPERTIES + IMPORTED_LOCATION ${BINARY_DIR}/libcef_dll_wrapper/libcef_dll_wrapper${CMAKE_STATIC_LIBRARY_SUFFIX} + ) +endif() +add_library(libcef STATIC IMPORTED) +if(APPLE) + set_target_properties(libcef PROPERTIES + IMPORTED_LOCATION_DEBUG "${SOURCE_DIR}/Debug/Chromium Embedded Framework.framework/Chromium Embedded Framework" + IMPORTED_LOCATION_RELEASE "${SOURCE_DIR}/Release/Chromium Embedded Framework.framework/Chromium Embedded Framework" + ) +else() + set_target_properties(libcef PROPERTIES + IMPORTED_LOCATION_DEBUG ${SOURCE_DIR}/Debug/libcef${CMAKE_LINK_LIBRARY_SUFFIX} + IMPORTED_LOCATION_RELEASE ${SOURCE_DIR}/Release/libcef${CMAKE_LINK_LIBRARY_SUFFIX} + ) +endif() + +wx_append_sources(WEBVIEW_CHROMIUM_FILES WEBVIEWCHROMIUM) +wx_add_library(webview_chromium ${WEBVIEW_CHROMIUM_FILES}) +wx_lib_include_directories(webview_chromium PRIVATE ${SOURCE_DIR}) +wx_lib_link_libraries(webview_chromium PUBLIC webview PRIVATE libcef libcef_dll_wrapper) +add_dependencies(webview_chromium cef) + +wx_finalize_lib(webview) diff --git a/build/cmake/lib/webview_chromium/cef_update_version_info.cmake b/build/cmake/lib/webview_chromium/cef_update_version_info.cmake new file mode 100644 index 0000000000..692ce81383 --- /dev/null +++ b/build/cmake/lib/webview_chromium/cef_update_version_info.cmake @@ -0,0 +1,34 @@ +############################################################################# +# Name: build/cmake/lib/webview_chromium/cef_update_version_info.cmake +# Purpose: Script to update +# Author: Tobias Taschner +# Created: 2018-02-03 +# Copyright: (c) 2018 wxWidgets development team +# Licence: wxWindows licence +############################################################################# + +# Use this script to automatically update cef_version_info.cmake +# +# Run this script with cmake script mode +# cmake -D CEF_VERSION=3.x.y.z.h -P cef_update_version_info.cmake + +if(NOT DEFINED CEF_VERSION) + message(FATAL_ERROR "CEF_VERSION not defined") +endif() + +set(CEF_BASE_URL "http://opensource.spotify.com/cefbuilds/cef_binary_") +set(CEF_FILE_EXT ".tar.bz2") + +set(sha_file ${CMAKE_BINARY_DIR}/__info_sha.txt) +foreach(platform macosx64 linux32 linux64 windows32 windows64) + file(DOWNLOAD "${CEF_BASE_URL}${CEF_VERSION}_${platform}${CEF_FILE_EXT}.sha1" "${sha_file}") + file(READ "${sha_file}" CEF_SHA1_${platform}) +endforeach() + +file(REMOVE ${sha_file}) + +configure_file( + cef_version_info.cmake.in + cef_version_info.cmake + @ONLY +) diff --git a/build/cmake/lib/webview_chromium/cef_version_info.cmake b/build/cmake/lib/webview_chromium/cef_version_info.cmake new file mode 100644 index 0000000000..b330238918 --- /dev/null +++ b/build/cmake/lib/webview_chromium/cef_version_info.cmake @@ -0,0 +1,37 @@ +############################################################################# +# Name: build/cmake/lib/webview_chromium/cef_version_info.cmake +# Purpose: CMake file CEF version information +# Author: Tobias Taschner +# Created: 2018-02-03 +# Copyright: (c) 2018 wxWidgets development team +# Licence: wxWindows licence +############################################################################# + +# +# DO NOT MODIFY MANUALLY +# +# To update the include file see cef_update_version_info.cmake + +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(CEF_PLATFORM "macosx64") + set(CEF_SHA1 "ca26459c5ef344cac04b2ed121514db79e067cff") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(CMAKE_SIZEOF_VOID_P LESS 8) + set(CEF_PLATFORM "linux32") + set(CEF_SHA1 "75bacba21804024a29ae2f0780d079b04f6b607f") + else() + set(CEF_PLATFORM "linux64") + set(CEF_SHA1 "3d1674170e9b79c4d7c0749a0879db7d6abef7fe") + endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") + if(CMAKE_SIZEOF_VOID_P LESS 8) + set(CEF_PLATFORM "windows32") + set(CEF_SHA1 "bbdfbb1733c07edbcaab75f963f82694a94c8968") + else() + set(CEF_PLATFORM "windows64") + set(CEF_SHA1 "87fcdab9c20ae7494455460eb3f3e658abe95013") + endif() +else() + message(ERROR "Unsupported CEF system") +endif() +set(CEF_URL "http://opensource.spotify.com/cefbuilds/cef_binary_3.3239.1723.g071d1c1_${CEF_PLATFORM}.tar.bz2") diff --git a/build/cmake/lib/webview_chromium/cef_version_info.cmake.in b/build/cmake/lib/webview_chromium/cef_version_info.cmake.in new file mode 100644 index 0000000000..09e3fa64a1 --- /dev/null +++ b/build/cmake/lib/webview_chromium/cef_version_info.cmake.in @@ -0,0 +1,37 @@ +############################################################################# +# Name: build/cmake/lib/webview_chromium/cef_version_info.cmake +# Purpose: CMake file CEF version information +# Author: Tobias Taschner +# Created: 2018-02-03 +# Copyright: (c) 2018 wxWidgets development team +# Licence: wxWindows licence +############################################################################# + +# +# DO NOT MODIFY MANUALLY +# +# To update the include file see cef_update_version_info.cmake + +if(CMAKE_SYSTEM_NAME STREQUAL "Darwin") + set(CEF_PLATFORM "macosx64") + set(CEF_SHA1 "@CEF_SHA1_macosx64@") +elseif(CMAKE_SYSTEM_NAME STREQUAL "Linux") + if(CMAKE_SIZEOF_VOID_P LESS 8) + set(CEF_PLATFORM "linux32") + set(CEF_SHA1 "@CEF_SHA1_linux32@") + else() + set(CEF_PLATFORM "linux64") + set(CEF_SHA1 "@CEF_SHA1_linux64@") + endif() +elseif(CMAKE_SYSTEM_NAME STREQUAL "Windows") + if(CMAKE_SIZEOF_VOID_P LESS 8) + set(CEF_PLATFORM "windows32") + set(CEF_SHA1 "@CEF_SHA1_windows32@") + else() + set(CEF_PLATFORM "windows64") + set(CEF_SHA1 "@CEF_SHA1_windows64@") + endif() +else() + message(ERROR "Unsupported CEF system") +endif() +set(CEF_URL "@CEF_BASE_URL@@CEF_VERSION@_${CEF_PLATFORM}@CEF_FILE_EXT@") diff --git a/build/cmake/lib/webview_chromium/fixup_cef.cmake b/build/cmake/lib/webview_chromium/fixup_cef.cmake new file mode 100644 index 0000000000..7ce8c6663e --- /dev/null +++ b/build/cmake/lib/webview_chromium/fixup_cef.cmake @@ -0,0 +1,16 @@ +############################################################################# +# Name: build/cmake/lib/webview/fixup_cef.cmake +# Purpose: CMake script to up patch CEF +# Author: Tobias Taschner +# Created: 2018-02-03 +# Copyright: (c) 2018 wxWidgets development team +# Licence: wxWindows licence +############################################################################# + +# This script modifies CEF cmake files to allow different VC runtime settings + +set(var_file cmake/cef_variables.cmake) + +file(READ ${var_file} var_file_contents) +string(REGEX REPLACE "/MTd?" "" new_file_contents ${var_file_contents}) +file(WRITE "${var_file}" ${new_file_contents}) diff --git a/build/cmake/options.cmake b/build/cmake/options.cmake index b01db3261f..3b41ef0a6f 100644 --- a/build/cmake/options.cmake +++ b/build/cmake/options.cmake @@ -187,6 +187,7 @@ wx_option(wxUSE_AFM_FOR_POSTSCRIPT "in wxPostScriptDC class use AFM (adobe font wx_option(wxUSE_PRINTING_ARCHITECTURE "use printing architecture") wx_option(wxUSE_SVG "use wxSVGFileDC device context") wx_option(wxUSE_WEBVIEW "use wxWebView library") +wx_option(wxUSE_WEBVIEW_CHROMIUM "Enable CEF based wxWebViewChromium" OFF) if(APPLE) wx_option(wxUSE_WEBKIT "use wxWebKitCtrl (Mac-only, use wxWebView instead)") endif() diff --git a/build/cmake/samples/CMakeLists.txt b/build/cmake/samples/CMakeLists.txt index bb0a87e23e..58bd55e286 100644 --- a/build/cmake/samples/CMakeLists.txt +++ b/build/cmake/samples/CMakeLists.txt @@ -142,7 +142,9 @@ wx_add_sample(typetest typetest.cpp typetest.h) wx_add_sample(uiaction DEPENDS wxUSE_UIACTIONSIMULATOR) wx_add_sample(validate validate.cpp validate.h DEPENDS wxUSE_VALIDATORS) wx_add_sample(vscroll vstest.cpp) -wx_add_sample(webview LIBRARIES webview stc adv NAME webviewsample DEPENDS wxUSE_WEBVIEW) +if(wxUSE_WEBVIEW) + include(webview.cmake) +endif() # widgets Sample set(SAMPLE_WIDGETS_SRC activityindicator.cpp diff --git a/build/cmake/samples/webview.cmake b/build/cmake/samples/webview.cmake new file mode 100644 index 0000000000..2f80aae75f --- /dev/null +++ b/build/cmake/samples/webview.cmake @@ -0,0 +1,36 @@ +############################################################################# +# Name: build/cmake/samples/webview.cmake +# Purpose: CMake script to build webview samples +# Author: Tobias Taschner +# Created: 2018-02-17 +# Copyright: (c) 2018 wxWidgets development team +# Licence: wxWindows licence +############################################################################# + +wx_add_sample(webview LIBRARIES webview stc adv NAME webviewsample) + +if(wxUSE_WEBVIEW_CHROMIUM) + wx_add_sample(webview LIBRARIES webview_chromium stc adv NAME webviewsample_chromium) + target_compile_definitions(webviewsample_chromium PRIVATE -DwxWEBVIEW_SAMPLE_CHROMIUM) + ExternalProject_Get_property(cef SOURCE_DIR) + if(WIN32) + add_custom_command( + TARGET webviewsample_chromium + POST_BUILD + # Add compatiblity manifest + COMMAND + mt.exe /nologo -manifest ${wxSOURCE_DIR}/samples/webview/compatibility.manifest + "-inputresource:$;#1" + "-outputresource:$;#1" + # Copy CEF libraries + COMMAND + ${CMAKE_COMMAND} -E copy_directory ${SOURCE_DIR}/$ $ + # Copy CEF resources + COMMAND + ${CMAKE_COMMAND} -E copy_directory ${SOURCE_DIR}/Resources $ + COMMENT "Prepare executable for runtime..." + ) + elseif(APPLE) + # TODO: define and build helper bundle + endif() +endif() diff --git a/build/cmake/setup.h.in b/build/cmake/setup.h.in index 4f244d7da4..577511534a 100644 --- a/build/cmake/setup.h.in +++ b/build/cmake/setup.h.in @@ -321,6 +321,8 @@ #cmakedefine01 wxUSE_WEBVIEW +#cmakedefine01 wxUSE_WEBVIEW_CHROMIUM + #ifdef __WXMSW__ #cmakedefine01 wxUSE_WEBVIEW_IE #else diff --git a/build/files b/build/files index e81c72ebdc..ad0ae37284 100644 --- a/build/files +++ b/build/files @@ -2844,6 +2844,14 @@ WEBVIEW_GTK_HDR = WEBVIEW_GTK_SRC = src/gtk/webview_webkit.cpp +# wxWEBVIEWCHORMIUM + +WEBVIEWCHROMIUM_HDR = + wx/webview.h + wx/webview_chromium.h +WEBVIEWCHROMIUM_SRC = + src/common/webview_chromium.cpp + # wxXRC XRC_SRC = diff --git a/samples/webview/compatibility.manifest b/samples/webview/compatibility.manifest new file mode 100644 index 0000000000..10d10da382 --- /dev/null +++ b/samples/webview/compatibility.manifest @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + From 08434378d72d6f5af8a57a7f5029916081a49c88 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Mon, 5 Feb 2018 10:27:51 +0100 Subject: [PATCH 132/275] Mark overriden virtual methods with override Also update signatures of two CEF overrides. --- include/wx/webview_chromium.h | 92 ++++++++++++++++----------------- src/common/webview_chromium.cpp | 56 +++++++++++--------- 2 files changed, 77 insertions(+), 71 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index da0edbce57..f6cbfd6a47 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -48,72 +48,72 @@ public: const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = 0, - const wxString& name = wxWebViewNameStr); + const wxString& name = wxWebViewNameStr) wxOVERRIDE; - virtual void LoadURL(const wxString& url); - virtual void LoadHistoryItem(wxSharedPtr item); - virtual wxVector > GetBackwardHistory(); - virtual wxVector > GetForwardHistory(); + virtual void LoadURL(const wxString& url) wxOVERRIDE; + virtual void LoadHistoryItem(wxSharedPtr item) wxOVERRIDE; + virtual wxVector > GetBackwardHistory() wxOVERRIDE; + virtual wxVector > GetForwardHistory() wxOVERRIDE; - virtual bool CanGoForward() const; - virtual bool CanGoBack() const; - virtual void GoBack(); - virtual void GoForward(); - virtual void ClearHistory(); - virtual void EnableHistory(bool enable = true); - virtual void Stop(); - virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT); + virtual bool CanGoForward() const wxOVERRIDE; + virtual bool CanGoBack() const wxOVERRIDE; + virtual void GoBack() wxOVERRIDE; + virtual void GoForward() wxOVERRIDE; + virtual void ClearHistory() wxOVERRIDE; + virtual void EnableHistory(bool enable = true) wxOVERRIDE; + virtual void Stop() wxOVERRIDE; + virtual void Reload(wxWebViewReloadFlags flags = wxWEBVIEW_RELOAD_DEFAULT) wxOVERRIDE; - virtual wxString GetPageSource() const; - virtual wxString GetPageText() const; + virtual wxString GetPageSource() const wxOVERRIDE; + virtual wxString GetPageText() const wxOVERRIDE; - virtual bool IsBusy() const; - virtual wxString GetCurrentURL() const; - virtual wxString GetCurrentTitle() const; + virtual bool IsBusy() const wxOVERRIDE; + virtual wxString GetCurrentURL() const wxOVERRIDE; + virtual wxString GetCurrentTitle() const wxOVERRIDE; - virtual void SetZoomType(wxWebViewZoomType type); - virtual wxWebViewZoomType GetZoomType() const; - virtual bool CanSetZoomType(wxWebViewZoomType type) const; + virtual void SetZoomType(wxWebViewZoomType type) wxOVERRIDE; + virtual wxWebViewZoomType GetZoomType() const wxOVERRIDE; + virtual bool CanSetZoomType(wxWebViewZoomType type) const wxOVERRIDE; - virtual void Print(); + virtual void Print() wxOVERRIDE; - virtual wxWebViewZoom GetZoom() const; - virtual void SetZoom(wxWebViewZoom zoom); + virtual wxWebViewZoom GetZoom() const wxOVERRIDE; + virtual void SetZoom(wxWebViewZoom zoom) wxOVERRIDE; - virtual void* GetNativeBackend() const; + virtual void* GetNativeBackend() const wxOVERRIDE; - virtual long Find(const wxString& WXUNUSED(text), int WXUNUSED(flags) = wxWEBVIEW_FIND_DEFAULT) { return wxNOT_FOUND; } + virtual long Find(const wxString& WXUNUSED(text), int WXUNUSED(flags) = wxWEBVIEW_FIND_DEFAULT) wxOVERRIDE { return wxNOT_FOUND; } //Clipboard functions - virtual bool CanCut() const { return true; } - virtual bool CanCopy() const { return true; } - virtual bool CanPaste() const { return true; } - virtual void Cut(); - virtual void Copy(); - virtual void Paste(); + virtual bool CanCut() const wxOVERRIDE { return true; } + virtual bool CanCopy() const wxOVERRIDE { return true; } + virtual bool CanPaste() const wxOVERRIDE { return true; } + virtual void Cut() wxOVERRIDE; + virtual void Copy() wxOVERRIDE; + virtual void Paste() wxOVERRIDE; //Undo / redo functionality - virtual bool CanUndo() const { return true; } - virtual bool CanRedo() const { return true; } - virtual void Undo(); - virtual void Redo(); + virtual bool CanUndo() const wxOVERRIDE { return true; } + virtual bool CanRedo() const wxOVERRIDE { return true; } + virtual void Undo() wxOVERRIDE; + virtual void Redo() wxOVERRIDE; //Editing functions - virtual void SetEditable(bool enable = true); - virtual bool IsEditable() const { return false; } + virtual void SetEditable(bool enable = true) wxOVERRIDE; + virtual bool IsEditable() const wxOVERRIDE { return false; } //Selection - virtual void SelectAll(); - virtual bool HasSelection() const { return false; } - virtual void DeleteSelection(); - virtual wxString GetSelectedText() const { return ""; } - virtual wxString GetSelectedSource() const { return ""; } - virtual void ClearSelection(); + virtual void SelectAll() wxOVERRIDE; + virtual bool HasSelection() const wxOVERRIDE { return false; } + virtual void DeleteSelection() wxOVERRIDE; + virtual wxString GetSelectedText() const wxOVERRIDE { return ""; } + virtual wxString GetSelectedSource() const wxOVERRIDE { return ""; } + virtual void ClearSelection() wxOVERRIDE; virtual bool RunScript(const wxString& javascript, wxString* output = NULL) wxOVERRIDE; //Virtual Filesystem Support - virtual void RegisterHandler(wxSharedPtr handler); + virtual void RegisterHandler(wxSharedPtr handler) wxOVERRIDE; #ifdef __WXMSW__ static bool StartUp(int &code, const wxString &path = ""); @@ -126,7 +126,7 @@ public: static void DoCEFWork(); protected: - virtual void DoSetPage(const wxString& html, const wxString& baseUrl); + virtual void DoSetPage(const wxString& html, const wxString& baseUrl) wxOVERRIDE; private: //History related variables, we currently use our own implementation diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index b67da71bab..caf92f1cb3 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -53,63 +53,66 @@ public: ClientHandler() : m_loadErrorCode(-1) {} virtual ~ClientHandler() {} - virtual CefRefPtr GetContextMenuHandler() { return this; } - virtual CefRefPtr GetLifeSpanHandler() { return this; } - virtual CefRefPtr GetLoadHandler() { return this; } - virtual CefRefPtr GetDisplayHandler() { return this; } + virtual CefRefPtr GetContextMenuHandler() wxOVERRIDE { return this; } + virtual CefRefPtr GetLifeSpanHandler() wxOVERRIDE { return this; } + virtual CefRefPtr GetLoadHandler() wxOVERRIDE { return this; } + virtual CefRefPtr GetDisplayHandler() wxOVERRIDE { return this; } // CefDisplayHandler methods virtual void OnLoadingStateChange(CefRefPtr browser, bool isLoading, bool canGoBack, - bool canGoForward); + bool canGoForward) wxOVERRIDE; virtual void OnAddressChange(CefRefPtr browser, CefRefPtr frame, - const CefString& url); + const CefString& url) wxOVERRIDE; virtual void OnTitleChange(CefRefPtr browser, - const CefString& title); + const CefString& title) wxOVERRIDE; virtual bool OnConsoleMessage(CefRefPtr browser, const CefString& message, const CefString& source, - int line); + int line) wxOVERRIDE; // CefContextMenuHandler methods virtual void OnBeforeContextMenu(CefRefPtr browser, CefRefPtr frame, CefRefPtr params, - CefRefPtr model); + CefRefPtr model) wxOVERRIDE; virtual bool OnContextMenuCommand(CefRefPtr browser, CefRefPtr frame, CefRefPtr params, int command_id, - CefContextMenuHandler::EventFlags event_flags); + CefContextMenuHandler::EventFlags event_flags) wxOVERRIDE; virtual void OnContextMenuDismissed(CefRefPtr browser, - CefRefPtr frame); + CefRefPtr frame) wxOVERRIDE; // CefLifeSpanHandler methods virtual bool OnBeforePopup(CefRefPtr browser, CefRefPtr frame, const CefString& target_url, const CefString& target_frame_name, + WindowOpenDisposition target_disposition, + bool user_gesture, const CefPopupFeatures& popupFeatures, CefWindowInfo& windowInfo, CefRefPtr& client, CefBrowserSettings& settings, - bool* no_javascript_access); - virtual void OnAfterCreated(CefRefPtr browser); - virtual bool DoClose(CefRefPtr browser); - virtual void OnBeforeClose(CefRefPtr browser); + bool* no_javascript_access) wxOVERRIDE; + virtual void OnAfterCreated(CefRefPtr browser) wxOVERRIDE; + virtual bool DoClose(CefRefPtr browser) wxOVERRIDE; + virtual void OnBeforeClose(CefRefPtr browser) wxOVERRIDE; // CefLoadHandler methods virtual void OnLoadStart(CefRefPtr browser, - CefRefPtr frame); + CefRefPtr frame, + TransitionType transition_type) wxOVERRIDE; virtual void OnLoadEnd(CefRefPtr browser, CefRefPtr frame, - int httpStatusCode); + int httpStatusCode) wxOVERRIDE; virtual void OnLoadError(CefRefPtr browser, CefRefPtr frame, ErrorCode errorCode, const CefString& errorText, - const CefString& failedUrl); + const CefString& failedUrl) wxOVERRIDE; CefRefPtr GetBrowser() { return m_browser; } @@ -132,15 +135,15 @@ public: // CefResourceHandler methods virtual bool ProcessRequest(CefRefPtr request, - CefRefPtr callback); + CefRefPtr callback) wxOVERRIDE; virtual void GetResponseHeaders(CefRefPtr response, int64& response_length, - CefString& redirectUrl); + CefString& redirectUrl) wxOVERRIDE; virtual bool ReadResponse(void* data_out, int bytes_to_read, int& bytes_read, - CefRefPtr callback); - virtual void Cancel() {} + CefRefPtr callback) wxOVERRIDE; + virtual void Cancel() wxOVERRIDE {} private: wxSharedPtr m_handler; @@ -161,7 +164,7 @@ public: virtual CefRefPtr Create(CefRefPtr WXUNUSED(browser), CefRefPtr WXUNUSED(frame), const CefString& WXUNUSED(scheme_name), - CefRefPtr WXUNUSED(request)) + CefRefPtr WXUNUSED(request)) wxOVERRIDE { return new SchemeHandler(m_handler); } @@ -181,7 +184,7 @@ public: }; wxStringVisitor(wxWebViewChromium* webview, StringType type) : m_type(type), m_webview(webview) {} - void Visit(const CefString& string) + void Visit(const CefString& string) wxOVERRIDE { switch(m_type) { @@ -673,6 +676,8 @@ bool ClientHandler::OnBeforePopup(CefRefPtr WXUNUSED(browser), CefRefPtr WXUNUSED(frame), const CefString& target_url, const CefString& target_frame_name, + WindowOpenDisposition WXUNUSED(target_disposition), + bool WXUNUSED(user_gesture), const CefPopupFeatures& WXUNUSED(popupFeatures), CefWindowInfo& WXUNUSED(windowInfo), CefRefPtr& WXUNUSED(client), @@ -713,7 +718,8 @@ void ClientHandler::OnBeforeClose(CefRefPtr browser) // CefLoadHandler methods void ClientHandler::OnLoadStart(CefRefPtr WXUNUSED(browser), - CefRefPtr frame) + CefRefPtr frame, + TransitionType WXUNUSED(transition_type)) { wxString url = frame->GetURL().ToString(); wxString target = frame->GetName().ToString(); From eca584e7190180bcf3bd0c153dac74bbcf6e80f5 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Mon, 5 Feb 2018 16:17:36 +0100 Subject: [PATCH 133/275] Integrate all CEF initialization and message loop work into implementation Handle Startup and Shutdown of CEF in a wxModule and don't require the user to implement a timer to handle the CEF work loop --- include/wx/webview_chromium.h | 17 ++--- interface/wx/webview_chromium.h | 11 +-- samples/webview/webview.cpp | 63 ----------------- src/common/webview_chromium.cpp | 122 +++++++++++++++++++++----------- 4 files changed, 89 insertions(+), 124 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index f6cbfd6a47..2000a17487 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -12,6 +12,7 @@ #if wxUSE_WEBVIEW && wxUSE_WEBVIEW_CHROMIUM #include "wx/webview.h" +#include "wx/timer.h" extern WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(const char) wxWebViewBackendChromium[]; @@ -115,16 +116,6 @@ public: //Virtual Filesystem Support virtual void RegisterHandler(wxSharedPtr handler) wxOVERRIDE; -#ifdef __WXMSW__ - static bool StartUp(int &code, const wxString &path = ""); -#else - static bool StartUp(int &code, const wxString &path, - int argc, char* argv[]); -#endif - - static void Shutdown(); - static void DoCEFWork(); - protected: virtual void DoSetPage(const wxString& html, const wxString& baseUrl) wxOVERRIDE; @@ -149,6 +140,12 @@ private: friend class ClientHandler; ClientHandler* m_clientHandler; + static int ms_activeWebViewCount; + // A timer to run CEF message loop. + static wxTimer* ms_workTimer; + + static void OnWorkTimer(wxTimerEvent& evt); + wxDECLARE_DYNAMIC_CLASS(wxWebViewChromium); }; diff --git a/interface/wx/webview_chromium.h b/interface/wx/webview_chromium.h index 9d24bbfd37..8590370a08 100644 --- a/interface/wx/webview_chromium.h +++ b/interface/wx/webview_chromium.h @@ -166,24 +166,17 @@ public: long style = 0, const wxString& name = wxWebViewNameStr); /** - StartUp function for Windows platform. + StartUp function Setup CEF3 environment, creating and initializing browser/renderer processes. */ static bool StartUp(int &code, const wxString &path = ""); /** - StartUp function for Linux/Mac OS X platforms. - Setup CEF3 environment, creating and initializing browser/renderer processes. - */ - static bool StartUp(int &code, const wxString &path, - int argc, char* argv[]); - - /** Shutdown CEF The function should be called before client application exits. - + Since there is a bug of CEF3, the behavior is different between Mac OS X with Linux/Windows platforms. On Mac OS X, it should be called in wxFrame::OnClose. On Linux/Windows, it shuold be diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp index 75f657ed4f..03762aa1c6 100644 --- a/samples/webview/webview.cpp +++ b/samples/webview/webview.cpp @@ -40,7 +40,6 @@ #include "wx/filesys.h" #include "wx/fs_arc.h" #include "wx/fs_mem.h" -#include "wx/timer.h" #ifdef wxWEBVIEW_SAMPLE_CHROMIUM #include "wx/webview_chromium.h" @@ -77,7 +76,6 @@ public: } virtual bool OnInit() wxOVERRIDE; - virtual int OnExit() wxOVERRIDE; #if wxUSE_CMDLINE_PARSER virtual void OnInitCmdLine(wxCmdLineParser& parser) wxOVERRIDE @@ -112,7 +110,6 @@ public: virtual ~WebFrame(); void UpdateState(); - void OnTimer(wxTimerEvent& evt); void OnIdle(wxIdleEvent& evt); void OnUrl(wxCommandEvent& evt); void OnBack(wxCommandEvent& evt); @@ -172,17 +169,11 @@ public: void OnFindText(wxCommandEvent& evt); void OnFindOptions(wxCommandEvent& evt); void OnEnableContextMenu(wxCommandEvent& evt); - void OnClose(wxCloseEvent& evt); private: wxTextCtrl* m_url; wxWebView* m_browser; -#ifdef wxWEBVIEW_SAMPLE_CHROMIUM - // A timer to run CEF message loop. - wxTimer* m_timer; -#endif - wxToolBar* m_toolbar; wxToolBarToolBase* m_toolbar_back; wxToolBarToolBase* m_toolbar_forward; @@ -268,18 +259,6 @@ wxIMPLEMENT_APP(WebApp); bool WebApp::OnInit() { -#ifdef wxWEBVIEW_SAMPLE_CHROMIUM - // We spawn a separate subprocess - int code = 0; -#ifdef __WXMSW__ - if(!wxWebViewChromium::StartUp(code, "")) -#else - if(!wxWebViewChromium::StartUp(code, "", - wxApp::argc, wxApp::argv)) -#endif - exit(code); -#endif // wxWEBVIEW_SAMPLE_CHROMIUM - if ( !wxApp::OnInit() ) return false; @@ -310,14 +289,6 @@ bool WebApp::OnInit() return true; } -int WebApp::OnExit() -{ -#if defined(wxWEBVIEW_SAMPLE_CHROMIUM) && (defined(__WXMSW__) || defined(__WXGTK__)) - wxWebViewChromium::Shutdown(); -#endif - return wxApp::OnExit(); -} - WebFrame::WebFrame(const wxString& url) : wxFrame(NULL, wxID_ANY, "wxWebView Sample") { @@ -401,9 +372,6 @@ WebFrame::WebFrame(const wxString& url) : // Create the webview #ifdef wxWEBVIEW_SAMPLE_CHROMIUM - wxWebView::RegisterFactory(wxWebViewBackendChromium, wxSharedPtr - (new wxWebViewFactoryChromium)); - m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxSize(800, 525), wxWebViewBackendChromium); #else m_browser = wxWebView::New(this, wxID_ANY, url); @@ -649,13 +617,6 @@ WebFrame::WebFrame(const wxString& url) : //Connect the idle events Connect(wxID_ANY, wxEVT_IDLE, wxIdleEventHandler(WebFrame::OnIdle), NULL, this); - Connect(wxID_ANY, wxEVT_CLOSE_WINDOW, wxCloseEventHandler(WebFrame::OnClose), NULL, this); - Connect(wxID_ANY, wxEVT_TIMER, wxTimerEventHandler(WebFrame::OnTimer), NULL, this); - -#ifdef wxWEBVIEW_SAMPLE_CHROMIUM - m_timer = new wxTimer(this); - m_timer->Start(25); -#endif } WebFrame::~WebFrame() @@ -685,13 +646,6 @@ void WebFrame::UpdateState() m_url->SetValue( m_browser->GetCurrentURL() ); } -void WebFrame::OnTimer(wxTimerEvent& WXUNUSED(evt)) -{ -#ifdef wxWEBVIEW_SAMPLE_CHROMIUM - wxWebViewChromium::DoCEFWork(); -#endif -} - void WebFrame::OnIdle(wxIdleEvent& WXUNUSED(evt)) { if(m_browser->IsBusy()) @@ -1331,20 +1285,3 @@ SourceViewDialog::SourceViewDialog(wxWindow* parent, wxString source) : sizer->Add(text, 1, wxEXPAND); SetSizer(sizer); } - -void WebFrame::OnClose(wxCloseEvent & evt) -{ -#ifdef wxWEBVIEW_SAMPLE_CHROMIUM - wxUnusedVar(evt); - delete m_timer; -// On Windows/Linux, calling `Shutdown` here will cause a crash when closing WebFrame. -// This is a temporary fix. -#ifdef __WXOSX__ - wxWebViewChromium::Shutdown(); -#endif - - Destroy(); -#else - evt.Skip(); -#endif -} diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index caf92f1cb3..420d94f8c7 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -12,6 +12,8 @@ #include "wx/webview_chromium.h" #include "wx/filesys.h" #include "wx/rtti.h" +#include "wx/app.h" +#include "wx/module.h" #ifdef __WXMSW__ #include "wx/msw/private.h" @@ -40,6 +42,9 @@ extern WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(const char) wxWebViewBackendChromium[] = "wxWebViewChromium"; +int wxWebViewChromium::ms_activeWebViewCount = 0; +wxTimer* wxWebViewChromium::ms_workTimer = NULL; + wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewChromium, wxWebView); // ClientHandler implementation. @@ -267,11 +272,26 @@ bool wxWebViewChromium::Create(wxWindow* parent, url.ToStdString(), browsersettings, NULL); this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); + + // Initalize CEF message work timer if necessary + if (ms_workTimer == NULL) + { + ms_workTimer = new wxTimer(); + ms_workTimer->Bind(wxEVT_TIMER, &wxWebViewChromium::OnWorkTimer); + ms_workTimer->Start(25); + } + ms_activeWebViewCount++; + return true; } wxWebViewChromium::~wxWebViewChromium() { + // Delete CEF work timer when there is no active webview + ms_activeWebViewCount--; + if (ms_activeWebViewCount == 0) + wxDELETE(ms_workTimer); + if (m_clientHandler) { m_clientHandler->Release(); @@ -279,6 +299,11 @@ wxWebViewChromium::~wxWebViewChromium() } } +void wxWebViewChromium::OnWorkTimer(wxTimerEvent& evt) +{ + CefDoMessageLoopWork(); +} + void wxWebViewChromium::OnSize(wxSizeEvent& event) { #ifdef __WXMSW__ @@ -575,48 +600,6 @@ void wxWebViewChromium::RegisterHandler(wxSharedPtr handler) new SchemeHandlerFactory(handler) ); } -#ifdef __WXMSW__ -bool wxWebViewChromium::StartUp(int &code, const wxString &path) -#else -bool wxWebViewChromium::StartUp(int &code, const wxString &path, - int argc, char* argv[]) -#endif -{ -#ifdef __WXMSW__ - CefMainArgs args(wxGetInstance()); -#else - CefMainArgs args(argc, argv); -#endif - // If there is no subprocess then we need to execute on this process - if ( path.empty() ) - { - code = CefExecuteProcess(args, NULL, NULL); - if ( code >= 0 ) - return false; - } - - CefSettings settings; - settings.no_sandbox = true; - -#ifdef __WXDEBUG__ - settings.log_severity = LOGSEVERITY_INFO; - CefString(&settings.log_file).FromASCII("./debug.log"); -#endif - CefString(&settings.browser_subprocess_path) = path.ToStdString(); - - return CefInitialize(args, settings, NULL, NULL); -} - -void wxWebViewChromium::DoCEFWork() -{ - CefDoMessageLoopWork(); -} - -void wxWebViewChromium::Shutdown() -{ - CefShutdown(); -} - // CefDisplayHandler methods void ClientHandler::OnLoadingStateChange(CefRefPtr WXUNUSED(browser), bool WXUNUSED(isLoading), @@ -927,4 +910,59 @@ bool SchemeHandler::ReadResponse(void* data_out, return has_data; } +class wxWebViewChromiumModule : public wxModule +{ +public: + wxWebViewChromiumModule() { } + virtual bool OnInit() wxOVERRIDE + { + m_isHelperProcess = false; +#ifdef __WXMSW__ + CefMainArgs args(wxGetInstance()); +#else + wxAppConsole* app = wxApp::GetInstance(); + CefMainArgs args(app->argc, app->argv); +#endif + // If there is no subprocess then we need to execute on this process + int code = CefExecuteProcess(args, NULL, NULL); + if (code >= 0) + { + m_isHelperProcess = true; + exit(code); + return false; + } + + // Register with wxWebView + wxWebView::RegisterFactory(wxWebViewBackendChromium, + wxSharedPtr(new wxWebViewFactoryChromium)); + + CefSettings settings; + settings.no_sandbox = true; + +#ifdef __WXDEBUG__ + settings.log_severity = LOGSEVERITY_INFO; + CefString(&settings.log_file).FromASCII("./debug.log"); +#endif + + return CefInitialize(args, settings, NULL, NULL); + }; + virtual void OnExit() wxOVERRIDE + { + if (m_isHelperProcess) + return; + + // Give CEF a chance for some cleanup work + for (int i = 0; i < 10; i++) + CefDoMessageLoopWork(); + + CefShutdown(); + }; +private: + bool m_isHelperProcess; + + wxDECLARE_DYNAMIC_CLASS(wxWebViewChromiumModule); +}; + +wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewChromiumModule, wxModule); + #endif // wxUSE_WEBVIEW && wxUSE_WEBVIEW_CHROMIUM From 9892ca365526f40d7e1a937269e62c3fdbfc49ca Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Sat, 17 Feb 2018 18:54:35 +0100 Subject: [PATCH 134/275] Call OnSize after CEF browser creation Without the initial call the window would have incorrect size and missing scrollbars --- samples/webview/webview.cpp | 6 +++--- src/common/webview_chromium.cpp | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/samples/webview/webview.cpp b/samples/webview/webview.cpp index 03762aa1c6..2381cd58db 100644 --- a/samples/webview/webview.cpp +++ b/samples/webview/webview.cpp @@ -371,11 +371,11 @@ WebFrame::WebFrame(const wxString& url) : topsizer->Add(m_info, wxSizerFlags().Expand()); // Create the webview + m_browser = wxWebView::New(this, wxID_ANY, url #ifdef wxWEBVIEW_SAMPLE_CHROMIUM - m_browser = wxWebView::New(this, wxID_ANY, url, wxDefaultPosition, wxSize(800, 525), wxWebViewBackendChromium); -#else - m_browser = wxWebView::New(this, wxID_ANY, url); + , wxDefaultPosition, wxDefaultSize, wxWebViewBackendChromium #endif + ); topsizer->Add(m_browser, wxSizerFlags().Expand().Proportion(1)); //We register the wxfs:// protocol for testing purposes diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 420d94f8c7..de46a222d5 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -684,6 +684,9 @@ void ClientHandler::OnAfterCreated(CefRefPtr browser) { m_browser = browser; m_browserId = browser->GetIdentifier(); + + wxSizeEvent evt; + m_webview->OnSize(evt); } } bool ClientHandler::DoClose(CefRefPtr WXUNUSED(browser)) From dadade9d55558d5a9be17bfa39a91474aa8b4a87 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Mon, 19 Feb 2018 14:35:13 +0100 Subject: [PATCH 135/275] Integrate CEF helper for sample into CMake --- .../cmake/lib/webview_chromium/CMakeLists.txt | 4 +- build/cmake/samples/webview.cmake | 30 +++++++++++++- samples/webview/Info_cocoa.plist | 41 ------------------- samples/webview/cef_helper_info.plist.in | 30 ++++++++++++++ samples/webview/cef_process_helper.cpp | 19 +++++++++ 5 files changed, 79 insertions(+), 45 deletions(-) delete mode 100644 samples/webview/Info_cocoa.plist create mode 100644 samples/webview/cef_helper_info.plist.in create mode 100644 samples/webview/cef_process_helper.cpp diff --git a/build/cmake/lib/webview_chromium/CMakeLists.txt b/build/cmake/lib/webview_chromium/CMakeLists.txt index 3ebc33ba25..72c4499a86 100644 --- a/build/cmake/lib/webview_chromium/CMakeLists.txt +++ b/build/cmake/lib/webview_chromium/CMakeLists.txt @@ -25,7 +25,7 @@ ExternalProject_Add( ExternalProject_Get_property(cef SOURCE_DIR) ExternalProject_Get_property(cef BINARY_DIR) -add_library(libcef_dll_wrapper STATIC IMPORTED) +add_library(libcef_dll_wrapper STATIC IMPORTED GLOBAL) get_property(HAVE_MULTI_CONFIG_GENERATOR GLOBAL PROPERTY GENERATOR_IS_MULTI_CONFIG) if(HAVE_MULTI_CONFIG_GENERATOR) set_target_properties(libcef_dll_wrapper PROPERTIES @@ -37,7 +37,7 @@ else() IMPORTED_LOCATION ${BINARY_DIR}/libcef_dll_wrapper/libcef_dll_wrapper${CMAKE_STATIC_LIBRARY_SUFFIX} ) endif() -add_library(libcef STATIC IMPORTED) +add_library(libcef STATIC IMPORTED GLOBAL) if(APPLE) set_target_properties(libcef PROPERTIES IMPORTED_LOCATION_DEBUG "${SOURCE_DIR}/Debug/Chromium Embedded Framework.framework/Chromium Embedded Framework" diff --git a/build/cmake/samples/webview.cmake b/build/cmake/samples/webview.cmake index 2f80aae75f..4b7c6eb0b5 100644 --- a/build/cmake/samples/webview.cmake +++ b/build/cmake/samples/webview.cmake @@ -28,9 +28,35 @@ if(wxUSE_WEBVIEW_CHROMIUM) # Copy CEF resources COMMAND ${CMAKE_COMMAND} -E copy_directory ${SOURCE_DIR}/Resources $ - COMMENT "Prepare executable for runtime..." + COMMENT "Prepare executable for runtime..." ) elseif(APPLE) - # TODO: define and build helper bundle + # Define helper bundle + set(CEF_HELPER_OUTPUT_NAME "webviewsample_chromium Helper") + add_executable(webviewsample_chromium_helper MACOSX_BUNDLE ${wxSOURCE_DIR}/samples/webview/cef_process_helper.cpp) + target_include_directories(webviewsample_chromium_helper PRIVATE ${SOURCE_DIR}) + target_link_libraries(webviewsample_chromium_helper libcef libcef_dll_wrapper) + set_target_properties(webviewsample_chromium_helper PROPERTIES + MACOSX_BUNDLE_INFO_PLIST ${wxSOURCE_DIR}/samples/webview/cef_helper_info.plist.in + INSTALL_RPATH "@executable_path/../../../.." + BUILD_WITH_INSTALL_RPATH TRUE + OUTPUT_NAME ${CEF_HELPER_OUTPUT_NAME} + ) + + add_dependencies(webviewsample_chromium webviewsample_chromium_helper) + + add_custom_command( + TARGET webviewsample_chromium + POST_BUILD + # Copy the helper app bundle into the Frameworks directory. + COMMAND + ${CMAKE_COMMAND} -E copy_directory + "$/../../../${CEF_HELPER_OUTPUT_NAME}.app" + "$/../Frameworks/${CEF_HELPER_OUTPUT_NAME}.app" + # Copy the CEF framework into the Frameworks directory. + COMMAND ${CMAKE_COMMAND} -E copy_directory + "${SOURCE_DIR}/$/Chromium Embedded Framework.framework" + "$/../Frameworks/Chromium Embedded Framework.framework" + ) endif() endif() diff --git a/samples/webview/Info_cocoa.plist b/samples/webview/Info_cocoa.plist deleted file mode 100644 index 47eb09a56e..0000000000 --- a/samples/webview/Info_cocoa.plist +++ /dev/null @@ -1,41 +0,0 @@ - - - - - CFBundleDevelopmentRegion - English - CFBundleExecutable - $(PRODUCT_NAME) - CFBundleGetInfoString - $(PRODUCT_NAME) version 3.1.0, (c) 2005-2013 wxWidgets - CFBundleIconFile - wxmac.icns - CFBundleIdentifier - org.wxwidgets.samples.$(PRODUCT_NAME:rfc1034identifier) - CFBundleInfoDictionaryVersion - 6.0 - CFBundleLocalizations - - de - en - fr - it - - CFBundleLongVersionString - 3.1.0, (c) 2005-2013 wxWidgets - CFBundleName - $(PRODUCT_NAME) - CFBundlePackageType - APPL - CFBundleShortVersionString - 3.1.0 - CFBundleSignature - ???? - CFBundleVersion - 3.1.0 - NSHumanReadableCopyright - Copyright 2005-2013 wxWidgets - NSPrincipalClass - wxNSApplication - - diff --git a/samples/webview/cef_helper_info.plist.in b/samples/webview/cef_helper_info.plist.in new file mode 100644 index 0000000000..042faf9e6f --- /dev/null +++ b/samples/webview/cef_helper_info.plist.in @@ -0,0 +1,30 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleDisplayName + ${EXECUTABLE_NAME} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + org.wxwidgets.webviewChromium.helper + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + LSFileQuarantineEnabled + + LSMinimumSystemVersion + 10.5.0 + LSUIElement + 1 + NSSupportsAutomaticGraphicsSwitching + + + diff --git a/samples/webview/cef_process_helper.cpp b/samples/webview/cef_process_helper.cpp new file mode 100644 index 0000000000..6e7c9c317d --- /dev/null +++ b/samples/webview/cef_process_helper.cpp @@ -0,0 +1,19 @@ +///////////////////////////////////////////////////////////////////////////// +// Name: samples/webview_chromium/mac/process_helper_mac.cpp +// Purpose: webview_chromium launch helper +// Author: Haojian Wu +// Created: 2014-06-22 +// Copyright: (c) 2014 - 2015 wxWidgets development team +// Licence: wxWindows licence +///////////////////////////////////////////////////////////////////////////// + +#include "include/cef_app.h" +#include "include/cef_version.h" + +// Process entry point. +int main(int argc, char* argv[]) { + CefMainArgs main_args(argc, argv); + + // Execute the secondary process. + return CefExecuteProcess(main_args, NULL, NULL); +} From f6269ca8a6c9d1267b8ca9c2530dba30f21b2c0f Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Mon, 19 Feb 2018 15:16:48 +0100 Subject: [PATCH 136/275] Handle CEF message loop from idle events Handlign CEF messages on idle seems to work much better on macOS --- include/wx/webview_chromium.h | 6 ++---- src/common/webview_chromium.cpp | 19 +++++++------------ 2 files changed, 9 insertions(+), 16 deletions(-) diff --git a/include/wx/webview_chromium.h b/include/wx/webview_chromium.h index 2000a17487..6f4a0ab526 100644 --- a/include/wx/webview_chromium.h +++ b/include/wx/webview_chromium.h @@ -141,10 +141,8 @@ private: ClientHandler* m_clientHandler; static int ms_activeWebViewCount; - // A timer to run CEF message loop. - static wxTimer* ms_workTimer; - - static void OnWorkTimer(wxTimerEvent& evt); + + static void OnIdle(wxIdleEvent& evt); wxDECLARE_DYNAMIC_CLASS(wxWebViewChromium); }; diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index de46a222d5..9cbf39339a 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -43,7 +43,6 @@ extern WXDLLIMPEXP_DATA_WEBVIEW_CHROMIUM(const char) wxWebViewBackendChromium[] = "wxWebViewChromium"; int wxWebViewChromium::ms_activeWebViewCount = 0; -wxTimer* wxWebViewChromium::ms_workTimer = NULL; wxIMPLEMENT_DYNAMIC_CLASS(wxWebViewChromium, wxWebView); @@ -273,13 +272,9 @@ bool wxWebViewChromium::Create(wxWindow* parent, this->Bind(wxEVT_SIZE, &wxWebViewChromium::OnSize, this); - // Initalize CEF message work timer if necessary - if (ms_workTimer == NULL) - { - ms_workTimer = new wxTimer(); - ms_workTimer->Bind(wxEVT_TIMER, &wxWebViewChromium::OnWorkTimer); - ms_workTimer->Start(25); - } + // Initalize CEF message loop handling + if (ms_activeWebViewCount == 0) + wxTheApp->Bind(wxEVT_IDLE, &wxWebViewChromium::OnIdle); ms_activeWebViewCount++; return true; @@ -287,10 +282,10 @@ bool wxWebViewChromium::Create(wxWindow* parent, wxWebViewChromium::~wxWebViewChromium() { - // Delete CEF work timer when there is no active webview + // Delete CEF idle handler when there is no active webview ms_activeWebViewCount--; if (ms_activeWebViewCount == 0) - wxDELETE(ms_workTimer); + wxTheApp->Unbind(wxEVT_IDLE, &wxWebViewChromium::OnIdle); if (m_clientHandler) { @@ -299,9 +294,9 @@ wxWebViewChromium::~wxWebViewChromium() } } -void wxWebViewChromium::OnWorkTimer(wxTimerEvent& evt) +void wxWebViewChromium::OnIdle(wxIdleEvent& evt) { - CefDoMessageLoopWork(); + CefDoMessageLoopWork(); } void wxWebViewChromium::OnSize(wxSizeEvent& event) From 23c56516a938bc0a607bd31501ded0c290264895 Mon Sep 17 00:00:00 2001 From: Tobias Taschner Date: Mon, 19 Feb 2018 15:44:49 +0100 Subject: [PATCH 137/275] Add OSX specific CEF implementation details into seperate source file CEF requires a specific ObjC protocol which needs to be implemented in the application. Add this protocol during runtime. --- build/cmake/files.cmake | 3 + .../cmake/lib/webview_chromium/CMakeLists.txt | 4 ++ build/files | 2 + src/common/webview_chromium.cpp | 7 ++ src/osx/webview_chromium.mm | 69 +++++++++++++++++++ 5 files changed, 85 insertions(+) create mode 100644 src/osx/webview_chromium.mm diff --git a/build/cmake/files.cmake b/build/cmake/files.cmake index bb55e83681..9011c5e35a 100644 --- a/build/cmake/files.cmake +++ b/build/cmake/files.cmake @@ -2942,6 +2942,9 @@ set(WEBVIEWCHROMIUM_HDR set(WEBVIEWCHROMIUM_SRC src/common/webview_chromium.cpp ) +set(WEBVIEWCHROMIUM_OSX_SHARED_SRC + src/osx/webview_chromium.mm +) set(XRC_SRC src/xrc/xh_activityindicator.cpp diff --git a/build/cmake/lib/webview_chromium/CMakeLists.txt b/build/cmake/lib/webview_chromium/CMakeLists.txt index 72c4499a86..038ec8bf4b 100644 --- a/build/cmake/lib/webview_chromium/CMakeLists.txt +++ b/build/cmake/lib/webview_chromium/CMakeLists.txt @@ -51,6 +51,10 @@ else() endif() wx_append_sources(WEBVIEW_CHROMIUM_FILES WEBVIEWCHROMIUM) +if(APPLE) + wx_append_sources(WEBVIEW_CHROMIUM_FILES WEBVIEWCHROMIUM_OSX_SHARED) +endif() + wx_add_library(webview_chromium ${WEBVIEW_CHROMIUM_FILES}) wx_lib_include_directories(webview_chromium PRIVATE ${SOURCE_DIR}) wx_lib_link_libraries(webview_chromium PUBLIC webview PRIVATE libcef libcef_dll_wrapper) diff --git a/build/files b/build/files index ad0ae37284..c995949d2c 100644 --- a/build/files +++ b/build/files @@ -2851,6 +2851,8 @@ WEBVIEWCHROMIUM_HDR = wx/webview_chromium.h WEBVIEWCHROMIUM_SRC = src/common/webview_chromium.cpp +WEBVIEWCHROMIUM_OSX_SHARED_SRC = + src/osx/webview_chromium.mm # wxXRC diff --git a/src/common/webview_chromium.cpp b/src/common/webview_chromium.cpp index 9cbf39339a..4436a1c7f1 100644 --- a/src/common/webview_chromium.cpp +++ b/src/common/webview_chromium.cpp @@ -908,6 +908,10 @@ bool SchemeHandler::ReadResponse(void* data_out, return has_data; } +#ifdef __WXOSX__ +void wxWebViewChromium_InitOSX(); +#endif + class wxWebViewChromiumModule : public wxModule { public: @@ -941,6 +945,9 @@ public: settings.log_severity = LOGSEVERITY_INFO; CefString(&settings.log_file).FromASCII("./debug.log"); #endif +#ifdef __WXOSX__ + wxWebViewChromium_InitOSX(); +#endif return CefInitialize(args, settings, NULL, NULL); }; diff --git a/src/osx/webview_chromium.mm b/src/osx/webview_chromium.mm new file mode 100644 index 0000000000..55bc14cac8 --- /dev/null +++ b/src/osx/webview_chromium.mm @@ -0,0 +1,69 @@ +/////////////////////////////////////////////////////////////////////////////// +// Name: src/osx/webview_chromium.mm +// Purpose: OSX specific code for wxWebViewChromium +// Author: Tobias Taschner +// Created: 2018-02-19 +// Copyright: (c) 2018 wxWidgets development team +// Licence: wxWindows licence +/////////////////////////////////////////////////////////////////////////////// + +#include "wx/webview_chromium.h" + +#import "Cocoa/Cocoa.h" +#include +#include "wx/log.h" +#import "include/cef_application_mac.h" + +/* + The objective c runtime is used to add the required CefAppProtoco to the + wxNSApplication.sharedApplication + + This protocol is required by chromium in different places + (e.g.

Some text about Page 2.