libcef: Update due to underlying chromium changes.

- External plugin loading support is now provided by webkit/glue/plugins so the libcef/plugins directory has been eliminated, with related changes.
- Modify the CefPluginInfo structure to use a more friendly data organization format.
- Remove CefUnregisterPlugin() as it is no longer functional.
- WebViewDelegate::ShowContextMenu() now receives the menu type as a bit-masked flag, so adjust the API accordingly.
- WebViewDelegate::GetContainingView() now returns a gfx::NativeViewId instead of a gfx::NativeView.
- Modify BrowserRequestContext because GetUserAgent() is now a virtual method of URLRequestContext.
- The data buffer in RequestProxy is now a net::IOBuffer.
- Add webkit_glue::GetScreenInfo().

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@10 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2009-01-29 16:36:37 +00:00
parent 1b6fa403ab
commit 73027bb5a9
32 changed files with 139 additions and 4060 deletions

View File

@@ -401,23 +401,10 @@ public:
std::wstring& mimeType,
int loadFlags) =0;
// Various context menu types supported by chrome.
enum MenuType
{
MENUTYPE_NONE = 0,
MENUTYPE_PAGE,
MENUTYPE_FRAME,
MENUTYPE_LINK,
MENUTYPE_IMAGE,
MENUTYPE_IMAGE_LINK,
MENUTYPE_SELECTION,
MENUTYPE_EDITABLE
};
// Structure representing menu information
struct MenuInfo
{
MenuType menuType;
int typeFlags;
int x;
int y;
std::wstring linkUrl;
@@ -430,8 +417,28 @@ public:
std::string securityInfo;
};
// The MenuInfo typeFlags value will be a combination of the following
enum MenuTypeBits {
// No node is selected
MENUTYPE_NONE = 0x0,
// The top page is selected
MENUTYPE_PAGE = 0x1,
// A subframe page is selected
MENUTYPE_FRAME = 0x2,
// A link is selected
MENUTYPE_LINK = 0x4,
// An image is selected
MENUTYPE_IMAGE = 0x8,
// There is a textual or mixed selection that is selected
MENUTYPE_SELECTION = 0x10,
// An editable element is selected
MENUTYPE_EDITABLE = 0x20,
// A misspelled word is selected
MENUTYPE_MISSPELLED_WORD = 0x40,
};
// The MenuInfo editFlags value will be a combination of the following
enum MenuCapability
enum MenuCapabilityBits
{
CAN_DO_NONE = 0x0,
CAN_UNDO = 0x1,

View File

@@ -32,6 +32,7 @@
#define _CEF_PLUGIN_H
#include <string>
#include <vector>
#include "webkit/glue/plugins/nphostapi.h"
#include "third_party/npapi/bindings/npapi.h"
@@ -42,35 +43,43 @@
// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete
// documentation on how to use the Netscape Plugin API.
// This structure fully describes a plugin.
struct CefPluginVersionInfo {
// Unique name used to identify a plugin. The unique name is used in place
// of the file path that would be available with normal plugin DLLs.
std::wstring unique_name;
std::wstring product_name;
// This structure describes a mime type entry for a plugin.
struct CefPluginMimeType {
// The actual mime type.
std::wstring mime_type;
// A list of all the file extensions for this mime type.
std::vector<std::wstring> file_extensions;
// Description of the mime type.
std::wstring description;
std::wstring version;
// List of supported mime type values, delimited with a pipe (|) character.
std::wstring mime_types;
// List of supported file extensions, delimited with a pipe (|) character.
std::wstring file_extensions;
// List of descriptions for the file extensions, delimited with a pipe (|)
// character.
std::wstring file_open_names;
};
// This structure provides version information and entry point functions.
// This structure provides attribute information and entry point functions for
// a plugin.
struct CefPluginInfo {
CefPluginVersionInfo version_info;
// The unique name that identifies the plugin.
std::wstring unique_name;
// The friendly display name of the plugin.
std::wstring display_name;
// The version string of the plugin.
std::wstring version;
// A description of the plugin.
std::wstring description;
// A list of all the mime types that this plugin supports.
std::vector<CefPluginMimeType> mime_types;
// Entry point function pointers.
NP_GetEntryPointsFunc np_getentrypoints;
NP_InitializeFunc np_initialize;
NP_ShutdownFunc np_shutdown;
};
// Register the plugin with the system.
// Register a plugin with the system.
bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info);
// Unregister the plugin with the system.
bool CefUnregisterPlugin(const struct CefPluginInfo& plugin_info);
#endif // _CEF_PLUGIN_H