mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
Update all files to use Windows CRLF (\r\n) line endings (issue #45).
git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@33 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
@@ -1,49 +1,49 @@
|
||||
// Copyright (c) 2006-2008 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.
|
||||
|
||||
#include "precompiled_libcef.h"
|
||||
#include "webview_host.h"
|
||||
|
||||
#include "base/gfx/platform_canvas.h"
|
||||
#include "base/gfx/rect.h"
|
||||
#include "base/gfx/size.h"
|
||||
#include "base/win_util.h"
|
||||
#include "webkit/glue/webview.h"
|
||||
|
||||
static const wchar_t kWindowClassName[] = L"WebViewHost";
|
||||
|
||||
/*static*/
|
||||
WebViewHost* WebViewHost::Create(HWND parent_view,
|
||||
WebViewDelegate* delegate,
|
||||
const WebPreferences& prefs) {
|
||||
WebViewHost* host = new WebViewHost();
|
||||
|
||||
static bool registered_class = false;
|
||||
if (!registered_class) {
|
||||
WNDCLASSEX wcex = {0};
|
||||
wcex.cbSize = sizeof(wcex);
|
||||
wcex.style = CS_DBLCLKS;
|
||||
wcex.lpfnWndProc = WebWidgetHost::WndProc;
|
||||
wcex.hInstance = GetModuleHandle(NULL);
|
||||
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wcex.lpszClassName = kWindowClassName;
|
||||
RegisterClassEx(&wcex);
|
||||
registered_class = true;
|
||||
}
|
||||
|
||||
host->view_ = CreateWindow(kWindowClassName, NULL,
|
||||
WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, 0, 0,
|
||||
0, 0, parent_view, NULL,
|
||||
GetModuleHandle(NULL), NULL);
|
||||
win_util::SetWindowUserData(host->view_, host);
|
||||
|
||||
host->webwidget_ = WebView::Create(delegate, prefs);
|
||||
|
||||
return host;
|
||||
}
|
||||
|
||||
WebView* WebViewHost::webview() const {
|
||||
return static_cast<WebView*>(webwidget_);
|
||||
}
|
||||
|
||||
// Copyright (c) 2006-2008 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.
|
||||
|
||||
#include "precompiled_libcef.h"
|
||||
#include "webview_host.h"
|
||||
|
||||
#include "base/gfx/platform_canvas.h"
|
||||
#include "base/gfx/rect.h"
|
||||
#include "base/gfx/size.h"
|
||||
#include "base/win_util.h"
|
||||
#include "webkit/glue/webview.h"
|
||||
|
||||
static const wchar_t kWindowClassName[] = L"WebViewHost";
|
||||
|
||||
/*static*/
|
||||
WebViewHost* WebViewHost::Create(HWND parent_view,
|
||||
WebViewDelegate* delegate,
|
||||
const WebPreferences& prefs) {
|
||||
WebViewHost* host = new WebViewHost();
|
||||
|
||||
static bool registered_class = false;
|
||||
if (!registered_class) {
|
||||
WNDCLASSEX wcex = {0};
|
||||
wcex.cbSize = sizeof(wcex);
|
||||
wcex.style = CS_DBLCLKS;
|
||||
wcex.lpfnWndProc = WebWidgetHost::WndProc;
|
||||
wcex.hInstance = GetModuleHandle(NULL);
|
||||
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
|
||||
wcex.lpszClassName = kWindowClassName;
|
||||
RegisterClassEx(&wcex);
|
||||
registered_class = true;
|
||||
}
|
||||
|
||||
host->view_ = CreateWindow(kWindowClassName, NULL,
|
||||
WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, 0, 0,
|
||||
0, 0, parent_view, NULL,
|
||||
GetModuleHandle(NULL), NULL);
|
||||
win_util::SetWindowUserData(host->view_, host);
|
||||
|
||||
host->webwidget_ = WebView::Create(delegate, prefs);
|
||||
|
||||
return host;
|
||||
}
|
||||
|
||||
WebView* WebViewHost::webview() const {
|
||||
return static_cast<WebView*>(webwidget_);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user