2009-07-24 21:11:01 +02:00
|
|
|
// 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.
|
|
|
|
|
|
|
|
#ifndef _WEBVIEW_HOST_H
|
|
|
|
#define _WEBVIEW_HOST_H
|
|
|
|
|
|
|
|
#include "base/basictypes.h"
|
2009-10-13 03:39:30 +02:00
|
|
|
#include "app/gfx/native_widget_types.h"
|
2009-07-24 21:11:01 +02:00
|
|
|
#include "base/gfx/rect.h"
|
|
|
|
#include "webwidget_host.h"
|
|
|
|
|
|
|
|
struct WebPreferences;
|
2009-09-17 18:56:32 +02:00
|
|
|
class BrowserWebViewDelegate;
|
2009-07-24 21:11:01 +02:00
|
|
|
|
2009-10-22 01:27:29 +02:00
|
|
|
namespace WebKit {
|
|
|
|
class WebView;
|
|
|
|
}
|
|
|
|
|
2009-07-24 21:11:01 +02:00
|
|
|
// This class is a simple ViewHandle-based host for a WebView
|
|
|
|
class WebViewHost : public WebWidgetHost {
|
|
|
|
public:
|
|
|
|
// The new instance is deleted once the associated ViewHandle is destroyed.
|
|
|
|
// The newly created window should be resized after it is created, using the
|
|
|
|
// MoveWindow (or equivalent) function.
|
|
|
|
static WebViewHost* Create(gfx::NativeView parent_window,
|
2009-09-17 18:56:32 +02:00
|
|
|
BrowserWebViewDelegate* delegate,
|
2009-07-24 21:11:01 +02:00
|
|
|
const WebPreferences& prefs);
|
|
|
|
|
2009-10-22 01:27:29 +02:00
|
|
|
WebKit::WebView* webview() const;
|
2009-07-24 21:11:01 +02:00
|
|
|
|
|
|
|
protected:
|
|
|
|
#if defined(OS_WIN)
|
|
|
|
virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam) {
|
|
|
|
return false;
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // _WEBVIEW_HOST_H
|