From 61be982d096aad0bd2ccf30e0d3dacdb86f37915 Mon Sep 17 00:00:00 2001 From: Marshall Greenblatt Date: Fri, 20 May 2011 23:39:33 +0000 Subject: [PATCH] - Fix Mac compile errors. - Fix GYP configuration errors. - Only use angle GL implementation on Windows (not supported on other platforms). git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@238 5089003a-bbd8-11dd-ad1f-f1f9622dbc98 --- cef.gyp | 12 ++++++------ libcef/browser_impl_mac.mm | 9 ++++++--- libcef/cef_process_ui_thread.cc | 4 ++++ tests/cefclient/client_handler.h | 4 ++-- tests/cefclient/client_handler_mac.mm | 3 ++- tests/cefclient/download_handler.h | 2 +- 6 files changed, 21 insertions(+), 13 deletions(-) diff --git a/cef.gyp b/cef.gyp index 66b20b7cd..5611a90e0 100644 --- a/cef.gyp +++ b/cef.gyp @@ -719,8 +719,8 @@ '../views/views.gyp:views', ], 'sources': [ - 'include/cef_types_win.h', - 'include/cef_win.h', + 'include/internal/cef_types_win.h', + 'include/internal/cef_win.h', 'libcef/browser_drag_delegate_win.cc', 'libcef/browser_drag_delegate_win.h', 'libcef/browser_impl_win.cc', @@ -744,8 +744,8 @@ }], [ 'OS=="mac"', { 'sources': [ - 'include/cef_types_mac.h', - 'include/cef_mac.h', + 'include/internal/cef_types_mac.h', + 'include/internal/cef_mac.h', 'libcef/browser_impl_mac.mm', 'libcef/browser_webkit_glue_mac.mm', 'libcef/browser_webview_delegate_mac.mm', @@ -761,8 +761,8 @@ }], [ 'OS=="linux" or OS=="freebsd" or OS=="openbsd"', { 'sources': [ - 'include/cef_types_linux.h', - 'include/cef_linux.h', + 'include/internal/cef_types_linux.h', + 'include/internal/cef_linux.h', 'libcef/browser_impl_gtk.cc', 'libcef/browser_webkit_glue_gtk.cc', 'libcef/browser_webview_delegate_gtk.cc', diff --git a/libcef/browser_impl_mac.mm b/libcef/browser_impl_mac.mm index 7d390796b..08449e311 100644 --- a/libcef/browser_impl_mac.mm +++ b/libcef/browser_impl_mac.mm @@ -102,9 +102,12 @@ void CefBrowserImpl::UIT_CreateBrowser(const CefString& url) [newWnd makeKeyAndOrderFront: nil]; } - if(handler_.get()) { - // Notify the handler that we're done creating the new window - handler_->HandleAfterCreated(this); + if (client_.get()) { + CefRefPtr handler = client_->GetLifeSpanHandler(); + if(handler.get()) { + // Notify the handler that we're done creating the new window + handler->OnAfterCreated(this); + } } if(url.size() > 0) diff --git a/libcef/cef_process_ui_thread.cc b/libcef/cef_process_ui_thread.cc index ce4ef553e..b428b2e6d 100644 --- a/libcef/cef_process_ui_thread.cc +++ b/libcef/cef_process_ui_thread.cc @@ -149,7 +149,11 @@ void CefProcessUIThread::Init() { WebKit::WebScriptController::registerExtension( extensions_v8::GCExtension::Get()); +#if defined(OS_WIN) gfx::InitializeGLBindings(gfx::kGLImplementationEGLGLES2); +#else + gfx::InitializeGLBindings(gfx::kGLImplementationDesktopGL); +#endif net::URLRequest::RegisterProtocolFactory("blob", &BlobURLRequestJobFactory); net::URLRequest::RegisterProtocolFactory("filesystem", diff --git a/tests/cefclient/client_handler.h b/tests/cefclient/client_handler.h index 7bda7369b..01f5023fd 100644 --- a/tests/cefclient/client_handler.h +++ b/tests/cefclient/client_handler.h @@ -148,8 +148,8 @@ public: void SendNotification(NotificationType type); protected: - virtual void SetLoading(bool isLoading); - virtual void SetNavState(bool canGoBack, bool canGoForward); + void SetLoading(bool isLoading); + void SetNavState(bool canGoBack, bool canGoForward); // The child browser window CefRefPtr m_Browser; diff --git a/tests/cefclient/client_handler_mac.mm b/tests/cefclient/client_handler_mac.mm index 6eb30d7f6..d8bfebf42 100644 --- a/tests/cefclient/client_handler_mac.mm +++ b/tests/cefclient/client_handler_mac.mm @@ -4,6 +4,7 @@ #include "include/cef.h" #include "include/cef_wrapper.h" +#include "cefclient.h" #include "client_handler.h" #include "resource_util.h" #include "string_util.h" @@ -85,7 +86,7 @@ void ClientHandler::OnAddressChange(CefRefPtr browser, { REQUIRE_UI_THREAD(); - ifm_BrowserHwnd == browser->GetWindowHandle() && frame->IsMain()) + if(m_BrowserHwnd == browser->GetWindowHandle() && frame->IsMain()) { // Set the edit window text NSTextField* textField = (NSTextField*)m_EditHwnd; diff --git a/tests/cefclient/download_handler.h b/tests/cefclient/download_handler.h index 8deee0a52..39637e373 100644 --- a/tests/cefclient/download_handler.h +++ b/tests/cefclient/download_handler.h @@ -8,7 +8,7 @@ #include "include/cef.h" // Implement this interface to receive download notifications. -class DownloadListener : public CefBase +class DownloadListener : public virtual CefBase { public: // Called when the download is complete.