mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-02-24 16:07:42 +01:00
Fix various Mac and Linux compile errors.
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@114 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
parent
7898b6bf4f
commit
4474199dba
@ -28,7 +28,7 @@
|
|||||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
|
#if defined(_WIN32)
|
||||||
#ifdef _MSC_VER // MSVC
|
#ifdef _MSC_VER // MSVC
|
||||||
#ifdef BUILDING_CEF_SHARED
|
#ifdef BUILDING_CEF_SHARED
|
||||||
#define CEF_EXPORT __declspec(dllexport)
|
#define CEF_EXPORT __declspec(dllexport)
|
||||||
@ -39,3 +39,7 @@
|
|||||||
#endif // BUILDING_CEF_SHARED
|
#endif // BUILDING_CEF_SHARED
|
||||||
#define CEF_CALLBACK __stdcall
|
#define CEF_CALLBACK __stdcall
|
||||||
#endif // MSVC
|
#endif // MSVC
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#define CEF_EXPORT __attribute__ ((visibility("default")))
|
||||||
|
#define CEF_CALLBACK
|
||||||
|
#endif // defined(__GNUC__)
|
||||||
|
@ -113,28 +113,18 @@ public:
|
|||||||
}
|
}
|
||||||
CefWindowInfo& operator=(const cef_window_info_t& r)
|
CefWindowInfo& operator=(const cef_window_info_t& r)
|
||||||
{
|
{
|
||||||
m_dwExStyle = r.m_dwExStyle;
|
|
||||||
if(m_windowName)
|
if(m_windowName)
|
||||||
cef_string_free(m_windowName);
|
cef_string_free(m_windowName);
|
||||||
if(r.m_windowName)
|
if(r.m_windowName)
|
||||||
m_windowName = cef_string_alloc(r.m_windowName);
|
m_windowName = cef_string_alloc(r.m_windowName);
|
||||||
else
|
else
|
||||||
m_windowName = NULL;
|
m_windowName = NULL;
|
||||||
m_dwStyle = r.m_dwStyle;
|
|
||||||
m_x = r.m_x;
|
m_x = r.m_x;
|
||||||
m_y = r.m_y;
|
m_y = r.m_y;
|
||||||
m_nWidth = r.m_nWidth;
|
m_nWidth = r.m_nWidth;
|
||||||
m_nHeight = r.m_nHeight;
|
m_nHeight = r.m_nHeight;
|
||||||
return *this;
|
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.
|
// Class representing print context information.
|
||||||
@ -162,7 +152,6 @@ public:
|
|||||||
|
|
||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
m_hDC = NULL;
|
|
||||||
m_Scale = 0;
|
m_Scale = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -113,28 +113,18 @@ public:
|
|||||||
}
|
}
|
||||||
CefWindowInfo& operator=(const cef_window_info_t& r)
|
CefWindowInfo& operator=(const cef_window_info_t& r)
|
||||||
{
|
{
|
||||||
m_dwExStyle = r.m_dwExStyle;
|
|
||||||
if(m_windowName)
|
if(m_windowName)
|
||||||
cef_string_free(m_windowName);
|
cef_string_free(m_windowName);
|
||||||
if(r.m_windowName)
|
if(r.m_windowName)
|
||||||
m_windowName = cef_string_alloc(r.m_windowName);
|
m_windowName = cef_string_alloc(r.m_windowName);
|
||||||
else
|
else
|
||||||
m_windowName = NULL;
|
m_windowName = NULL;
|
||||||
m_dwStyle = r.m_dwStyle;
|
|
||||||
m_x = r.m_x;
|
m_x = r.m_x;
|
||||||
m_y = r.m_y;
|
m_y = r.m_y;
|
||||||
m_nWidth = r.m_nWidth;
|
m_nWidth = r.m_nWidth;
|
||||||
m_nHeight = r.m_nHeight;
|
m_nHeight = r.m_nHeight;
|
||||||
return *this;
|
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.
|
// Class representing print context information.
|
||||||
@ -162,7 +152,6 @@ public:
|
|||||||
|
|
||||||
void Init()
|
void Init()
|
||||||
{
|
{
|
||||||
m_hDC = NULL;
|
|
||||||
m_Scale = 0;
|
m_Scale = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -771,7 +771,9 @@ CefRefPtr<CefBrowserImpl> CefBrowserImpl::UIT_CreatePopupWindow(const std::wstri
|
|||||||
REQUIRE_UIT();
|
REQUIRE_UIT();
|
||||||
|
|
||||||
CefWindowInfo info;
|
CefWindowInfo info;
|
||||||
|
#if defined(OS_WIN)
|
||||||
info.SetAsPopup(NULL, url.c_str());
|
info.SetAsPopup(NULL, url.c_str());
|
||||||
|
#endif
|
||||||
CefRefPtr<CefHandler> handler = handler_;
|
CefRefPtr<CefHandler> handler = handler_;
|
||||||
std::wstring newUrl = url;
|
std::wstring newUrl = url;
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ public:
|
|||||||
BrowserWebViewDelegate* GetWebViewDelegate() const {
|
BrowserWebViewDelegate* GetWebViewDelegate() const {
|
||||||
return delegate_.get();
|
return delegate_.get();
|
||||||
}
|
}
|
||||||
HWND GetWebViewWndHandle() const {
|
CefWindowHandle GetWebViewWndHandle() const {
|
||||||
return webviewhost_->view_handle();
|
return webviewhost_->view_handle();
|
||||||
}
|
}
|
||||||
WebKit::WebWidget* GetPopup() const {
|
WebKit::WebWidget* GetPopup() const {
|
||||||
@ -124,11 +124,15 @@ public:
|
|||||||
BrowserWebViewDelegate* GetPopupDelegate() const {
|
BrowserWebViewDelegate* GetPopupDelegate() const {
|
||||||
return popup_delegate_.get();
|
return popup_delegate_.get();
|
||||||
}
|
}
|
||||||
HWND GetPopupWndHandle() const {
|
CefWindowHandle GetPopupWndHandle() const {
|
||||||
return popuphost_->view_handle();
|
return popuphost_->view_handle();
|
||||||
}
|
}
|
||||||
HWND GetMainWndHandle() const {
|
CefWindowHandle GetMainWndHandle() const {
|
||||||
|
#if defined(OS_WIN)
|
||||||
return window_info_.m_hWnd;
|
return window_info_.m_hWnd;
|
||||||
|
#else
|
||||||
|
return 0;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -247,8 +251,10 @@ protected:
|
|||||||
|
|
||||||
std::wstring title_;
|
std::wstring title_;
|
||||||
|
|
||||||
|
#if defined(OS_WIN)
|
||||||
// Context object used to manage printing.
|
// Context object used to manage printing.
|
||||||
printing::PrintingContext print_context_;
|
printing::PrintingContext print_context_;
|
||||||
|
#endif
|
||||||
|
|
||||||
typedef std::map<std::wstring, CefFrame*> FrameMap;
|
typedef std::map<std::wstring, CefFrame*> FrameMap;
|
||||||
FrameMap frames_;
|
FrameMap frames_;
|
||||||
|
@ -20,7 +20,6 @@ MSVC_POP_WARNING();
|
|||||||
#include "base/scoped_ptr.h"
|
#include "base/scoped_ptr.h"
|
||||||
#include "base/string16.h"
|
#include "base/string16.h"
|
||||||
#include "base/utf_string_conversions.h"
|
#include "base/utf_string_conversions.h"
|
||||||
#include "base/win_util.h"
|
|
||||||
#include "net/base/mime_util.h"
|
#include "net/base/mime_util.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
|
||||||
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user