Update to Chromium revision 74933.

- CefRegisterPlugin now only supports a single mime type per registration.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@186 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-02-15 18:07:24 +00:00
parent 44ca592cff
commit 163f8d6db9
78 changed files with 537 additions and 538 deletions

View File

@ -62,3 +62,4 @@ Date | CEF Revision | Chromium Revision
2010-12-16 | /trunk@152 | /trunk@69409
2010-01-07 | /trunk@159 | /trunk@70742
2010-01-11 | /trunk@162 | /trunk@71081
2010-02-15 | /trunk@186 | /trunk@74933

24
cef.gyp
View File

@ -112,6 +112,8 @@
'action_name': 'repack_locale',
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/gfx/gfx_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_chromium_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_strings_en-US.pak',
'<(SHARED_INTERMEDIATE_DIR)/webkit/webkit_resources.pak',
@ -234,7 +236,6 @@
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../build/temp_gyp/googleurl.gyp:googleurl',
'../gfx/gfx.gyp:gfx',
'../media/media.gyp:media',
'../net/net.gyp:net',
'../net/net.gyp:net_resources',
@ -251,12 +252,14 @@
'../third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:concatenated_devtools_css',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:concatenated_devtools_js',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:devtools_html',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:inspector_resources',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:concatenated_devtools_css',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:concatenated_devtools_js',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:devtools_html',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:inspector_resources',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_resources',
'../ui/ui.gyp:ui_base',
'../webkit/support/webkit_support.gyp:appcache',
'../webkit/support/webkit_support.gyp:blob',
@ -287,6 +290,7 @@
'include/cef_export.h',
'include/cef_nplugin.h',
'include/cef_nplugin_capi.h',
'include/cef_nplugin_types.h',
'include/cef_ptr.h',
'include/cef_string.h',
'include/cef_string_list.h',
@ -445,14 +449,13 @@
'include_dirs': [
'.',
'..',
'../third_party/WebKit/WebKit/chromium/public'
'../third_party/WebKit/Source/WebKit/chromium/public'
],
'dependencies': [
'../app/app.gyp:app_base',
'../base/base.gyp:base',
'../base/base.gyp:base_i18n',
'../build/temp_gyp/googleurl.gyp:googleurl',
'../gfx/gfx.gyp:gfx',
'../media/media.gyp:media',
'../net/net.gyp:net',
'../net/net.gyp:net_resources',
@ -469,8 +472,10 @@
'../third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/Source/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/WebKit/Source/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib',
'../ui/gfx/gfx.gyp:gfx',
'../ui/gfx/gfx.gyp:gfx_resources',
'../ui/ui.gyp:ui_base',
'../webkit/support/webkit_support.gyp:appcache',
'../webkit/support/webkit_support.gyp:blob',
@ -573,6 +578,7 @@
'libcef/web_urlrequest_impl.cc',
'libcef/web_urlrequest_impl.h',
'libcef/webview_host.h',
'libcef/webwidget_host.cc',
'libcef/webwidget_host.h',
'libcef/xml_reader_impl.cc',
'libcef/xml_reader_impl.h',

View File

@ -1,4 +1,4 @@
// Copyright (c) 2008 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -28,13 +28,10 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_PLUGIN_H
#define _CEF_PLUGIN_H
#ifndef _CEF_NPLUGIN_H
#define _CEF_NPLUGIN_H
#include "cef_string.h"
#include <vector>
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/nphostapi.h"
#include "cef_nplugin_types.h"
// Netscape plugins are normally built at separate DLLs that are loaded by the
// browser when needed. This interface supports the creation of plugins that
@ -43,45 +40,78 @@
// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete
// documentation on how to use the Netscape Plugin API.
// This structure describes a mime type entry for a plugin.
struct CefPluginMimeType {
// The actual mime type.
CefString mime_type;
// This class provides attribute information and entry point functions for a
// plugin.
class CefPluginInfo : public cef_plugin_info_t
{
public:
CefPluginInfo()
{
Init();
}
virtual ~CefPluginInfo()
{
Reset();
}
// A list of all the file extensions for this mime type.
std::vector<CefString> file_extensions;
CefPluginInfo(const CefPluginInfo& r)
{
Init();
*this = r;
}
CefPluginInfo(const cef_plugin_info_t& r)
{
Init();
*this = r;
}
// Description of the mime type.
CefString description;
};
void Reset()
{
cef_string_clear(&unique_name);
cef_string_clear(&display_name);
cef_string_clear(&description);
cef_string_clear(&mime_type);
Init();
}
// This structure provides attribute information and entry point functions for
// a plugin.
struct CefPluginInfo {
// The unique name that identifies the plugin.
CefString unique_name;
void Attach(const cef_plugin_info_t& r)
{
Reset();
*static_cast<cef_plugin_info_t*>(this) = r;
}
// The friendly display name of the plugin.
CefString display_name;
void Detach()
{
Init();
}
// The version string of the plugin.
CefString version;
CefPluginInfo& operator=(const CefPluginInfo& r)
{
return operator=(static_cast<const cef_plugin_info_t&>(r));
}
// A description of the plugin.
CefString description;
// A list of all the mime types that this plugin supports.
std::vector<CefPluginMimeType> mime_types;
// Entry point function pointers.
CefPluginInfo& operator=(const cef_plugin_info_t& r)
{
cef_string_copy(r.unique_name.str, r.unique_name.length, &unique_name);
cef_string_copy(r.display_name.str, r.display_name.length, &display_name);
cef_string_copy(r.description.str, r.description.length, &description);
cef_string_copy(r.mime_type.str, r.mime_type.length, &mime_type);
#if !defined(OS_POSIX) || defined(OS_MACOSX)
NP_GetEntryPointsFunc np_getentrypoints;
np_getentrypoints = r.np_getentrypoints;
#endif
NP_InitializeFunc np_initialize;
NP_ShutdownFunc np_shutdown;
np_initialize = r.np_initialize;
np_shutdown = r.np_shutdown;
return *this;
}
protected:
void Init()
{
memset(static_cast<cef_plugin_info_t*>(this), 0, sizeof(cef_plugin_info_t));
}
};
// Register a plugin with the system.
bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info);
bool CefRegisterPlugin(const CefPluginInfo& plugin_info);
#endif // _CEF_PLUGIN_H
#endif // _CEF_NPLUGIN_H

View File

@ -1,4 +1,4 @@
// Copyright (c) 2009 Marshall A. Greenblatt. All rights reserved.
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
@ -28,58 +28,15 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_PLUGIN_CAPI_H
#define _CEF_PLUGIN_CAPI_H
#ifndef _CEF_NPLUGIN_CAPI_H
#define _CEF_NPLUGIN_CAPI_H
#include "cef_nplugin_types.h"
#ifdef __cplusplus
extern "C" {
#endif
#include "cef_export.h"
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/nphostapi.h"
// Netscape plugins are normally built at separate DLLs that are loaded by the
// browser when needed. This interface supports the creation of plugins that
// are an embedded component of the application. Embedded plugins built using
// this interface use the same Netscape Plugin API as DLL-based plugins.
// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete
// documentation on how to use the Netscape Plugin API.
// This structure provides attribute information and entry point functions for
// a plugin.
typedef struct _cef_plugin_info_t {
// The unique name that identifies the plugin.
cef_string_t unique_name;
// The friendly display name of the plugin.
cef_string_t display_name;
// The version string of the plugin.
cef_string_t version;
// A description of the plugin.
cef_string_t description;
// A pipe (|) delimited list of mime type values that the plugin supports.
cef_string_t mime_types;
// A pipe (|) delimited list of extension values. Each value is associated
// with the mime type value at the same position. Multiple file extensions
// for the same mime type may be delimited with commas (,).
cef_string_t file_extensions;
// A pipe (|) delimited list of description values. Each value is associated
// with the mime type value at the same position.
cef_string_t type_descriptions;
// Entry point function pointers.
#if !defined(OS_POSIX) || defined(OS_MACOSX)
NP_GetEntryPointsFunc np_getentrypoints;
#endif
NP_InitializeFunc np_initialize;
NP_ShutdownFunc np_shutdown;
} cef_plugin_info_t;
// Register a plugin with the system. Returns true (1) on success.
CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info);
@ -89,4 +46,4 @@ CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info);
}
#endif
#endif // _CEF_PLUGIN_CAPI_H
#endif // _CEF_NPLUGIN_CAPI_H

View File

@ -0,0 +1,77 @@
// Copyright (c) 2011 Marshall A. Greenblatt. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
// met:
//
// * Redistributions of source code must retain the above copyright
// notice, this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above
// copyright notice, this list of conditions and the following disclaimer
// in the documentation and/or other materials provided with the
// distribution.
// * Neither the name of Google Inc. nor the name Chromium Embedded
// Framework nor the names of its contributors may be used to endorse
// or promote products derived from this software without specific prior
// written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#ifndef _CEF_NPLUGIN_TYPES_H
#define _CEF_NPLUGIN_TYPES_H
#include "cef_export.h"
#include "cef_string.h"
#include "third_party/npapi/bindings/npapi.h"
#include "third_party/npapi/bindings/nphostapi.h"
#ifdef __cplusplus
extern "C" {
#endif
// Netscape plugins are normally built at separate DLLs that are loaded by the
// browser when needed. This interface supports the creation of plugins that
// are an embedded component of the application. Embedded plugins built using
// this interface use the same Netscape Plugin API as DLL-based plugins.
// See https://developer.mozilla.org/En/Gecko_Plugin_API_Reference for complete
// documentation on how to use the Netscape Plugin API.
// This structure provides attribute information and entry point functions for
// a plugin.
typedef struct _cef_plugin_info_t {
// The unique name that identifies the plugin.
cef_string_t unique_name;
// The friendly display name of the plugin.
cef_string_t display_name;
// A description of the plugin.
cef_string_t description;
// The mime type that the plugin supports.
cef_string_t mime_type;
// Entry point function pointers.
#if !defined(OS_POSIX) || defined(OS_MACOSX)
NP_GetEntryPointsFunc np_getentrypoints;
#endif
NP_InitializeFunc np_initialize;
NP_ShutdownFunc np_shutdown;
} cef_plugin_info_t;
#ifdef __cplusplus
}
#endif
#endif // _CEF_NPLUGIN_TYPES_H

View File

@ -6,7 +6,7 @@
#include "browser_resource_loader_bridge.h"
#include "base/callback.h"
#include "base/lock.h"
#include "base/synchronization/lock.h"
#include "base/task.h"
#include "base/synchronization/waitable_event.h"
#include "webkit/appcache/appcache_interceptor.h"

View File

@ -10,8 +10,8 @@
#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h"
#include "third_party/sqlite/sqlite3.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "webkit/database/database_util.h"
#include "webkit/database/vfs_backend.h"
@ -28,7 +28,7 @@ BrowserDatabaseSystem* BrowserDatabaseSystem::GetInstance() {
BrowserDatabaseSystem::BrowserDatabaseSystem()
: waiting_for_dbs_to_close_(false) {
temp_dir_.CreateUniqueTempDir();
CHECK(temp_dir_.CreateUniqueTempDir());
db_tracker_ = new DatabaseTracker(temp_dir_.path(), false);
db_tracker_->AddObserver(this);
DCHECK(!instance_);
@ -175,7 +175,7 @@ void BrowserDatabaseSystem::SetFullFilePathsForVfsFile(
FilePath file_name =
DatabaseUtil::GetFullFilePathForVfsFile(db_tracker_, vfs_file_name);
AutoLock file_names_auto_lock(file_names_lock_);
base::AutoLock file_names_auto_lock(file_names_lock_);
file_names_[vfs_file_name] = file_name;
file_names_[vfs_file_name + ASCIIToUTF16("-journal")] =
FilePath::FromWStringHack(file_name.ToWStringHack() +
@ -187,7 +187,7 @@ FilePath BrowserDatabaseSystem::GetFullFilePathForVfsFile(
if (vfs_file_name.empty()) // temp file, used for vacuuming
return FilePath();
AutoLock file_names_auto_lock(file_names_lock_);
base::AutoLock file_names_auto_lock(file_names_lock_);
if(file_names_.find(vfs_file_name) != file_names_.end())
return file_names_[vfs_file_name];

View File

@ -7,12 +7,12 @@
#include "base/file_path.h"
#include "base/hash_tables.h"
#include "base/lock.h"
#include "base/platform_file.h"
#include "base/ref_counted.h"
#include "base/scoped_temp_dir.h"
#include "base/string16.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabaseObserver.h"
#include "base/synchronization/lock.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabaseObserver.h"
#include "webkit/database/database_connections.h"
#include "webkit/database/database_tracker.h"
@ -75,7 +75,7 @@ class BrowserDatabaseSystem : public webkit_database::DatabaseTracker::Observer,
scoped_refptr<webkit_database::DatabaseTracker> db_tracker_;
Lock file_names_lock_;
base::Lock file_names_lock_;
base::hash_map<string16, FilePath> file_names_;
webkit_database::DatabaseConnections database_connections_;

View File

@ -6,8 +6,8 @@
#include "base/message_loop.h"
#include "grit/webkit_chromium_resources.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "browser_devtools_callargs.h"
#include "browser_devtools_client.h"
#include "webkit/glue/webkit_glue.h"

View File

@ -7,7 +7,7 @@
#include "base/task.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgentClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgentClient.h"
namespace WebKit {

View File

@ -7,7 +7,7 @@
#include "base/basictypes.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
class BrowserDevToolsCallArgs {
public:

View File

@ -2,12 +2,12 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsAgent.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsFrontend.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsAgent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontend.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#undef LOG
#include "browser_devtools_agent.h"

View File

@ -8,7 +8,7 @@
#include "base/scoped_ptr.h"
#include "base/task.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDevToolsFrontendClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDevToolsFrontendClient.h"
namespace WebKit {

View File

@ -4,8 +4,8 @@
#include "browser_drag_delegate.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
using WebKit::WebPoint;
using WebKit::WebView;

View File

@ -5,23 +5,23 @@
#ifndef _BROWSER_DRAG_DELEGATE_H
#define _BROWSER_DRAG_DELEGATE_H
#include "app/win/drag_source.h"
#include "ui/base/dragdrop/drag_source.h"
namespace WebKit {
class WebView;
}
// A class that implements app::win::DragSource for the browser webview
// A class that implements ui::DragSource for the browser webview
// delegate.
class BrowserDragDelegate : public app::win::DragSource {
class BrowserDragDelegate : public ui::DragSource {
public:
BrowserDragDelegate(HWND source_hwnd, WebKit::WebView* webview)
: app::win::DragSource(),
: ui::DragSource(),
source_hwnd_(source_hwnd),
webview_(webview) { }
protected:
// app::win::DragSource
// ui::DragSource
virtual void OnDragSourceCancel();
virtual void OnDragSourceDrop();
virtual void OnDragSourceMove();

View File

@ -4,9 +4,9 @@
#include "browser_drop_delegate.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDragData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webdropdata.h"
using WebKit::WebDragOperation;
@ -15,7 +15,7 @@ using WebKit::WebPoint;
using WebKit::WebView;
BrowserDropDelegate::BrowserDropDelegate(HWND source_hwnd, WebKit::WebView* webview)
: app::win::DropTarget(source_hwnd),
: ui::DropTarget(source_hwnd),
webview_(webview) {
}

View File

@ -7,13 +7,13 @@
#ifndef _BROWSER_DROP_DELEGATE_H
#define _BROWSER_DROP_DELEGATE_H
#include "app/win/drop_target.h"
#include "ui/base/dragdrop/drop_target.h"
namespace WebKit {
class WebView;
}
class BrowserDropDelegate : public app::win::DropTarget {
class BrowserDropDelegate : public ui::DropTarget {
public:
BrowserDropDelegate(HWND source_hwnd, WebKit::WebView* webview);

View File

@ -12,17 +12,17 @@
#include "base/time.h"
#include "base/utf_string_conversions.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemEntry.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemEntry.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h"
#include "webkit/fileapi/file_system_callback_dispatcher.h"
#include "webkit/fileapi/file_system_context.h"
#include "webkit/fileapi/file_system_operation.h"
#include "webkit/fileapi/file_system_path_manager.h"
#include "webkit/fileapi/file_system_types.h"
#include "webkit/fileapi/sandboxed_file_system_context.h"
#include "webkit/fileapi/sandboxed_file_system_operation.h"
#include "webkit/glue/webkit_glue.h"
using base::WeakPtr;
@ -39,8 +39,8 @@ using WebKit::WebString;
using WebKit::WebVector;
using fileapi::FileSystemCallbackDispatcher;
using fileapi::SandboxedFileSystemContext;
using fileapi::SandboxedFileSystemOperation;
using fileapi::FileSystemContext;
using fileapi::FileSystemOperation;
namespace {
@ -118,7 +118,7 @@ class BrowserFileSystemCallbackDispatcher
BrowserFileSystem::BrowserFileSystem() {
if (file_system_dir_.CreateUniqueTempDir()) {
sandboxed_context_ = new SandboxedFileSystemContext(
file_system_context_ = new FileSystemContext(
base::MessageLoopProxy::CreateForCurrentThread(),
base::MessageLoopProxy::CreateForCurrentThread(),
file_system_dir_.path(),
@ -138,7 +138,7 @@ void BrowserFileSystem::OpenFileSystem(
WebFrame* frame, WebFileSystem::Type web_filesystem_type,
long long, bool create,
WebFileSystemCallbacks* callbacks) {
if (!frame || !sandboxed_context_.get()) {
if (!frame || !file_system_context_.get()) {
// The FileSystem temp directory was not initialized successfully.
callbacks->didFail(WebKit::WebFileErrorSecurity);
return;
@ -238,12 +238,12 @@ WebFileWriter* BrowserFileSystem::createFileWriter(
return new BrowserFileWriter(path, client);
}
SandboxedFileSystemOperation* BrowserFileSystem::GetNewOperation(
FileSystemOperation* BrowserFileSystem::GetNewOperation(
WebFileSystemCallbacks* callbacks) {
BrowserFileSystemCallbackDispatcher* dispatcher =
new BrowserFileSystemCallbackDispatcher(AsWeakPtr(), callbacks);
SandboxedFileSystemOperation* operation = new SandboxedFileSystemOperation(
FileSystemOperation* operation = new FileSystemOperation(
dispatcher, base::MessageLoopProxy::CreateForCurrentThread(),
sandboxed_context_.get());
file_system_context_.get());
return operation;
}

View File

@ -10,7 +10,7 @@
#include "base/id_map.h"
#include "base/scoped_temp_dir.h"
#include "base/weak_ptr.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
#include "webkit/fileapi/file_system_types.h"
namespace WebKit {
@ -19,8 +19,8 @@ class WebFrame;
}
namespace fileapi {
class SandboxedFileSystemContext;
class SandboxedFileSystemOperation;
class FileSystemContext;
class FileSystemOperation;
}
class BrowserFileSystem
@ -66,13 +66,13 @@ class BrowserFileSystem
private:
// Helpers.
fileapi::SandboxedFileSystemOperation* GetNewOperation(
fileapi::FileSystemOperation* GetNewOperation(
WebKit::WebFileSystemCallbacks* callbacks);
// A temporary directory for FileSystem API.
ScopedTempDir file_system_dir_;
scoped_refptr<fileapi::SandboxedFileSystemContext> sandboxed_context_;
scoped_refptr<fileapi::FileSystemContext> file_system_context_;
DISALLOW_COPY_AND_ASSIGN(BrowserFileSystem);
};

View File

@ -19,7 +19,7 @@ using WebKit::WebFileWriterClient;
using WebKit::WebString;
using WebKit::WebURL;
URLRequestContext* BrowserFileWriter::request_context_ = NULL;
net::URLRequestContext* BrowserFileWriter::request_context_ = NULL;
// Helper class to proxy the write and truncate calls to the IO thread,
// and to proxy the results back to the main thead. There is a one-to-one
@ -116,7 +116,8 @@ class BrowserFileWriter::IOThreadProxy
FileSystemOperation* GetNewOperation() {
// The FileSystemOperation takes ownership of the CallbackDispatcher.
return new FileSystemOperation(new CallbackDispatcher(this), io_thread_);
return new FileSystemOperation(new CallbackDispatcher(this),
io_thread_, NULL);
}
void DidSucceed() {

View File

@ -14,18 +14,18 @@
#include "base/path_service.h"
#include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPlugin.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginDocument.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRange.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptSource.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPlugin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginDocument.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/glue_serialize.h"
#include "webkit/plugins/npapi/webplugin_delegate.h"
#include "webkit/plugins/npapi/webplugin_impl.h"

View File

@ -19,7 +19,7 @@
#endif
#include "base/scoped_temp_dir.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFindOptions.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFindOptions.h"
namespace base {
class WaitableEvent;

View File

@ -9,10 +9,10 @@
#include <gtk/gtk.h>
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webpreferences.h"
using WebKit::WebRect;
@ -75,7 +75,7 @@ void CefBrowserImpl::UIT_SetFocus(WebWidgetHost* host, bool enable)
REQUIRE_UIT();
if (!host)
return;
if(enable)
gtk_widget_grab_focus(host->view_handle());
}
@ -83,7 +83,7 @@ void CefBrowserImpl::UIT_SetFocus(WebWidgetHost* host, bool enable)
bool CefBrowserImpl::UIT_ViewDocumentString(WebKit::WebFrame *frame)
{
REQUIRE_UIT();
// TODO(port): Add implementation.
NOTIMPLEMENTED();
return false;
@ -107,8 +107,8 @@ void CefBrowserImpl::UIT_PrintPages(WebKit::WebFrame* frame) {
int CefBrowserImpl::UIT_GetPagesCount(WebKit::WebFrame* frame)
{
REQUIRE_UIT();
REQUIRE_UIT();
// TODO(port): Add implementation.
NOTIMPLEMENTED();
return 0;

View File

@ -10,10 +10,10 @@
#import <Cocoa/Cocoa.h>
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webpreferences.h"
using WebKit::WebRect;
@ -110,7 +110,7 @@ void CefBrowserImpl::UIT_SetFocus(WebWidgetHost* host, bool enable)
REQUIRE_UIT();
if (!host)
return;
NSView* view = host->view_handle();
if (!view)
return;
@ -122,7 +122,7 @@ void CefBrowserImpl::UIT_SetFocus(WebWidgetHost* host, bool enable)
bool CefBrowserImpl::UIT_ViewDocumentString(WebKit::WebFrame *frame)
{
REQUIRE_UIT();
// TODO(port): Add implementation.
NOTIMPLEMENTED();
return false;
@ -146,8 +146,8 @@ void CefBrowserImpl::UIT_PrintPages(WebKit::WebFrame* frame) {
int CefBrowserImpl::UIT_GetPagesCount(WebKit::WebFrame* frame)
{
REQUIRE_UIT();
REQUIRE_UIT();
// TODO(port): Add implementation.
NOTIMPLEMENTED();
return 0;

View File

@ -8,12 +8,12 @@
#include "browser_settings.h"
#include "printing/units.h"
#include "app/win/hwnd_util.h"
#include "skia/ext/vector_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/win/hwnd_util.h"
#include "webkit/glue/webpreferences.h"
#include <shellapi.h>
@ -34,7 +34,7 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam)
{
CefBrowserImpl* browser =
static_cast<CefBrowserImpl*>(app::win::GetWindowUserData(hwnd));
static_cast<CefBrowserImpl*>(ui::GetWindowUserData(hwnd));
switch (message) {
case WM_COMMAND:
@ -49,7 +49,7 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
case WM_DESTROY:
if (browser) {
// Clear the user data pointer.
app::win::SetWindowUserData(hwnd, NULL);
ui::SetWindowUserData(hwnd, NULL);
// Destroy the browser.
browser->UIT_DestroyBrowser();
@ -111,7 +111,7 @@ void CefBrowserImpl::UIT_CreateBrowser(const CefString& url)
// Set window user data to this object for future reference from the window
// procedure
app::win::SetWindowUserData(window_info_.m_hWnd, this);
ui::SetWindowUserData(window_info_.m_hWnd, this);
if (!settings_.developer_tools_disabled)
dev_tools_agent_.reset(new BrowserDevToolsAgent());

View File

@ -13,8 +13,8 @@
#include "base/linked_ptr.h"
#include "base/ref_counted.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h"
#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h"
#include "include/cef.h"

View File

@ -149,7 +149,7 @@ BrowserRequestContext::~BrowserRequestContext() {
void BrowserRequestContext::SetAcceptAllCookies(bool accept_all_cookies) {
net::StaticCookiePolicy::Type policy_type = accept_all_cookies ?
net::StaticCookiePolicy::ALLOW_ALL_COOKIES :
net::StaticCookiePolicy::BLOCK_THIRD_PARTY_COOKIES;
net::StaticCookiePolicy::BLOCK_SETTING_THIRD_PARTY_COOKIES;
static_cast<net::StaticCookiePolicy*>(cookie_policy())->set_type(policy_type);
}

View File

@ -16,7 +16,7 @@ class BlobStorageController;
}
// A basic URLRequestContext that only provides an in-memory cookie store.
class BrowserRequestContext : public URLRequestContext {
class BrowserRequestContext : public net::URLRequestContext {
public:
// Use an in-memory cache
BrowserRequestContext();

View File

@ -1,4 +1,4 @@
// Copyright (c) 2010 The Chromium Embedded Framework Authors.
// Copyright (c) 2011 The Chromium Embedded Framework Authors.
// Portions 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.
@ -52,10 +52,11 @@
#include "base/nss_util.h"
#endif
#include "base/ref_counted.h"
#include "base/synchronization/waitable_event.h"
#include "base/time.h"
#include "base/timer.h"
#include "base/threading/thread.h"
#include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.h"
#include "net/base/auth.h"
#include "net/base/cookie_store.h"
#include "net/base/file_stream.h"
@ -80,6 +81,7 @@
using net::HttpResponseHeaders;
using net::StaticCookiePolicy;
using net::URLRequestStatus;
using webkit_blob::DeletableFileReference;
using webkit_glue::ResourceLoaderBridge;
using webkit_glue::ResourceResponseInfo;
@ -201,7 +203,7 @@ class RequestProxy : public net::URLRequest::Delegate,
if (allow_download &&
webkit_glue::ShouldDownload(content_disposition, info.mime_type)) {
FilePath path(net::GetSuggestedFilename(url, content_disposition,
info.charset, FilePath(FILE_PATH_LITERAL("download"))));
info.charset, ASCIIToUTF16("download")));
CefRefPtr<CefDownloadHandler> dl_handler;
if (handler->HandleDownloadResponse(browser_, info.mime_type,
path.value(), info.content_length, dl_handler) ==
@ -255,7 +257,7 @@ class RequestProxy : public net::URLRequest::Delegate,
peer_->OnDownloadedData(bytes_read);
}
void NotifyCompletedRequest(const URLRequestStatus& status,
void NotifyCompletedRequest(const net::URLRequestStatus& status,
const std::string& security_info,
const base::Time& complete_time) {
if (download_handler_.get()) {
@ -538,7 +540,7 @@ class RequestProxy : public net::URLRequest::Delegate,
this, &RequestProxy::NotifyReceivedData, bytes_read));
}
virtual void OnCompletedRequest(const URLRequestStatus& status,
virtual void OnCompletedRequest(const net::URLRequestStatus& status,
const std::string& security_info,
const base::Time& complete_time) {
if (download_to_file_)
@ -757,7 +759,7 @@ class SyncRequestProxy : public RequestProxy {
AsyncReadData(); // read more (may recurse)
}
virtual void OnCompletedRequest(const URLRequestStatus& status,
virtual void OnCompletedRequest(const net::URLRequestStatus& status,
const std::string& security_info,
const base::Time& complete_time) {
if (download_to_file_)

View File

@ -12,9 +12,9 @@
#include "net/socket_stream/socket_stream_job.h"
#include "net/websockets/websocket_job.h"
#include "net/url_request/url_request_context.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSocketStreamHandle.h"
#include "webkit/glue/websocketstreamhandle_bridge.h"
#include "webkit/glue/websocketstreamhandle_delegate.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSocketStreamHandle.h"
using webkit_glue::WebSocketStreamHandleBridge;
@ -23,7 +23,7 @@ static const int kNoSocketId = 0;
namespace {
MessageLoop* g_io_thread;
scoped_refptr<URLRequestContext> g_request_context;
scoped_refptr<net::URLRequestContext> g_request_context;
class WebSocketStreamHandleBridgeImpl
: public WebSocketStreamHandleBridge,
@ -220,7 +220,7 @@ void WebSocketStreamHandleBridgeImpl::DoOnClose() {
/* static */
void BrowserSocketStreamBridge::InitializeOnIOThread(
URLRequestContext* request_context) {
net::URLRequestContext* request_context) {
g_io_thread = MessageLoop::current();
g_request_context = request_context;
}

View File

@ -7,9 +7,9 @@
#include "base/basictypes.h"
#include "base/ref_counted.h"
#include "third_party/WebKit/WebKit/chromium/public/WebMessagePortChannel.h"
#include "third_party/WebKit/WebKit/chromium/public/WebWorker.h"
#include "third_party/WebKit/WebKit/chromium/public/WebWorkerClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebMessagePortChannel.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWorker.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWorkerClient.h"
namespace WebKit {
class WebApplicationCacheHost;

View File

@ -6,9 +6,9 @@
#include "base/message_loop.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBlobData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "webkit/blob/blob_data.h"
#include "webkit/blob/blob_storage_controller.h"

View File

@ -6,7 +6,7 @@
#define BROWSER_WEBBLOBREGISTRY_IMPL_H_
#include "base/ref_counted.h"
#include "third_party/WebKit/WebKit/chromium/public/WebBlobRegistry.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebBlobRegistry.h"
class GURL;

View File

@ -5,7 +5,7 @@
#include "browser_webcookiejar_impl.h"
#include "browser_resource_loader_bridge.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
using WebKit::WebString;
using WebKit::WebURL;

View File

@ -6,8 +6,8 @@
#define _BROWSER_SIMPLE_WEBCOOKIEJAR_IMPL_H
// TODO(darin): WebCookieJar.h is missing a WebString.h include!
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCookieJar.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCookieJar.h"
class BrowserWebCookieJarImpl : public WebKit::WebCookieJar {
public:

View File

@ -7,10 +7,12 @@
#include "third_party/WebKit/Source/WebCore/config.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "ApplicationCacheStorage.h"
#include "CrossOriginPreflightResultCache.h"
#include "DocumentLoader.h"
#include "MemoryCache.h"
#include "TextEncoding.h"
#include "third_party/WebKit/WebKit/chromium/src/WebFrameImpl.h"
#include "third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.h"
MSVC_POP_WARNING();
#undef LOG
#include "base/string_util.h"
@ -27,8 +29,8 @@ MSVC_POP_WARNING();
#include "base/scoped_ptr.h"
#include "base/string16.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"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "webkit/glue/webkit_glue.h"
#include "webkit/glue/plugins/plugin_list.h"
@ -140,9 +142,15 @@ void SetCacheMode(bool enabled) {
void ClearCache()
{
// Clear the cache by disabling it and then re-enabling it.
WebCore::cache()->setDisabled(true);
WebCore::cache()->setDisabled(false);
if (WebCore::memoryCache()->disabled())
return;
// Clear the memory cache by disabling and then re-enabling it.
WebCore::memoryCache()->setDisabled(true);
WebCore::memoryCache()->setDisabled(false);
// Empty the Cross-Origin Preflight cache
WebCore::CrossOriginPreflightResultCache::shared().empty();
}
std::string GetProductVersion() {

View File

@ -10,23 +10,23 @@
#include "browser_webkit_glue.h"
#undef LOG
#include "app/data_pack.h"
#include "base/file_util.h"
#include "base/logging.h"
#include "base/mac/mac_util.h"
#include "base/path_service.h"
#include "grit/webkit_resources.h"
#include "ui/base/resource/data_pack.h"
#include "webkit/glue/webkit_glue.h"
namespace webkit_glue {
// Data pack resource. This is a pointer to the mmapped resources file.
static app::DataPack* g_resource_data_pack = NULL;
static ui::DataPack* g_resource_data_pack = NULL;
void InitializeDataPak() {
// mmap the data pack which holds strings used by WebCore.
// TODO(port): Allow the embedder to customize the pak name.
g_resource_data_pack = new app::DataPack;
g_resource_data_pack = new ui::DataPack;
NSString *resource_path =
[base::mac::MainAppBundle() pathForResource:@"cefclient" ofType:@"pak"];
FilePath resources_pak_path([resource_path fileSystemRepresentation]);

View File

@ -19,11 +19,11 @@ MSVC_POP_WARNING();
#undef LOG
#include "base/logging.h"
#include "base/resource_util.h"
#include "gfx/gdi_util.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/gfx/gdi_util.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebRect;

View File

@ -23,20 +23,20 @@
#include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/database/vfs_backend.h"
#include "webkit/extensions/v8/gears_extension.h"
#include "third_party/WebKit/WebKit/chromium/public/WebData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRuntimeFeatures.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityPolicy.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageEventDispatcher.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBKey.h"
#include "third_party/WebKit/WebKit/chromium/public/WebIDBKeyPath.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSerializedScriptValue.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDatabase.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityPolicy.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKey.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebIDBKeyPath.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSerializedScriptValue.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "webkit/glue/simple_webmimeregistry_impl.h"
#include "webkit/glue/webclipboard_impl.h"
#include "webkit/glue/webfileutilities_impl.h"
@ -229,7 +229,7 @@ class BrowserWebKitInit : public webkit_glue::WebKitClientImpl {
}
virtual WebKit::WebGraphicsContext3D* createGraphicsContext3D() {
return new webkit_gpu::WebGraphicsContext3DInProcessImpl();
return new webkit::gpu::WebGraphicsContext3DInProcessImpl();
}
WebKit::WebString queryLocalizedString(

View File

@ -7,9 +7,9 @@
#include "dom_storage_area.h"
#include "dom_storage_namespace.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
using WebKit::WebFrame;
using WebKit::WebString;

View File

@ -6,8 +6,8 @@
#define _BROWSER_WEBSTORAGEAREA_IMPL_H
#include "base/basictypes.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
class DOMStorageArea;

View File

@ -8,7 +8,7 @@
#include "dom_storage_common.h"
#include "base/basictypes.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
class BrowserWebStorageNamespaceImpl : public WebKit::WebStorageNamespace {
public:

View File

@ -13,6 +13,7 @@
#include "browser_impl.h"
#include "browser_navigation_controller.h"
#include "browser_web_worker.h"
#include "browser_webkit_glue.h"
#include "browser_zoom_map.h"
#include "cef_context.h"
#include "request_impl.h"
@ -23,37 +24,39 @@
#include "base/message_loop.h"
#include "base/process_util.h"
#include "base/string_util.h"
#include "gfx/point.h"
#include "media/base/filter_collection.h"
#include "media/base/message_loop_factory_impl.h"
#include "media/filters/audio_renderer_impl.h"
#include "net/base/net_errors.h"
#include "third_party/WebKit/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDataSource.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDragData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileError.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystemCallbacks.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebHistoryItem.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKitClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebNode.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPluginParams.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRange.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/WebKit/chromium/public/WebWindowFeatures.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebConsoleMessage.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDataSource.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebDragData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileError.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystemCallbacks.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHistoryItem.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKitClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebNode.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPoint.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPluginParams.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRange.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebVector.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebWindowFeatures.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
#include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/glue/glue_serialize.h"
#include "webkit/glue/media/video_renderer_impl.h"
@ -65,7 +68,6 @@
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include "webkit/plugins/npapi/webplugin_impl.h"
#include "browser_webkit_glue.h"
#if defined(OS_WIN)
// TODO(port): make these files work everywhere.
@ -493,6 +495,11 @@ void BrowserWebViewDelegate::scheduleComposite() {
host->ScheduleComposite();
}
void BrowserWebViewDelegate::scheduleAnimation() {
if (WebWidgetHost* host = GetWidgetHost())
host->ScheduleAnimation();
}
void BrowserWebViewDelegate::didFocus() {
if (WebWidgetHost* host = GetWidgetHost()) {
CefRefPtr<CefHandler> handler = browser_->GetHandler();
@ -530,7 +537,7 @@ WebPlugin* BrowserWebViewDelegate::createPlugin(
std::string actual_mime_type;
if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(
params.url, params.mimeType.utf8(), allow_wildcard, &info,
&actual_mime_type)) {
&actual_mime_type) || !webkit::npapi::IsPluginEnabled(info)) {
return NULL;
}
@ -545,6 +552,9 @@ WebWorker* BrowserWebViewDelegate::createWorker(
WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
WebFrame* frame, WebMediaPlayerClient* client) {
scoped_ptr<media::MessageLoopFactory> message_loop_factory(
new media::MessageLoopFactoryImpl());
scoped_ptr<media::FilterCollection> collection(
new media::FilterCollection());
@ -556,7 +566,9 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
collection->AddAudioRenderer(new media::AudioRendererImpl());
scoped_ptr<webkit_glue::WebMediaPlayerImpl> result(
new webkit_glue::WebMediaPlayerImpl(client, collection.release()));
new webkit_glue::WebMediaPlayerImpl(client,
collection.release(),
message_loop_factory.release()));
if (!result->Initialize(frame, false, video_renderer))
return NULL;
return result.release();

View File

@ -17,18 +17,18 @@
#include "base/scoped_ptr.h"
#include "base/weak_ptr.h"
#include "build/build_config.h"
#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileSystem.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileChooserParams.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFileSystem.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrameClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebViewClient.h"
#include "webkit/glue/webcursor.h"
#include "webkit/plugins/npapi/webplugin_page_delegate.h"
#include "browser_navigation_controller.h"
#if defined(OS_MACOSX)
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenuInfo.h"
#endif
#if defined(OS_WIN)
@ -116,6 +116,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
virtual void didScrollRect(int dx, int dy,
const WebKit::WebRect& clip_rect);
virtual void scheduleComposite();
virtual void scheduleAnimation();
virtual void didFocus();
virtual void didBlur();
virtual void didChangeCursor(const WebKit::WebCursorInfo& cursor);

View File

@ -10,13 +10,13 @@
#include <gtk/gtk.h>
#include "base/message_loop.h"
#include "gfx/gtk_util.h"
#include "gfx/point.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/gfx/gtk_util.h"
#include "ui/gfx/point.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webpreferences.h"

View File

@ -8,9 +8,9 @@
#import <Cocoa/Cocoa.h>
#include "base/sys_string_conversions.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webcursor.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"

View File

@ -20,15 +20,15 @@
#include "base/message_loop.h"
#include "base/string_util.h"
#include "gfx/gdi_util.h"
#include "gfx/native_widget_types.h"
#include "gfx/point.h"
#include "net/base/net_errors.h"
#include "third_party/WebKit/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebContextMenuData.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebCursorInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebRect.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/gfx/gdi_util.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/point.h"
#include "webkit/glue/webdropdata.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/glue/webkit_glue.h"

View File

@ -11,9 +11,9 @@
#include "webwidget_host.h"
#include "base/scoped_ptr.h"
#include "gfx/rect.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/gfx/rect.h"
@implementation BrowserWebView

View File

@ -76,48 +76,31 @@ void CefDoMessageLoopWork()
_Context->process()->DoMessageLoopIteration();
}
static void UIT_RegisterPlugin(struct CefPluginInfo* plugin_info)
static void UIT_RegisterPlugin(CefPluginInfo* plugin_info)
{
REQUIRE_UIT();
webkit::npapi::PluginVersionInfo info;
webkit::npapi::WebPluginInfo info;
info.path = FilePath(plugin_info->unique_name);
info.product_name = plugin_info->display_name;
info.file_description = plugin_info->description;
info.file_version =plugin_info->version;
for(size_t i = 0; i < plugin_info->mime_types.size(); ++i) {
if(i > 0) {
info.mime_types += L"|";
info.file_extensions += L"|";
info.type_descriptions += L"|";
}
info.mime_types += plugin_info->mime_types[i].mime_type;
info.type_descriptions += plugin_info->mime_types[i].description;
for(size_t j = 0;
j < plugin_info->mime_types[i].file_extensions.size(); ++j) {
if(j > 0) {
info.file_extensions += L",";
}
info.file_extensions += plugin_info->mime_types[i].file_extensions[j];
}
}
FilePath filename = FilePath(CefString(&plugin_info->unique_name));
std::string name = CefString(&plugin_info->display_name);
std::string description = CefString(&plugin_info->description);
std::string mime_type = CefString(&plugin_info->mime_type);
webkit::npapi::PluginEntryPoints entry_points;
#if !defined(OS_POSIX) || defined(OS_MACOSX)
info.entry_points.np_getentrypoints = plugin_info->np_getentrypoints;
entry_points.np_getentrypoints = plugin_info->np_getentrypoints;
#endif
info.entry_points.np_initialize = plugin_info->np_initialize;
info.entry_points.np_shutdown = plugin_info->np_shutdown;
entry_points.np_initialize = plugin_info->np_initialize;
entry_points.np_shutdown = plugin_info->np_shutdown;
webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info);
webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(filename,
name, description, mime_type, entry_points);
delete plugin_info;
}
bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info)
bool CefRegisterPlugin(const CefPluginInfo& plugin_info)
{
// Verify that the context is in a valid state.
if (!CONTEXT_STATE_VALID()) {
@ -125,11 +108,8 @@ bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info)
return false;
}
CefPluginInfo* pPluginInfo = new CefPluginInfo;
*pPluginInfo = plugin_info;
CefThread::PostTask(CefThread::UI, FROM_HERE,
NewRunnableFunction(UIT_RegisterPlugin, pPluginInfo));
NewRunnableFunction(UIT_RegisterPlugin, new CefPluginInfo(plugin_info)));
return true;
}

View File

@ -8,13 +8,13 @@
#include "browser_webkit_init.h"
#include "cef_context.h"
#include "app/gfx/gl/gl_implementation.h"
#include "base/command_line.h"
#include "base/i18n/icu_util.h"
#include "base/metrics/stats_table.h"
#include "base/rand_util.h"
#include "base/string_number_conversions.h"
#include "build/build_config.h"
#include "app/gfx/gl/gl_implementation.h"
#include "net/base/net_module.h"
#if defined(OS_WIN)
#include "net/socket/ssl_client_socket_nss_factory.h"

View File

@ -7,7 +7,7 @@
#include "cef_process_ui_thread.h"
#include "browser_webkit_glue.h"
#include "base/message_pump_mac.h"
#include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
#include "third_party/WebKit/Source/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
// CrAppProtocol implementation.
@interface CrApplication : NSApplication<CrAppProtocol> {

View File

@ -58,7 +58,7 @@ class CefThreadMessageLoopProxy : public MessageLoopProxy {
};
Lock CefThread::lock_;
base::Lock CefThread::lock_;
CefThread* CefThread::cef_threads_[ID_COUNT];
@ -77,7 +77,7 @@ CefThread::CefThread(ID identifier, MessageLoop* message_loop)
}
void CefThread::Initialize() {
AutoLock lock(lock_);
base::AutoLock lock(lock_);
DCHECK(identifier_ >= 0 && identifier_ < ID_COUNT);
DCHECK(cef_threads_[identifier_] == NULL);
cef_threads_[identifier_] = this;
@ -89,7 +89,7 @@ CefThread::~CefThread() {
// correct CefThread succeeds.
Stop();
AutoLock lock(lock_);
base::AutoLock lock(lock_);
cef_threads_[identifier_] = NULL;
#ifndef NDEBUG
// Double check that the threads are ordererd correctly in the enumeration.
@ -102,14 +102,14 @@ CefThread::~CefThread() {
// static
bool CefThread::IsWellKnownThread(ID identifier) {
AutoLock lock(lock_);
base::AutoLock lock(lock_);
return (identifier >= 0 && identifier < ID_COUNT &&
cef_threads_[identifier]);
}
// static
bool CefThread::CurrentlyOn(ID identifier) {
AutoLock lock(lock_);
base::AutoLock lock(lock_);
DCHECK(identifier >= 0 && identifier < ID_COUNT);
return cef_threads_[identifier] &&
cef_threads_[identifier]->message_loop() == MessageLoop::current();

View File

@ -6,7 +6,7 @@
#ifndef _CEF_THREAD_H
#define _CEF_THREAD_H
#include "base/lock.h"
#include "base/synchronization/lock.h"
#include "base/task.h"
#include "base/threading/thread.h"
@ -170,7 +170,7 @@ class CefThread : public base::Thread {
// This lock protects |cef_threads_|. Do not read or modify that array
// without holding this lock. Do not block while holding this lock.
static Lock lock_;
static base::Lock lock_;
// An array of the CefThread objects. This array is protected by |lock_|.
// The threads are not owned by this array. Typically, the threads are owned

View File

@ -7,10 +7,10 @@
#include "dom_storage_namespace.h"
#include "base/task.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURL.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURL.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebSecurityOrigin;

View File

@ -11,7 +11,7 @@
#include "base/scoped_ptr.h"
#include "base/string16.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
class DOMStorageNamespace;

View File

@ -13,8 +13,8 @@
#include "base/file_util.h"
#include "base/string_util.h"
#include "dom_storage_area.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSecurityOrigin.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "webkit/glue/webkit_glue.h"
const FilePath::CharType DOMStorageContext::kLocalStorageDirectory[] =

View File

@ -8,8 +8,8 @@
#include "base/file_path.h"
#include "base/logging.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/WebKit/chromium/public/WebStorageNamespace.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageArea.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageNamespace.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebStorageArea;

View File

@ -10,7 +10,7 @@
#include "base/hash_tables.h"
#include "base/scoped_ptr.h"
#include "base/string16.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
class DOMStorageArea;
class DOMStorageContext;

View File

@ -5,8 +5,8 @@
#ifndef _HTTP_HEADER_UTILS_H
#define _HTTP_HEADER_UTILS_H
#include "third_party/WebKit/WebKit/chromium/public/WebHTTPHeaderVisitor.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPHeaderVisitor.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
namespace HttpHeaderUtils {

View File

@ -7,9 +7,9 @@
#include "include/cef_types.h"
#include "gfx/rect.h"
#include "printing/page_range.h"
#include "printing/page_setup.h"
#include "ui/gfx/rect.h"
typedef struct HDC__* HDC;
typedef struct _devicemodeW DEVMODE;

View File

@ -8,8 +8,8 @@
#include "include/cef.h"
#include "net/base/upload_data.h"
#include "net/http/http_request_headers.h"
#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebHTTPBody.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
namespace net {
class URLRequest;

View File

@ -7,8 +7,8 @@
#include "base/logging.h"
#include "http_header_utils.h"
#include "third_party/WebKit/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h"
CefResponseImpl::CefResponseImpl(const WebKit::WebURLResponse &response)
{

View File

@ -174,7 +174,7 @@ private:
}
void Resolve(const GURL& url) {
AutoLock locked(lock_);
base::AutoLock locked(lock_);
if (!owner_ || !owner_loop_)
return;
@ -205,7 +205,7 @@ private:
void Cancel() {
owner_->handler_->Cancel();
AutoLock locked(lock_);
base::AutoLock locked(lock_);
owner_ = NULL;
owner_loop_ = NULL;
}
@ -218,7 +218,7 @@ private:
CefUrlRequestJob* owner_;
Lock lock_;
base::Lock lock_;
MessageLoop* owner_loop_;
};

View File

@ -6,8 +6,8 @@
#include "cef_context.h"
#include "tracker.h"
#include "base/lazy_instance.h"
#include "third_party/WebKit/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScriptController.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h"
// Memory manager.

View File

@ -11,10 +11,10 @@
#include "base/logging.h"
#include "base/scoped_ptr.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLError.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLLoaderClient.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebURLResponse.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLError.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLLoaderClient.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebURLResponse.h"
#include "webkit/glue/weburlloader_impl.h"
using WebKit::WebURLError;

View File

@ -6,7 +6,7 @@
#define _WEBVIEW_HOST_H
#include "base/basictypes.h"
#include "gfx/native_widget_types.h"
#include "ui/gfx/native_widget_types.h"
#include "webwidget_host.h"
#if defined(TOOLKIT_USES_GTK)

View File

@ -8,10 +8,10 @@
#include "browser_webview_delegate.h"
#include "base/logging.h"
#include "gfx/rect.h"
#include "gfx/size.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "webkit/glue/webpreferences.h"
#include "webkit/plugins/npapi/gtk_plugin_container.h"

View File

@ -8,11 +8,11 @@
#include "browser_webview_delegate.h"
#include "browser_webview_mac.h"
#include "gfx/rect.h"
#include "gfx/size.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "webkit/glue/webpreferences.h"
using WebKit::WebDevToolsAgentClient;

View File

@ -5,10 +5,10 @@
#include "webview_host.h"
#include "browser_webview_delegate.h"
#include "app/win/hwnd_util.h"
#include "gfx/rect.h"
#include "gfx/size.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebView.h"
#include "ui/base/win/hwnd_util.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "webkit/glue/webpreferences.h"
using namespace WebKit;
@ -40,7 +40,7 @@ WebViewHost* WebViewHost::Create(HWND parent_view,
WS_CHILD|WS_CLIPCHILDREN|WS_CLIPSIBLINGS, 0, 0,
0, 0, parent_view, NULL,
GetModuleHandle(NULL), NULL);
app::win::SetWindowUserData(host->view_, host);
ui::SetWindowUserData(host->view_, host);
#if defined(WEBKIT_HAS_WEB_AUTO_FILL_CLIENT)
host->webwidget_ = WebView::create(delegate, dev_tools_client, NULL);

12
libcef/webwidget_host.cc Normal file
View File

@ -0,0 +1,12 @@
// Copyright (c) 2011 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 "webwidget_host.h"
#include "base/message_loop.h"
void WebWidgetHost::ScheduleAnimation() {
MessageLoop::current()->PostDelayedTask(FROM_HERE,
factory_.NewRunnableMethod(&WebWidgetHost::ScheduleComposite), 10);
}

View File

@ -8,10 +8,11 @@
#include "include/cef_string.h"
#include "base/basictypes.h"
#include "base/scoped_ptr.h"
#include "gfx/native_widget_types.h"
#include "gfx/rect.h"
#include "base/task.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "ui/gfx/native_widget_types.h"
#include "ui/gfx/rect.h"
namespace gfx {
class Rect;
@ -52,6 +53,7 @@ class WebWidgetHost {
void DidInvalidateRect(const gfx::Rect& rect);
void DidScrollRect(int dx, int dy, const gfx::Rect& clip_rect);
void ScheduleComposite();
void ScheduleAnimation();
#if defined(OS_WIN)
void SetCursor(HCURSOR cursor);
#endif
@ -166,6 +168,9 @@ class WebWidgetHost {
#ifndef NDEBUG
bool painting_;
#endif
private:
ScopedRunnableMethodFactory<WebWidgetHost> factory_;
};
#endif // _WEBWIDGET_HOST_H

View File

@ -13,12 +13,12 @@
#include "skia/ext/bitmap_platform_device.h"
#include "skia/ext/platform_canvas.h"
#include "skia/ext/platform_device.h"
#include "third_party/WebKit/WebKit/chromium/public/gtk/WebInputEventFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/x11/WebScreenInfoFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/gtk/WebInputEventFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/x11/WebScreenInfoFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
using WebKit::WebInputEventFactory;
using WebKit::WebKeyboardEvent;
@ -334,7 +334,8 @@ WebWidgetHost::WebWidgetHost()
webwidget_(NULL),
popup_(false),
scroll_dx_(0),
scroll_dy_(0) {
scroll_dy_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) {
set_painting(false);
}
@ -371,6 +372,8 @@ void WebWidgetHost::Paint() {
}
}
webwidget_->animate();
// This may result in more invalidation
webwidget_->layout();

View File

@ -7,15 +7,15 @@
#include "webwidget_host.h"
#include "base/logging.h"
#include "gfx/rect.h"
#include "gfx/size.h"
#include "skia/ext/platform_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/mac/WebInputEventFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/mac/WebScreenInfoFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebInputEventFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/mac/WebScreenInfoFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "ui/gfx/rect.h"
#include "ui/gfx/size.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebInputEvent;
@ -142,7 +142,8 @@ WebWidgetHost::WebWidgetHost()
webwidget_(NULL),
popup_(false),
scroll_dx_(0),
scroll_dy_(0) {
scroll_dy_(0),
ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) {
set_painting(false);
}
@ -173,6 +174,8 @@ void WebWidgetHost::Paint() {
[NSGraphicsContext graphicsContextWithGraphicsPort:bitmap_context
flipped:YES]];
webwidget_->animate();
// This may result in more invalidation
webwidget_->layout();

View File

@ -5,15 +5,15 @@
#include "webwidget_host.h"
#include "app/win/hwnd_util.h"
#include "gfx/rect.h"
#include "ui/gfx/rect.h"
#include "base/logging.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/WebKit/chromium/public/win/WebInputEventFactory.h"
#include "third_party/WebKit/WebKit/chromium/public/win/WebScreenInfoFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebScreenInfo.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/WebSize.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebInputEventFactory.h"
#include "third_party/WebKit/Source/WebKit/chromium/public/win/WebScreenInfoFactory.h"
#include "ui/base/win/hwnd_util.h"
#include <commctrl.h>
@ -54,7 +54,7 @@ WebWidgetHost* WebWidgetHost::Create(HWND parent_view,
0, 0, 0, 0,
parent_view, NULL, GetModuleHandle(NULL), NULL);
app::win::SetWindowUserData(host->view_, host);
ui::SetWindowUserData(host->view_, host);
host->webwidget_ = WebPopupMenu::create(client);
@ -63,7 +63,7 @@ WebWidgetHost* WebWidgetHost::Create(HWND parent_view,
/*static*/
static WebWidgetHost* FromWindow(HWND view) {
return reinterpret_cast<WebWidgetHost*>(app::win::GetWindowUserData(view));
return reinterpret_cast<WebWidgetHost*>(ui::GetWindowUserData(view));
}
/*static*/
@ -218,12 +218,13 @@ WebWidgetHost::WebWidgetHost()
scroll_dx_(0),
scroll_dy_(0),
tooltip_view_(NULL),
tooltip_showing_(false) {
tooltip_showing_(false),
ALLOW_THIS_IN_INITIALIZER_LIST(factory_(this)) {
set_painting(false);
}
WebWidgetHost::~WebWidgetHost() {
app::win::SetWindowUserData(view_, 0);
ui::SetWindowUserData(view_, 0);
TrackMouseLeave(false);
ResetTooltip();
@ -259,6 +260,8 @@ void WebWidgetHost::Paint() {
paint_rect_.width(), paint_rect_.height(), true));
}
webwidget_->animate();
// This may result in more invalidation
webwidget_->layout();

View File

@ -14,6 +14,7 @@
#include "cpptoc/stream_reader_cpptoc.h"
#include "cpptoc/stream_writer_cpptoc.h"
#include "cpptoc/v8value_cpptoc.h"
#include "cpptoc/web_urlrequest_cpptoc.h"
#include "cpptoc/xml_reader_cpptoc.h"
#include "cpptoc/zip_reader_cpptoc.h"
#include "ctocpp/download_handler_ctocpp.h"
@ -23,6 +24,7 @@
#include "ctocpp/scheme_handler_factory_ctocpp.h"
#include "ctocpp/task_ctocpp.h"
#include "ctocpp/v8handler_ctocpp.h"
#include "ctocpp/web_urlrequest_client_ctocpp.h"
#include "ctocpp/write_handler_ctocpp.h"
#include "base/string_split.h"
@ -61,6 +63,7 @@ CEF_EXPORT void cef_shutdown()
DCHECK(CefStreamReaderCppToC::DebugObjCt == 0);
DCHECK(CefStreamWriterCppToC::DebugObjCt == 0);
DCHECK(CefV8ValueCppToC::DebugObjCt == 0);
DCHECK(CefWebURLRequestCppToC::DebugObjCt == 0);
DCHECK(CefXmlReaderCppToC::DebugObjCt == 0);
DCHECK(CefZipReaderCppToC::DebugObjCt == 0);
DCHECK(CefDownloadHandlerCToCpp::DebugObjCt == 0);
@ -68,6 +71,7 @@ CEF_EXPORT void cef_shutdown()
DCHECK(CefSchemeHandlerCToCpp::DebugObjCt == 0);
DCHECK(CefSchemeHandlerFactoryCToCpp::DebugObjCt == 0);
DCHECK(CefV8HandlerCToCpp::DebugObjCt == 0);
DCHECK(CefWebURLRequestClientCToCpp::DebugObjCt == 0);
DCHECK(CefWriteHandlerCToCpp::DebugObjCt == 0);
// TODO: This breakpoint may be hit if content is still loading when CEF
@ -101,52 +105,8 @@ CEF_EXPORT int cef_register_extension(const cef_string_t* extension_name,
CEF_EXPORT int cef_register_plugin(const cef_plugin_info_t* plugin_info)
{
CefPluginInfo pluginInfo;
pluginInfo.unique_name.FromString(plugin_info->unique_name.str,
plugin_info->unique_name.length, true);
pluginInfo.display_name.FromString(plugin_info->display_name.str,
plugin_info->display_name.length, true);
pluginInfo.version.FromString(plugin_info->version.str,
plugin_info->version.length, true);
pluginInfo.description.FromString(plugin_info->description.str,
plugin_info->description.length, true);
typedef std::vector<std::string> VectorType;
VectorType mime_types, file_extensions, descriptions, file_extensions_parts;
base::SplitString(CefString(&plugin_info->mime_types), '|',
&mime_types);
base::SplitString(CefString(&plugin_info->file_extensions), '|',
&file_extensions);
base::SplitString(CefString(&plugin_info->type_descriptions), '|',
&descriptions);
for (size_t i = 0; i < mime_types.size(); ++i) {
CefPluginMimeType mimeType;
mimeType.mime_type = mime_types[i];
if (file_extensions.size() > i) {
base::SplitString(file_extensions[i], ',', &file_extensions_parts);
VectorType::const_iterator it = file_extensions_parts.begin();
for(; it != file_extensions_parts.end(); ++it)
mimeType.file_extensions.push_back(*(it));
file_extensions_parts.clear();
}
if (descriptions.size() > i)
mimeType.description = descriptions[i];
pluginInfo.mime_types.push_back(mimeType);
}
#if !defined(OS_POSIX) || defined(OS_MACOSX)
pluginInfo.np_getentrypoints = plugin_info->np_getentrypoints;
#endif
pluginInfo.np_initialize = plugin_info->np_initialize;
pluginInfo.np_shutdown = plugin_info->np_shutdown;
return CefRegisterPlugin(pluginInfo);
DCHECK(plugin_info);
return CefRegisterPlugin(*plugin_info);
}
CEF_EXPORT int cef_register_scheme(const cef_string_t* scheme_name,

View File

@ -13,6 +13,7 @@
#include "libcef_dll/cpptoc/scheme_handler_factory_cpptoc.h"
#include "libcef_dll/cpptoc/task_cpptoc.h"
#include "libcef_dll/cpptoc/v8handler_cpptoc.h"
#include "libcef_dll/cpptoc/web_urlrequest_client_cpptoc.h"
#include "libcef_dll/cpptoc/write_handler_cpptoc.h"
#include "libcef_dll/ctocpp/browser_ctocpp.h"
#include "libcef_dll/ctocpp/post_data_ctocpp.h"
@ -21,6 +22,7 @@
#include "libcef_dll/ctocpp/stream_reader_ctocpp.h"
#include "libcef_dll/ctocpp/stream_writer_ctocpp.h"
#include "libcef_dll/ctocpp/v8value_ctocpp.h"
#include "libcef_dll/ctocpp/web_urlrequest_ctocpp.h"
#include "libcef_dll/ctocpp/xml_reader_ctocpp.h"
#include "libcef_dll/ctocpp/zip_reader_ctocpp.h"
@ -42,6 +44,7 @@ void CefShutdown()
DCHECK(CefSchemeHandlerCppToC::DebugObjCt == 0);
DCHECK(CefSchemeHandlerFactoryCppToC::DebugObjCt == 0);
DCHECK(CefV8HandlerCppToC::DebugObjCt == 0);
DCHECK(CefWebURLRequestClientCppToC::DebugObjCt == 0);
DCHECK(CefWriteHandlerCppToC::DebugObjCt == 0);
DCHECK(CefBrowserCToCpp::DebugObjCt == 0);
DCHECK(CefRequestCToCpp::DebugObjCt == 0);
@ -50,6 +53,7 @@ void CefShutdown()
DCHECK(CefStreamReaderCToCpp::DebugObjCt == 0);
DCHECK(CefStreamWriterCToCpp::DebugObjCt == 0);
DCHECK(CefV8ValueCToCpp::DebugObjCt == 0);
DCHECK(CefWebURLRequestCToCpp::DebugObjCt == 0);
DCHECK(CefXmlReaderCToCpp::DebugObjCt == 0);
DCHECK(CefZipReaderCToCpp::DebugObjCt == 0);
@ -74,65 +78,9 @@ bool CefRegisterExtension(const CefString& extension_name,
true:false;
}
bool CefRegisterPlugin(const struct CefPluginInfo& plugin_info)
bool CefRegisterPlugin(const CefPluginInfo& plugin_info)
{
cef_plugin_info_t pluginInfo;
memset(&pluginInfo, 0, sizeof(pluginInfo));
cef_string_set(plugin_info.unique_name.c_str(),
plugin_info.unique_name.length(),
&pluginInfo.unique_name, false);
cef_string_set(plugin_info.display_name.c_str(),
plugin_info.display_name.length(),
&pluginInfo.display_name, false);
cef_string_set(plugin_info.version.c_str(),
plugin_info.version.length(),
&pluginInfo.version, false);
cef_string_set(plugin_info.description.c_str(),
plugin_info.description.length(),
&pluginInfo.description, false);
std::string mimeTypes, fileExtensions, typeDescriptions;
for(size_t i = 0; i < plugin_info.mime_types.size(); ++i) {
if(i > 0) {
mimeTypes += "|";
fileExtensions += "|";
typeDescriptions += "|";
}
mimeTypes += plugin_info.mime_types[i].mime_type;
typeDescriptions += plugin_info.mime_types[i].description;
for(size_t j = 0;
j < plugin_info.mime_types[i].file_extensions.size(); ++j) {
if(j > 0) {
fileExtensions += ",";
}
fileExtensions += plugin_info.mime_types[i].file_extensions[j];
}
}
cef_string_from_utf8(mimeTypes.c_str(), mimeTypes.length(),
&pluginInfo.mime_types);
cef_string_from_utf8(fileExtensions.c_str(), fileExtensions.length(),
&pluginInfo.file_extensions);
cef_string_from_utf8(typeDescriptions.c_str(), typeDescriptions.length(),
&pluginInfo.type_descriptions);
#if !defined(OS_POSIX) || defined(OS_MACOSX)
pluginInfo.np_getentrypoints = plugin_info.np_getentrypoints;
#endif
pluginInfo.np_initialize = plugin_info.np_initialize;
pluginInfo.np_shutdown = plugin_info.np_shutdown;
bool ret = cef_register_plugin(&pluginInfo) ? true : false;
cef_string_clear(&pluginInfo.mime_types);
cef_string_clear(&pluginInfo.file_extensions);
cef_string_clear(&pluginInfo.type_descriptions);
return ret;
return cef_register_plugin(&plugin_info)?true:false;
}
bool CefRegisterScheme(const CefString& scheme_name,

View File

@ -9,15 +9,10 @@ void InitPluginTest()
{
// Structure providing information about the client plugin.
CefPluginInfo plugin_info;
plugin_info.display_name = "Client Plugin";
plugin_info.unique_name = "client_plugin";
plugin_info.version = "1, 0, 0, 1";
plugin_info.description = "My Example Client Plugin";
CefPluginMimeType mime_type;
mime_type.mime_type = "application/x-client-plugin";
mime_type.file_extensions.push_back("*");
plugin_info.mime_types.push_back(mime_type);
CefString(&plugin_info.display_name).FromASCII("Client Plugin");
CefString(&plugin_info.unique_name).FromASCII("client_plugin");
CefString(&plugin_info.description).FromASCII("My Example Client Plugin");
CefString(&plugin_info.mime_type).FromASCII("application/x-client-plugin");
plugin_info.np_getentrypoints = NP_GetEntryPoints;
plugin_info.np_initialize = NP_Initialize;

View File

@ -58,15 +58,10 @@ void InitUIPluginTest()
{
// Structure providing information about the client plugin.
CefPluginInfo plugin_info;
plugin_info.display_name = "Client UI Plugin";
plugin_info.unique_name = "client_ui_plugin";
plugin_info.version = "1, 0, 0, 1";
plugin_info.description = "My Example Client UI Plugin";
CefPluginMimeType mime_type;
mime_type.mime_type = "application/x-client-ui-plugin";
mime_type.file_extensions.push_back("*");
plugin_info.mime_types.push_back(mime_type);
CefString(&plugin_info.display_name).FromASCII("Client UI Plugin");
CefString(&plugin_info.unique_name).FromASCII("client_ui_plugin");
CefString(&plugin_info.description).FromASCII("My Example Client UI Plugin");
CefString(&plugin_info.mime_type).FromASCII("application/x-client-ui-plugin");
plugin_info.np_getentrypoints = NP_UIGetEntryPoints;
plugin_info.np_initialize = NP_UIInitialize;