diff --git a/include/cef.h b/include/cef.h index de9f21ff1..e3586ae74 100644 --- a/include/cef.h +++ b/include/cef.h @@ -831,7 +831,7 @@ public: class CefPostData : public CefBase { public: - typedef std::vector> ElementVector; + typedef std::vector > ElementVector; // Create a new CefPostData object. /*--cef()--*/ @@ -1015,7 +1015,7 @@ public: }; -typedef std::vector> CefV8ValueList; +typedef std::vector > CefV8ValueList; // Interface that should be implemented to handle V8 function calls. /*--cef(source=client)--*/ diff --git a/include/cef_export.h b/include/cef_export.h index 9d5b0a565..fbaea9d7e 100644 --- a/include/cef_export.h +++ b/include/cef_export.h @@ -28,7 +28,7 @@ // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - +#if defined(_WIN32) #ifdef _MSC_VER // MSVC #ifdef BUILDING_CEF_SHARED #define CEF_EXPORT __declspec(dllexport) @@ -39,3 +39,7 @@ #endif // BUILDING_CEF_SHARED #define CEF_CALLBACK __stdcall #endif // MSVC +#elif defined(__GNUC__) +#define CEF_EXPORT __attribute__ ((visibility("default"))) +#define CEF_CALLBACK +#endif // defined(__GNUC__) diff --git a/include/cef_linux.h b/include/cef_linux.h index 494d30bb1..d1b4bef3c 100644 --- a/include/cef_linux.h +++ b/include/cef_linux.h @@ -113,28 +113,18 @@ public: } CefWindowInfo& operator=(const cef_window_info_t& r) { - m_dwExStyle = r.m_dwExStyle; if(m_windowName) cef_string_free(m_windowName); if(r.m_windowName) m_windowName = cef_string_alloc(r.m_windowName); else m_windowName = NULL; - m_dwStyle = r.m_dwStyle; m_x = r.m_x; m_y = r.m_y; m_nWidth = r.m_nWidth; m_nHeight = r.m_nHeight; return *this; } - - void SetAsChild(HWND hWndParent, RECT windowRect) - { - m_x = windowRect.left; - m_y = windowRect.top; - m_nWidth = windowRect.right - windowRect.left; - m_nHeight = windowRect.bottom - windowRect.top; - } }; // Class representing print context information. @@ -162,7 +152,6 @@ public: void Init() { - m_hDC = NULL; m_Scale = 0; } diff --git a/include/cef_mac.h b/include/cef_mac.h index 1ccd93182..db507742b 100644 --- a/include/cef_mac.h +++ b/include/cef_mac.h @@ -113,28 +113,18 @@ public: } CefWindowInfo& operator=(const cef_window_info_t& r) { - m_dwExStyle = r.m_dwExStyle; if(m_windowName) cef_string_free(m_windowName); if(r.m_windowName) m_windowName = cef_string_alloc(r.m_windowName); else m_windowName = NULL; - m_dwStyle = r.m_dwStyle; m_x = r.m_x; m_y = r.m_y; m_nWidth = r.m_nWidth; m_nHeight = r.m_nHeight; return *this; } - - void SetAsChild(HWND hWndParent, RECT windowRect) - { - m_x = windowRect.left; - m_y = windowRect.top; - m_nWidth = windowRect.right - windowRect.left; - m_nHeight = windowRect.bottom - windowRect.top; - } }; // Class representing print context information. @@ -162,7 +152,6 @@ public: void Init() { - m_hDC = NULL; m_Scale = 0; } diff --git a/libcef/browser_impl.cc b/libcef/browser_impl.cc index 82ea472a5..04f0f7546 100644 --- a/libcef/browser_impl.cc +++ b/libcef/browser_impl.cc @@ -771,7 +771,9 @@ CefRefPtr CefBrowserImpl::UIT_CreatePopupWindow(const std::wstri REQUIRE_UIT(); CefWindowInfo info; +#if defined(OS_WIN) info.SetAsPopup(NULL, url.c_str()); +#endif CefRefPtr handler = handler_; std::wstring newUrl = url; diff --git a/libcef/browser_impl.h b/libcef/browser_impl.h index b20650f1a..7fc8ba41a 100644 --- a/libcef/browser_impl.h +++ b/libcef/browser_impl.h @@ -112,7 +112,7 @@ public: BrowserWebViewDelegate* GetWebViewDelegate() const { return delegate_.get(); } - HWND GetWebViewWndHandle() const { + CefWindowHandle GetWebViewWndHandle() const { return webviewhost_->view_handle(); } WebKit::WebWidget* GetPopup() const { @@ -124,11 +124,15 @@ public: BrowserWebViewDelegate* GetPopupDelegate() const { return popup_delegate_.get(); } - HWND GetPopupWndHandle() const { + CefWindowHandle GetPopupWndHandle() const { return popuphost_->view_handle(); } - HWND GetMainWndHandle() const { + CefWindowHandle GetMainWndHandle() const { +#if defined(OS_WIN) return window_info_.m_hWnd; +#else + return 0; +#endif } @@ -247,8 +251,10 @@ protected: std::wstring title_; +#if defined(OS_WIN) // Context object used to manage printing. printing::PrintingContext print_context_; +#endif typedef std::map FrameMap; FrameMap frames_; diff --git a/libcef/browser_webkit_glue.cc b/libcef/browser_webkit_glue.cc index d6dcc4ac9..42de8e79e 100644 --- a/libcef/browser_webkit_glue.cc +++ b/libcef/browser_webkit_glue.cc @@ -20,7 +20,6 @@ MSVC_POP_WARNING(); #include "base/scoped_ptr.h" #include "base/string16.h" #include "base/utf_string_conversions.h" -#include "base/win_util.h" #include "net/base/mime_util.h" #include "third_party/WebKit/WebKit/chromium/public/WebFrame.h" #include "third_party/WebKit/WebKit/chromium/public/WebString.h" diff --git a/tests/cefclient/cefclient.cpp b/tests/cefclient/cefclient.cpp index fc3fe6667..1f1c59bbd 100644 --- a/tests/cefclient/cefclient.cpp +++ b/tests/cefclient/cefclient.cpp @@ -891,7 +891,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) // Creat the new child child browser window CefBrowser::CreateBrowser(info, false, - static_cast>(g_handler), + static_cast >(g_handler), L"http://www.google.com"); // Start the timer that will be used to update child window state diff --git a/tests/unittests/test_handler.h b/tests/unittests/test_handler.h index 2df7d681e..a6c409978 100644 --- a/tests/unittests/test_handler.h +++ b/tests/unittests/test_handler.h @@ -304,7 +304,7 @@ private: base::WaitableEvent completion_event_; // Map of resources that can be automatically loaded - typedef std::map> ResourceMap; + typedef std::map > ResourceMap; ResourceMap resource_map_; };