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:
Marshall Greenblatt 2010-10-09 19:21:09 +00:00
parent 7898b6bf4f
commit 4474199dba
9 changed files with 20 additions and 31 deletions

View File

@ -831,7 +831,7 @@ public:
class CefPostData : public CefBase
{
public:
typedef std::vector<CefRefPtr<CefPostDataElement>> ElementVector;
typedef std::vector<CefRefPtr<CefPostDataElement> > ElementVector;
// Create a new CefPostData object.
/*--cef()--*/
@ -1015,7 +1015,7 @@ public:
};
typedef std::vector<CefRefPtr<CefV8Value>> CefV8ValueList;
typedef std::vector<CefRefPtr<CefV8Value> > CefV8ValueList;
// Interface that should be implemented to handle V8 function calls.
/*--cef(source=client)--*/

View File

@ -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__)

View File

@ -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;
}

View File

@ -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;
}

View File

@ -771,7 +771,9 @@ CefRefPtr<CefBrowserImpl> CefBrowserImpl::UIT_CreatePopupWindow(const std::wstri
REQUIRE_UIT();
CefWindowInfo info;
#if defined(OS_WIN)
info.SetAsPopup(NULL, url.c_str());
#endif
CefRefPtr<CefHandler> handler = handler_;
std::wstring newUrl = url;

View File

@ -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<std::wstring, CefFrame*> FrameMap;
FrameMap frames_;

View File

@ -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"

View File

@ -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<CefRefPtr<CefHandler>>(g_handler),
static_cast<CefRefPtr<CefHandler> >(g_handler),
L"http://www.google.com");
// Start the timer that will be used to update child window state

View File

@ -304,7 +304,7 @@ private:
base::WaitableEvent completion_event_;
// Map of resources that can be automatically loaded
typedef std::map<std::wstring, std::pair<std::string, std::wstring>> ResourceMap;
typedef std::map<std::wstring, std::pair<std::string, std::wstring> > ResourceMap;
ResourceMap resource_map_;
};