cef/cef1/libcef/webview_host.h
Marshall Greenblatt 801ff3ca43 - Update to Chromium revision 138235.
- Move to the new DOM storage backend. Persistent localStorage support will need to be re-implemented (issue #603).
- Add CefV8Value::CreateUInt method and indicate that integer types are 32bit via usage of int32 and uint32 types (issue #331).
- Add CefV8Context::Eval method for synchronous JavaScript execution that returns a value or exception (issue #444).
- Move exception handling from an ExecuteFunction argument to a CefV8Value attribute (issue #546).
- Make user data an attribute for all CefV8Value object types and not just CreateObject (issue #547).
- Un-fork SQLitePersistentCookieStore by adding stub implementations for sqlite_diagnostics and browser_thread.
- Update tools/cef_parser.py to match the CEF3 version.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@644 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
2012-05-23 19:01:04 +00:00

83 lines
2.6 KiB
C++

// Copyright (c) 2010 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 CEF_LIBCEF_WEBVIEW_HOST_H_
#define CEF_LIBCEF_WEBVIEW_HOST_H_
#pragma once
#include "libcef/webwidget_host.h"
#include "base/basictypes.h"
#include "ui/gfx/native_widget_types.h"
#if defined(TOOLKIT_GTK)
#include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
#endif
class BrowserWebViewDelegate;
namespace webkit_glue {
struct WebPreferences;
}
namespace WebKit {
class WebDevToolsAgentClient;
class WebView;
}
// This class is a simple NativeView-based host for a WebView
class WebViewHost : public WebWidgetHost {
public:
// The new instance is deleted once the associated NativeView 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_view,
const gfx::Rect& rect,
BrowserWebViewDelegate* delegate,
PaintDelegate* paint_delegate,
WebKit::WebDevToolsAgentClient* devtools_client,
const webkit_glue::WebPreferences& prefs);
virtual ~WebViewHost();
WebKit::WebView* webview() const;
#if defined(TOOLKIT_GTK)
// Create a new plugin parent container for a given plugin XID.
void CreatePluginContainer(gfx::PluginWindowHandle id);
// Destroy the plugin parent container when a plugin has been destroyed.
void DestroyPluginContainer(gfx::PluginWindowHandle id);
webkit::npapi::GtkPluginContainerManager* plugin_container_manager() {
return &plugin_container_manager_;
}
virtual void KeyEvent(GdkEventKey* event);
#elif defined(OS_MACOSX)
void SetIsActive(bool active);
virtual void MouseEvent(NSEvent* event);
virtual void KeyEvent(NSEvent* event);
virtual void SetFocus(bool enable);
#endif
protected:
explicit WebViewHost(BrowserWebViewDelegate* delegate);
#if defined(OS_WIN)
virtual bool WndProc(UINT message, WPARAM wparam, LPARAM lparam);
virtual void MouseEvent(UINT message, WPARAM wparam, LPARAM lparam);
virtual void KeyEvent(UINT message, WPARAM wparam, LPARAM lparam);
#endif
#if defined(TOOLKIT_GTK)
// Helper class that creates and moves plugin containers.
webkit::npapi::GtkPluginContainerManager plugin_container_manager_;
#endif
// The delegate pointer will always outlive the WebViewHost object.
BrowserWebViewDelegate* delegate_;
};
#endif // CEF_LIBCEF_WEBVIEW_HOST_H_