- Update to Chromium revision 70742.

- Fix crash when calling CefInitialize with extra_plugins_paths specified (issue #164).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@159 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2011-01-07 21:34:20 +00:00
parent 874c73b1e1
commit 890200a098
36 changed files with 161 additions and 120 deletions

View File

@ -60,3 +60,4 @@ Date | CEF Revision | Chromium Revision
2010-10-28 | /trunk@129 | /trunk@64233 2010-10-28 | /trunk@129 | /trunk@64233
2010-11-16 | /trunk@138 | /trunk@66269 2010-11-16 | /trunk@138 | /trunk@66269
2010-12-16 | /trunk@152 | /trunk@69409 2010-12-16 | /trunk@152 | /trunk@69409
2010-01-07 | /trunk@159 | /trunk@70742

View File

@ -243,8 +243,6 @@
'../third_party/libxml/libxml.gyp:libxml', '../third_party/libxml/libxml.gyp:libxml',
'../third_party/libxslt/libxslt.gyp:libxslt', '../third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/modp_b64/modp_b64.gyp:modp_b64', '../third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
'../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
'../third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore', '../third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', '../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib', '../third_party/zlib/zlib.gyp:zlib',
@ -444,8 +442,6 @@
'../third_party/libxml/libxml.gyp:libxml', '../third_party/libxml/libxml.gyp:libxml',
'../third_party/libxslt/libxslt.gyp:libxslt', '../third_party/libxslt/libxslt.gyp:libxslt',
'../third_party/modp_b64/modp_b64.gyp:modp_b64', '../third_party/modp_b64/modp_b64.gyp:modp_b64',
'../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:pcre',
'../third_party/WebKit/JavaScriptCore/JavaScriptCore.gyp/JavaScriptCore.gyp:wtf',
'../third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore', '../third_party/WebKit/WebCore/WebCore.gyp/WebCore.gyp:webcore',
'../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit', '../third_party/WebKit/WebKit/chromium/WebKit.gyp:webkit',
'../third_party/zlib/zlib.gyp:zlib', '../third_party/zlib/zlib.gyp:zlib',

View File

@ -8,7 +8,7 @@
#include "base/callback.h" #include "base/callback.h"
#include "base/lock.h" #include "base/lock.h"
#include "base/task.h" #include "base/task.h"
#include "base/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "webkit/appcache/appcache_interceptor.h" #include "webkit/appcache/appcache_interceptor.h"
#include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/appcache/web_application_cache_host_impl.h"
@ -384,7 +384,8 @@ void BrowserAppCacheSystem::InitOnUIThread(const FilePath& cache_directory) {
cache_directory_ = cache_directory; cache_directory_ = cache_directory;
} }
void BrowserAppCacheSystem::InitOnIOThread(URLRequestContext* request_context) { void BrowserAppCacheSystem::InitOnIOThread(
net::URLRequestContext* request_context) {
if (!is_initailized_on_ui_thread()) if (!is_initailized_on_ui_thread())
return; return;

View File

@ -7,21 +7,25 @@
#include "base/file_path.h" #include "base/file_path.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/thread.h" #include "base/threading/thread.h"
#include "webkit/appcache/appcache_backend_impl.h" #include "webkit/appcache/appcache_backend_impl.h"
#include "webkit/appcache/appcache_frontend_impl.h" #include "webkit/appcache/appcache_frontend_impl.h"
#include "webkit/appcache/appcache_service.h" #include "webkit/appcache/appcache_service.h"
#include "webkit/appcache/appcache_thread.h" #include "webkit/appcache/appcache_thread.h"
#include "webkit/glue/resource_type.h" #include "webkit/glue/resource_type.h"
namespace net {
class URLRequest;
class URLRequestContext;
}
namespace WebKit { namespace WebKit {
class WebApplicationCacheHost; class WebApplicationCacheHost;
class WebApplicationCacheHostClient; class WebApplicationCacheHostClient;
} }
class BrowserBackendProxy; class BrowserBackendProxy;
class BrowserFrontendProxy; class BrowserFrontendProxy;
class net::URLRequest;
class URLRequestContext;
// A class that composes the constituent parts of an appcache system // A class that composes the constituent parts of an appcache system
// together for use in a single process with two relavant threads, // together for use in a single process with two relavant threads,
@ -46,7 +50,7 @@ class BrowserAppCacheSystem {
// at a time, but after IO thread termination a new one can be // at a time, but after IO thread termination a new one can be
// started on which this method should be called. The instance // started on which this method should be called. The instance
// is assumed to outlive the IO thread. // is assumed to outlive the IO thread.
static void InitializeOnIOThread(URLRequestContext* request_context) { static void InitializeOnIOThread(net::URLRequestContext* request_context) {
if (instance_) if (instance_)
instance_->InitOnIOThread(request_context); instance_->InitOnIOThread(request_context);
} }
@ -112,7 +116,7 @@ class BrowserAppCacheSystem {
// Instance methods called by our static public methods // Instance methods called by our static public methods
void InitOnUIThread(const FilePath& cache_directory); void InitOnUIThread(const FilePath& cache_directory);
void InitOnIOThread(URLRequestContext* request_context); void InitOnIOThread(net::URLRequestContext* request_context);
void CleanupIOThread(); void CleanupIOThread();
WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit( WebKit::WebApplicationCacheHost* CreateCacheHostForWebKit(
WebKit::WebApplicationCacheHostClient* client); WebKit::WebApplicationCacheHostClient* client);

View File

@ -7,6 +7,7 @@
#include "base/auto_reset.h" #include "base/auto_reset.h"
#include "base/file_util.h" #include "base/file_util.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/threading/platform_thread.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "third_party/sqlite/sqlite3.h" #include "third_party/sqlite/sqlite3.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h" #include "third_party/WebKit/WebKit/chromium/public/WebDatabase.h"
@ -66,7 +67,7 @@ int BrowserDatabaseSystem::DeleteFile(
error_code = VfsBackend::DeleteFile(file_name, sync_dir); error_code = VfsBackend::DeleteFile(file_name, sync_dir);
} while ((++num_retries < kNumDeleteRetries) && } while ((++num_retries < kNumDeleteRetries) &&
(error_code == SQLITE_IOERR_DELETE) && (error_code == SQLITE_IOERR_DELETE) &&
(PlatformThread::Sleep(10), 1)); (base::PlatformThread::Sleep(10), 1));
return error_code; return error_code;
} }

View File

@ -9,8 +9,9 @@
#include "base/weak_ptr.h" #include "base/weak_ptr.h"
#include "webkit/fileapi/webfilewriter_base.h" #include "webkit/fileapi/webfilewriter_base.h"
namespace net {
class URLRequestContext; class URLRequestContext;
}
// An implementation of WebFileWriter for use in test_shell and DRT. // An implementation of WebFileWriter for use in test_shell and DRT.
class BrowserFileWriter : public fileapi::WebFileWriterBase, class BrowserFileWriter : public fileapi::WebFileWriterBase,
@ -21,7 +22,7 @@ class BrowserFileWriter : public fileapi::WebFileWriterBase,
virtual ~BrowserFileWriter(); virtual ~BrowserFileWriter();
// Called by CefProcessIOThread when the thread is created and destroyed. // Called by CefProcessIOThread when the thread is created and destroyed.
static void InitializeOnIOThread(URLRequestContext* request_context) { static void InitializeOnIOThread(net::URLRequestContext* request_context) {
request_context_ = request_context; request_context_ = request_context;
} }
static void CleanupOnIOThread() { static void CleanupOnIOThread() {
@ -38,7 +39,7 @@ class BrowserFileWriter : public fileapi::WebFileWriterBase,
private: private:
class IOThreadProxy; class IOThreadProxy;
scoped_refptr<IOThreadProxy> io_thread_proxy_; scoped_refptr<IOThreadProxy> io_thread_proxy_;
static URLRequestContext* request_context_; static net::URLRequestContext* request_context_;
}; };
#endif // BROWSER_FILE_WRITER_H_ #endif // BROWSER_FILE_WRITER_H_

View File

@ -9,8 +9,8 @@
#include "request_impl.h" #include "request_impl.h"
#include "stream_impl.h" #include "stream_impl.h"
#include "base/synchronization/waitable_event.h"
#include "base/utf_string_conversions.h" #include "base/utf_string_conversions.h"
#include "base/waitable_event.h"
#include "third_party/WebKit/WebKit/chromium/public/WebDocument.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/WebFrame.h"
#include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h" #include "third_party/WebKit/WebKit/chromium/public/WebHTTPBody.h"
@ -24,8 +24,8 @@
#include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h" #include "third_party/WebKit/WebKit/chromium/public/WebURLRequest.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/glue_serialize.h" #include "webkit/glue/glue_serialize.h"
#include "webkit/glue/plugins/webplugin_delegate.h" #include "webkit/plugins/npapi/webplugin_delegate.h"
#include "webkit/glue/plugins/webplugin_impl.h" #include "webkit/plugins/npapi/webplugin_impl.h"
#include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkit_glue.h"
using WebKit::WebDocument; using WebKit::WebDocument;
@ -987,8 +987,8 @@ void CefBrowserImpl::UIT_Find(int identifier, const CefString& search_text,
if (main_frame->document().isPluginDocument()) { if (main_frame->document().isPluginDocument()) {
WebPlugin* plugin = main_frame->document().to<WebPluginDocument>().plugin(); WebPlugin* plugin = main_frame->document().to<WebPluginDocument>().plugin();
webkit_glue::WebPluginDelegate* delegate = webkit::npapi::WebPluginDelegate* delegate =
static_cast<webkit_glue::WebPluginImpl*>(plugin)->delegate(); static_cast<webkit::npapi::WebPluginImpl*>(plugin)->delegate();
if (options.findNext) { if (options.findNext) {
// Just navigate back/forward. // Just navigate back/forward.
delegate->SelectFindResult(options.forward); delegate->SelectFindResult(options.forward);
@ -1109,8 +1109,8 @@ void CefBrowserImpl::UIT_StopFinding(bool clear_selection)
if (doc.isPluginDocument()) { if (doc.isPluginDocument()) {
WebPlugin* plugin = view->mainFrame()->document(). WebPlugin* plugin = view->mainFrame()->document().
to<WebPluginDocument>().plugin(); to<WebPluginDocument>().plugin();
webkit_glue::WebPluginDelegate* delegate = webkit::npapi::WebPluginDelegate* delegate =
static_cast<webkit_glue::WebPluginImpl*>(plugin)->delegate(); static_cast<webkit::npapi::WebPluginImpl*>(plugin)->delegate();
delegate->StopFind(); delegate->StopFind();
return; return;
} }

View File

@ -8,7 +8,7 @@
#include "browser_settings.h" #include "browser_settings.h"
#include "printing/units.h" #include "printing/units.h"
#include "base/win_util.h" #include "app/win/hwnd_util.h"
#include "skia/ext/vector_canvas.h" #include "skia/ext/vector_canvas.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrame.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/WebRect.h"
@ -34,7 +34,7 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
WPARAM wParam, LPARAM lParam) WPARAM wParam, LPARAM lParam)
{ {
CefBrowserImpl* browser = CefBrowserImpl* browser =
static_cast<CefBrowserImpl*>(win_util::GetWindowUserData(hwnd)); static_cast<CefBrowserImpl*>(app::win::GetWindowUserData(hwnd));
switch (message) { switch (message) {
case WM_COMMAND: case WM_COMMAND:
@ -49,7 +49,7 @@ LRESULT CALLBACK CefBrowserImpl::WndProc(HWND hwnd, UINT message,
case WM_DESTROY: case WM_DESTROY:
if (browser) { if (browser) {
// Clear the user data pointer. // Clear the user data pointer.
win_util::SetWindowUserData(hwnd, NULL); app::win::SetWindowUserData(hwnd, NULL);
// Destroy the browser. // Destroy the browser.
browser->UIT_DestroyBrowser(); 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 // Set window user data to this object for future reference from the window
// procedure // procedure
win_util::SetWindowUserData(window_info_.m_hWnd, this); app::win::SetWindowUserData(window_info_.m_hWnd, this);
// Add a reference that will be released in UIT_DestroyBrowser(). // Add a reference that will be released in UIT_DestroyBrowser().
AddRef(); AddRef();

View File

@ -8,6 +8,7 @@
#include "build/build_config.h" #include "build/build_config.h"
#include "base/file_path.h" #include "base/file_path.h"
#include "net/base/cert_verifier.h"
#include "net/base/cookie_monster.h" #include "net/base/cookie_monster.h"
#include "net/base/host_resolver.h" #include "net/base/host_resolver.h"
#include "net/base/ssl_config_service.h" #include "net/base/ssl_config_service.h"
@ -99,6 +100,7 @@ void BrowserRequestContext::Init(
host_resolver_ = host_resolver_ =
net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism, net::CreateSystemHostResolver(net::HostResolver::kDefaultParallelism,
NULL, NULL); NULL, NULL);
cert_verifier_ = new net::CertVerifier;
ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService(); ssl_config_service_ = net::SSLConfigService::CreateSystemSSLConfigService();
http_auth_handler_factory_ = http_auth_handler_factory_ =
@ -109,9 +111,9 @@ void BrowserRequestContext::Init(
cache_path, 0, BrowserResourceLoaderBridge::GetCacheThread()); cache_path, 0, BrowserResourceLoaderBridge::GetCacheThread());
net::HttpCache* cache = net::HttpCache* cache =
new net::HttpCache(host_resolver_, NULL, NULL, proxy_service_, new net::HttpCache(host_resolver_, cert_verifier_, NULL, NULL,
ssl_config_service_, http_auth_handler_factory_, NULL, proxy_service_, ssl_config_service_,
NULL, backend); http_auth_handler_factory_, NULL, NULL, backend);
cache->set_mode(cache_mode); cache->set_mode(cache_mode);
http_transaction_factory_ = cache; http_transaction_factory_ = cache;
@ -126,6 +128,7 @@ BrowserRequestContext::~BrowserRequestContext() {
delete http_transaction_factory_; delete http_transaction_factory_;
delete http_auth_handler_factory_; delete http_auth_handler_factory_;
delete static_cast<net::StaticCookiePolicy*>(cookie_policy_); delete static_cast<net::StaticCookiePolicy*>(cookie_policy_);
delete cert_verifier_;
delete host_resolver_; delete host_resolver_;
} }

View File

@ -52,8 +52,8 @@
#include "base/ref_counted.h" #include "base/ref_counted.h"
#include "base/time.h" #include "base/time.h"
#include "base/timer.h" #include "base/timer.h"
#include "base/thread.h" #include "base/threading/thread.h"
#include "base/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "net/base/auth.h" #include "net/base/auth.h"
#include "net/base/cookie_store.h" #include "net/base/cookie_store.h"
#include "net/base/file_stream.h" #include "net/base/file_stream.h"

View File

@ -5,11 +5,13 @@
#ifndef _BROWSER_SOCKET_STREAM_BRIDGE_H #ifndef _BROWSER_SOCKET_STREAM_BRIDGE_H
#define _BROWSER_SOCKET_STREAM_BRIDGE_H #define _BROWSER_SOCKET_STREAM_BRIDGE_H
namespace net {
class URLRequestContext; class URLRequestContext;
}
class BrowserSocketStreamBridge { class BrowserSocketStreamBridge {
public: public:
static void InitializeOnIOThread(URLRequestContext* request_context); static void InitializeOnIOThread(net::URLRequestContext* request_context);
static void Cleanup(); static void Cleanup();
}; };

View File

@ -14,7 +14,7 @@ MSVC_POP_WARNING();
#undef LOG #undef LOG
#include "base/string_util.h" #include "base/string_util.h"
#include "net/base/mime_util.h" #include "net/base/mime_util.h"
#include "webkit/glue/plugins/plugin_list.h" #include "webkit/plugins/npapi/plugin_list.h"
#include "browser_webkit_glue.h" #include "browser_webkit_glue.h"
@ -64,8 +64,9 @@ bool GetPluginFinderURL(std::string* plugin_finder_url) {
return false; return false;
} }
void GetPlugins(bool refresh, std::vector<WebPluginInfo>* plugins) { void GetPlugins(bool refresh,
NPAPI::PluginList::Singleton()->GetPlugins(refresh, plugins); std::vector<webkit::npapi::WebPluginInfo>* plugins) {
webkit::npapi::PluginList::Singleton()->GetPlugins(refresh, plugins);
} }
bool IsDefaultPluginEnabled() { bool IsDefaultPluginEnabled() {
@ -181,9 +182,9 @@ bool ShouldDownload(const std::string& content_disposition,
return false; return false;
//// Finally, check the plugin list. //// Finally, check the plugin list.
WebPluginInfo info; webkit::npapi::WebPluginInfo info;
bool allow_wildcard = false; bool allow_wildcard = false;
return !NPAPI::PluginList::Singleton()->GetPluginInfo( return !webkit::npapi::PluginList::Singleton()->GetPluginInfo(
GURL(), type, allow_wildcard, &info, NULL) || !info.enabled; GURL(), type, allow_wildcard, &info, NULL) || !info.enabled;
} }

View File

@ -10,10 +10,10 @@
#include "browser_webkit_glue.h" #include "browser_webkit_glue.h"
#undef LOG #undef LOG
#include "base/data_pack.h" #include "app/data_pack.h"
#include "base/file_util.h" #include "base/file_util.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/mac_util.h" #include "base/mac/mac_util.h"
#include "base/path_service.h" #include "base/path_service.h"
#include "grit/webkit_resources.h" #include "grit/webkit_resources.h"
#include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkit_glue.h"
@ -21,14 +21,14 @@
namespace webkit_glue { namespace webkit_glue {
// Data pack resource. This is a pointer to the mmapped resources file. // Data pack resource. This is a pointer to the mmapped resources file.
static base::DataPack* g_resource_data_pack = NULL; static app::DataPack* g_resource_data_pack = NULL;
void InitializeDataPak() { void InitializeDataPak() {
// mmap the data pack which holds strings used by WebCore. // mmap the data pack which holds strings used by WebCore.
// TODO(port): Allow the embedder to customize the pak name. // TODO(port): Allow the embedder to customize the pak name.
g_resource_data_pack = new base::DataPack; g_resource_data_pack = new app::DataPack;
NSString *resource_path = NSString *resource_path =
[mac_util::MainAppBundle() pathForResource:@"cefclient" ofType:@"pak"]; [base::mac::MainAppBundle() pathForResource:@"cefclient" ofType:@"pak"];
FilePath resources_pak_path([resource_path fileSystemRepresentation]); FilePath resources_pak_path([resource_path fileSystemRepresentation]);
if (!g_resource_data_pack->Load(resources_pak_path)) if (!g_resource_data_pack->Load(resources_pak_path))
LOG(FATAL) << "failed to load cefclient.pak"; LOG(FATAL) << "failed to load cefclient.pak";
@ -38,7 +38,7 @@ void InitializeDataPak() {
FilePath GetResourcesFilePath() { FilePath GetResourcesFilePath() {
FilePath path; FilePath path;
// We need to know if we're bundled or not to know which path to use. // We need to know if we're bundled or not to know which path to use.
if (mac_util::AmIBundled()) { if (base::mac::AmIBundled()) {
PathService::Get(base::DIR_EXE, &path); PathService::Get(base::DIR_EXE, &path);
path = path.Append(FilePath::kParentDirectory); path = path.Append(FilePath::kParentDirectory);
return path.AppendASCII("Resources"); return path.AppendASCII("Resources");

View File

@ -55,18 +55,15 @@
#include "third_party/WebKit/WebKit/chromium/public/WebWindowFeatures.h" #include "third_party/WebKit/WebKit/chromium/public/WebWindowFeatures.h"
#include "webkit/appcache/web_application_cache_host_impl.h" #include "webkit/appcache/web_application_cache_host_impl.h"
#include "webkit/glue/glue_serialize.h" #include "webkit/glue/glue_serialize.h"
#include "webkit/glue/media/buffered_data_source.h"
#include "webkit/glue/media/media_resource_loader_bridge_factory.h"
#include "webkit/glue/media/simple_data_source.h"
#include "webkit/glue/media/video_renderer_impl.h" #include "webkit/glue/media/video_renderer_impl.h"
#include "webkit/glue/webdropdata.h" #include "webkit/glue/webdropdata.h"
#include "webkit/glue/plugins/webplugin_impl.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"
#include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkit_glue.h"
#include "webkit/glue/plugins/plugin_list.h"
#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#include "webkit/glue/webmediaplayer_impl.h" #include "webkit/glue/webmediaplayer_impl.h"
#include "webkit/glue/window_open_disposition.h" #include "webkit/glue/window_open_disposition.h"
#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" #include "browser_webkit_glue.h"
#if defined(OS_WIN) #if defined(OS_WIN)
@ -536,15 +533,15 @@ WebScreenInfo BrowserWebViewDelegate::screenInfo() {
WebPlugin* BrowserWebViewDelegate::createPlugin( WebPlugin* BrowserWebViewDelegate::createPlugin(
WebFrame* frame, const WebPluginParams& params) { WebFrame* frame, const WebPluginParams& params) {
bool allow_wildcard = true; bool allow_wildcard = true;
WebPluginInfo info; webkit::npapi::WebPluginInfo info;
std::string actual_mime_type; std::string actual_mime_type;
if (!NPAPI::PluginList::Singleton()->GetPluginInfo( if (!webkit::npapi::PluginList::Singleton()->GetPluginInfo(
params.url, params.mimeType.utf8(), allow_wildcard, &info, params.url, params.mimeType.utf8(), allow_wildcard, &info,
&actual_mime_type)) { &actual_mime_type)) {
return NULL; return NULL;
} }
return new webkit_glue::WebPluginImpl( return new webkit::npapi::WebPluginImpl(
frame, params, info.path, actual_mime_type, AsWeakPtr()); frame, params, info.path, actual_mime_type, AsWeakPtr());
} }
@ -558,10 +555,6 @@ WebMediaPlayer* BrowserWebViewDelegate::createMediaPlayer(
scoped_ptr<media::FilterCollection> collection( scoped_ptr<media::FilterCollection> collection(
new media::FilterCollection()); new media::FilterCollection());
// TODO(annacc): do we still need appcache_host? http://crbug.com/65135
// appcache::WebApplicationCacheHostImpl* appcache_host =
// appcache::WebApplicationCacheHostImpl::FromFrame(frame);
scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer( scoped_refptr<webkit_glue::VideoRendererImpl> video_renderer(
new webkit_glue::VideoRendererImpl(false)); new webkit_glue::VideoRendererImpl(false));
collection->AddVideoRenderer(video_renderer); collection->AddVideoRenderer(video_renderer);

View File

@ -10,33 +10,35 @@
#ifndef _BROWSER_WEBVIEW_DELEGATE_H #ifndef _BROWSER_WEBVIEW_DELEGATE_H
#define _BROWSER_WEBVIEW_DELEGATE_H #define _BROWSER_WEBVIEW_DELEGATE_H
#include "build/build_config.h"
#include <map> #include <map>
#if defined(OS_LINUX)
#include <gdk/gdkcursor.h>
#endif
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/scoped_ptr.h" #include "base/scoped_ptr.h"
#include "base/weak_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/WebContextMenuData.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFileChooserParams.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/WebFileSystem.h"
#include "third_party/WebKit/WebKit/chromium/public/WebFrameClient.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/WebRect.h"
#include "third_party/WebKit/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) #if defined(OS_MACOSX)
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h" #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenuInfo.h"
#endif #endif
#include "third_party/WebKit/WebKit/chromium/public/WebViewClient.h"
#include "webkit/glue/webcursor.h"
#include "webkit/glue/plugins/webplugin_page_delegate.h"
#if defined(OS_WIN) #if defined(OS_WIN)
#include "browser_drag_delegate.h" #include "browser_drag_delegate.h"
#include "browser_drop_delegate.h" #include "browser_drop_delegate.h"
#endif #endif
#include "browser_navigation_controller.h"
#if defined(TOOLKIT_USES_GTK)
#include <gdk/gdkcursor.h>
#endif
class CefBrowserImpl; class CefBrowserImpl;
class GURL; class GURL;
@ -45,7 +47,7 @@ class FilePath;
class BrowserWebViewDelegate : public WebKit::WebViewClient, class BrowserWebViewDelegate : public WebKit::WebViewClient,
public WebKit::WebFrameClient, public WebKit::WebFrameClient,
public webkit_glue::WebPluginPageDelegate, public webkit::npapi::WebPluginPageDelegate,
public base::SupportsWeakPtr<BrowserWebViewDelegate> { public base::SupportsWeakPtr<BrowserWebViewDelegate> {
public: public:
// WebKit::WebViewClient // WebKit::WebViewClient
@ -181,7 +183,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
WebKit::WebFileSystemCallbacks* callbacks); WebKit::WebFileSystemCallbacks* callbacks);
// webkit_glue::WebPluginPageDelegate // webkit_glue::WebPluginPageDelegate
virtual webkit_glue::WebPluginDelegate* CreatePluginDelegate( virtual webkit::npapi::WebPluginDelegate* CreatePluginDelegate(
const FilePath& file_path, const FilePath& file_path,
const std::string& mime_type); const std::string& mime_type);
virtual void CreatedPluginWindow( virtual void CreatedPluginWindow(
@ -189,7 +191,7 @@ class BrowserWebViewDelegate : public WebKit::WebViewClient,
virtual void WillDestroyPluginWindow( virtual void WillDestroyPluginWindow(
gfx::PluginWindowHandle handle); gfx::PluginWindowHandle handle);
virtual void DidMovePlugin( virtual void DidMovePlugin(
const webkit_glue::WebPluginGeometry& move); const webkit::npapi::WebPluginGeometry& move);
virtual void DidStartLoadingForPlugin() {} virtual void DidStartLoadingForPlugin() {}
virtual void DidStopLoadingForPlugin() {} virtual void DidStopLoadingForPlugin() {}
virtual void ShowModalHTMLDialogForPlugin( virtual void ShowModalHTMLDialogForPlugin(

View File

@ -12,8 +12,8 @@
#include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h" #include "third_party/WebKit/WebKit/chromium/public/WebPopupMenu.h"
#include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webcursor.h" #include "webkit/glue/webcursor.h"
#include "webkit/glue/plugins/plugin_list.h" #include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/glue/plugins/webplugin_delegate_impl.h" #include "webkit/plugins/npapi/webplugin_delegate_impl.h"
#include "webkit/glue/webmenurunner_mac.h" #include "webkit/glue/webmenurunner_mac.h"
using WebKit::WebCursorInfo; using WebKit::WebCursorInfo;
@ -168,7 +168,7 @@ void BrowserWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------ // WebPluginPageDelegate ------------------------------------------------------
webkit_glue::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate( webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
const FilePath& path, const FilePath& path,
const std::string& mime_type) { const std::string& mime_type) {
WebWidgetHost *host = GetWidgetHost(); WebWidgetHost *host = GetWidgetHost();
@ -176,7 +176,8 @@ webkit_glue::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
return NULL; return NULL;
gfx::PluginWindowHandle containing_view = NULL; gfx::PluginWindowHandle containing_view = NULL;
return WebPluginDelegateImpl::Create(path, mime_type, containing_view); return webkit::npapi::WebPluginDelegateImpl::Create(
path, mime_type, containing_view);
} }
void BrowserWebViewDelegate::CreatedPluginWindow( void BrowserWebViewDelegate::CreatedPluginWindow(
@ -188,7 +189,7 @@ void BrowserWebViewDelegate::WillDestroyPluginWindow(
} }
void BrowserWebViewDelegate::DidMovePlugin( void BrowserWebViewDelegate::DidMovePlugin(
const webkit_glue::WebPluginGeometry& move) { const webkit::npapi::WebPluginGeometry& move) {
// TODO(port): add me once plugins work. // TODO(port): add me once plugins work.
} }

View File

@ -31,11 +31,11 @@
#include "third_party/WebKit/WebKit/chromium/public/WebView.h" #include "third_party/WebKit/WebKit/chromium/public/WebView.h"
#include "webkit/glue/webdropdata.h" #include "webkit/glue/webdropdata.h"
#include "webkit/glue/webpreferences.h" #include "webkit/glue/webpreferences.h"
#include "webkit/glue/plugins/webplugin.h"
#include "webkit/glue/webkit_glue.h" #include "webkit/glue/webkit_glue.h"
#include "webkit/glue/plugins/plugin_list.h"
#include "webkit/glue/plugins/webplugin_delegate_impl.h"
#include "webkit/glue/window_open_disposition.h" #include "webkit/glue/window_open_disposition.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "webkit/plugins/npapi/webplugin.h"
#include "webkit/plugins/npapi/webplugin_delegate_impl.h"
using WebKit::WebContextMenuData; using WebKit::WebContextMenuData;
using WebKit::WebCursorInfo; using WebKit::WebCursorInfo;
@ -146,7 +146,7 @@ void BrowserWebViewDelegate::runModal() {
// WebPluginPageDelegate ------------------------------------------------------ // WebPluginPageDelegate ------------------------------------------------------
webkit_glue::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate( webkit::npapi::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
const FilePath& file_path, const FilePath& file_path,
const std::string& mime_type) const std::string& mime_type)
{ {
@ -155,7 +155,7 @@ webkit_glue::WebPluginDelegate* BrowserWebViewDelegate::CreatePluginDelegate(
if (!hwnd) if (!hwnd)
return NULL; return NULL;
return WebPluginDelegateImpl::Create(file_path, mime_type, hwnd); return webkit::npapi::WebPluginDelegateImpl::Create(file_path, mime_type, hwnd);
} }
void BrowserWebViewDelegate::CreatedPluginWindow( void BrowserWebViewDelegate::CreatedPluginWindow(
@ -169,7 +169,7 @@ void BrowserWebViewDelegate::WillDestroyPluginWindow(
} }
void BrowserWebViewDelegate::DidMovePlugin( void BrowserWebViewDelegate::DidMovePlugin(
const webkit_glue::WebPluginGeometry& move) { const webkit::npapi::WebPluginGeometry& move) {
unsigned long flags = 0; unsigned long flags = 0;
if (move.rects_valid) { if (move.rects_valid) {

View File

@ -13,7 +13,7 @@
#if defined(OS_MACOSX) || defined(OS_WIN) #if defined(OS_MACOSX) || defined(OS_WIN)
#include "base/nss_util.h" #include "base/nss_util.h"
#endif #endif
#include "webkit/glue/plugins/plugin_list.h" #include "webkit/plugins/npapi/plugin_list.h"
// Global CefContext pointer // Global CefContext pointer
CefRefPtr<CefContext> _Context; CefRefPtr<CefContext> _Context;
@ -80,7 +80,7 @@ static void UIT_RegisterPlugin(struct CefPluginInfo* plugin_info)
{ {
REQUIRE_UIT(); REQUIRE_UIT();
NPAPI::PluginVersionInfo info; webkit::npapi::PluginVersionInfo info;
info.path = FilePath(plugin_info->unique_name); info.path = FilePath(plugin_info->unique_name);
info.product_name = plugin_info->display_name; info.product_name = plugin_info->display_name;
@ -112,7 +112,7 @@ static void UIT_RegisterPlugin(struct CefPluginInfo* plugin_info)
info.entry_points.np_initialize = plugin_info->np_initialize; info.entry_points.np_initialize = plugin_info->np_initialize;
info.entry_points.np_shutdown = plugin_info->np_shutdown; info.entry_points.np_shutdown = plugin_info->np_shutdown;
NPAPI::PluginList::Singleton()->RegisterInternalPlugin(info); webkit::npapi::PluginList::Singleton()->RegisterInternalPlugin(info);
delete plugin_info; delete plugin_info;
} }

View File

@ -8,8 +8,8 @@
#include "cef_process_sub_thread.h" #include "cef_process_sub_thread.h"
#include "cef_process_ui_thread.h" #include "cef_process_ui_thread.h"
#include "base/thread.h" #include "base/synchronization/waitable_event.h"
#include "base/waitable_event.h" #include "base/threading/thread.h"
CefProcess* g_cef_process = NULL; CefProcess* g_cef_process = NULL;

View File

@ -16,9 +16,9 @@
#include "base/basictypes.h" #include "base/basictypes.h"
#include "base/message_loop.h" #include "base/message_loop.h"
#include "base/non_thread_safe.h"
#include "base/ref_counted.h" #include "base/ref_counted.h"
#include "base/scoped_ptr.h" #include "base/scoped_ptr.h"
#include "base/threading/non_thread_safe.h"
#include "ipc/ipc_message.h" #include "ipc/ipc_message.h"
namespace base { namespace base {
@ -32,7 +32,8 @@ class CefMessageLoopForUI;
// NOT THREAD SAFE, call only from the main thread. // NOT THREAD SAFE, call only from the main thread.
// These functions shouldn't return NULL unless otherwise noted. // These functions shouldn't return NULL unless otherwise noted.
class CefProcess : public base::RefCounted<CefProcess>, public NonThreadSafe { class CefProcess : public base::RefCounted<CefProcess>,
public base::NonThreadSafe {
public: public:
CefProcess(bool multi_threaded_message_loop); CefProcess(bool multi_threaded_message_loop);
virtual ~CefProcess(); virtual ~CefProcess();

View File

@ -21,8 +21,8 @@
#endif #endif
#include "webkit/blob/blob_storage_controller.h" #include "webkit/blob/blob_storage_controller.h"
#include "webkit/blob/blob_url_request_job.h" #include "webkit/blob/blob_url_request_job.h"
#include "webkit/glue/plugins/plugin_list.h"
#include "webkit/extensions/v8/gc_extension.h" #include "webkit/extensions/v8/gc_extension.h"
#include "webkit/plugins/npapi/plugin_list.h"
#include "net/url_request/url_request.h" #include "net/url_request/url_request.h"
#if defined(OS_WIN) #if defined(OS_WIN)
@ -130,13 +130,15 @@ void CefProcessUIThread::Init() {
if (settings.extra_plugin_paths) { if (settings.extra_plugin_paths) {
cef_string_t str; cef_string_t str;
memset(&str, 0, sizeof(str));
FilePath path; FilePath path;
int size = cef_string_list_size(settings.extra_plugin_paths); int size = cef_string_list_size(settings.extra_plugin_paths);
for(int i = 0; i < size; ++i) { for(int i = 0; i < size; ++i) {
if (!cef_string_list_value(settings.extra_plugin_paths, i, &str)) if (!cef_string_list_value(settings.extra_plugin_paths, i, &str))
continue; continue;
path = FilePath(CefString(&str)); path = FilePath(CefString(&str));
NPAPI::PluginList::Singleton()->AddExtraPluginPath(path); webkit::npapi::PluginList::Singleton()->AddExtraPluginPath(path);
} }
} }
} }

View File

@ -6,13 +6,34 @@
#include "include/cef.h" #include "include/cef.h"
#include "cef_process_ui_thread.h" #include "cef_process_ui_thread.h"
#include "browser_webkit_glue.h" #include "browser_webkit_glue.h"
#include "base/chrome_application_mac.h" #include "base/message_pump_mac.h"
#include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h" #include "third_party/WebKit/WebKit/mac/WebCoreSupport/WebSystemInterface.h"
namespace { namespace {
// Memory autorelease pool. // Memory autorelease pool.
NSAutoreleasePool* g_autopool; static NSAutoreleasePool* g_autopool = nil;
// CrAppProtocol implementation.
@interface CrApplication : NSApplication<CrAppProtocol> {
@private
BOOL handlingSendEvent_;
}
- (BOOL)isHandlingSendEvent;
@end
@implementation CrApplication
- (BOOL)isHandlingSendEvent {
return handlingSendEvent_;
}
- (void)sendEvent:(NSEvent*)event {
BOOL wasHandlingSendEvent = handlingSendEvent_;
handlingSendEvent_ = YES;
[super sendEvent:event];
handlingSendEvent_ = wasHandlingSendEvent;
}
@end
void RunLoopObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void RunLoopObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity,
void* info) void* info)

View File

@ -8,7 +8,7 @@
#include "base/lock.h" #include "base/lock.h"
#include "base/task.h" #include "base/task.h"
#include "base/thread.h" #include "base/threading/thread.h"
namespace base { namespace base {
class MessageLoopProxy; class MessageLoopProxy;

View File

@ -10,7 +10,7 @@
#include "webwidget_host.h" #include "webwidget_host.h"
#if defined(TOOLKIT_USES_GTK) #if defined(TOOLKIT_USES_GTK)
#include "webkit/glue/plugins/gtk_plugin_container_manager.h" #include "webkit/plugins/npapi/gtk_plugin_container_manager.h"
#endif #endif
struct WebPreferences; struct WebPreferences;
@ -42,7 +42,7 @@ class WebViewHost : public WebWidgetHost {
// Destroy the plugin parent container when a plugin has been destroyed. // Destroy the plugin parent container when a plugin has been destroyed.
void DestroyPluginContainer(gfx::PluginWindowHandle id); void DestroyPluginContainer(gfx::PluginWindowHandle id);
GtkPluginContainerManager* plugin_container_manager() { webkit::npapi::GtkPluginContainerManager* plugin_container_manager() {
return &plugin_container_manager_; return &plugin_container_manager_;
} }
#elif defined(OS_MACOSX) #elif defined(OS_MACOSX)
@ -58,7 +58,7 @@ class WebViewHost : public WebWidgetHost {
#if defined(TOOLKIT_USES_GTK) #if defined(TOOLKIT_USES_GTK)
// Helper class that creates and moves plugin containers. // Helper class that creates and moves plugin containers.
GtkPluginContainerManager plugin_container_manager_; webkit::npapi::GtkPluginContainerManager plugin_container_manager_;
#endif #endif
}; };

View File

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

View File

@ -5,9 +5,9 @@
#include "webwidget_host.h" #include "webwidget_host.h"
#include "app/win/hwnd_util.h"
#include "gfx/rect.h" #include "gfx/rect.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/win_util.h"
#include "third_party/WebKit/WebKit/chromium/public/WebInputEvent.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/WebPopupMenu.h"
#include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h" #include "third_party/WebKit/WebKit/chromium/public/WebScreenInfo.h"
@ -54,7 +54,7 @@ WebWidgetHost* WebWidgetHost::Create(HWND parent_view,
0, 0, 0, 0, 0, 0, 0, 0,
parent_view, NULL, GetModuleHandle(NULL), NULL); parent_view, NULL, GetModuleHandle(NULL), NULL);
win_util::SetWindowUserData(host->view_, host); app::win::SetWindowUserData(host->view_, host);
host->webwidget_ = WebPopupMenu::create(client); host->webwidget_ = WebPopupMenu::create(client);
@ -63,7 +63,7 @@ WebWidgetHost* WebWidgetHost::Create(HWND parent_view,
/*static*/ /*static*/
static WebWidgetHost* FromWindow(HWND view) { static WebWidgetHost* FromWindow(HWND view) {
return reinterpret_cast<WebWidgetHost*>(win_util::GetWindowUserData(view)); return reinterpret_cast<WebWidgetHost*>(app::win::GetWindowUserData(view));
} }
/*static*/ /*static*/
@ -215,7 +215,7 @@ WebWidgetHost::WebWidgetHost()
} }
WebWidgetHost::~WebWidgetHost() { WebWidgetHost::~WebWidgetHost() {
win_util::SetWindowUserData(view_, 0); app::win::SetWindowUserData(view_, 0);
TrackMouseLeave(false); TrackMouseLeave(false);
ResetTooltip(); ResetTooltip();

View File

@ -110,7 +110,7 @@ CefString xmlCharToString(const xmlChar* xmlStr, bool free)
} // namespace } // namespace
CefXmlReaderImpl::CefXmlReaderImpl() CefXmlReaderImpl::CefXmlReaderImpl()
: supported_thread_id_(PlatformThread::CurrentId()), reader_(NULL) : supported_thread_id_(base::PlatformThread::CurrentId()), reader_(NULL)
{ {
} }
@ -473,7 +473,7 @@ void CefXmlReaderImpl::AppendError(const CefString& error_str)
bool CefXmlReaderImpl::VerifyContext() bool CefXmlReaderImpl::VerifyContext()
{ {
if (PlatformThread::CurrentId() != supported_thread_id_) { if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it. // This object should only be accessed from the thread that created it.
NOTREACHED(); NOTREACHED();
return false; return false;

View File

@ -6,7 +6,7 @@
#define _XML_READER_IMPL_H #define _XML_READER_IMPL_H
#include "../include/cef.h" #include "../include/cef.h"
#include "base/platform_thread.h" #include "base/threading/platform_thread.h"
#include <libxml/xmlreader.h> #include <libxml/xmlreader.h>
#include <sstream> #include <sstream>
@ -61,7 +61,7 @@ public:
bool VerifyContext(); bool VerifyContext();
protected: protected:
PlatformThreadId supported_thread_id_; base::PlatformThreadId supported_thread_id_;
CefRefPtr<CefStreamReader> stream_; CefRefPtr<CefStreamReader> stream_;
xmlTextReaderPtr reader_; xmlTextReaderPtr reader_;
std::stringstream error_buf_; std::stringstream error_buf_;

View File

@ -80,7 +80,7 @@ int ZCALLBACK zlib_error_callback OF((voidpf opaque, voidpf stream))
} // namespace } // namespace
CefZipReaderImpl::CefZipReaderImpl() CefZipReaderImpl::CefZipReaderImpl()
: supported_thread_id_(PlatformThread::CurrentId()), reader_(NULL), : supported_thread_id_(base::PlatformThread::CurrentId()), reader_(NULL),
has_fileopen_(false), has_fileinfo_(false), filesize_(0), filemodified_(0) has_fileopen_(false), has_fileinfo_(false), filesize_(0), filemodified_(0)
{ {
} }
@ -287,7 +287,7 @@ bool CefZipReaderImpl::GetFileInfo()
bool CefZipReaderImpl::VerifyContext() bool CefZipReaderImpl::VerifyContext()
{ {
if (PlatformThread::CurrentId() != supported_thread_id_) { if (base::PlatformThread::CurrentId() != supported_thread_id_) {
// This object should only be accessed from the thread that created it. // This object should only be accessed from the thread that created it.
NOTREACHED(); NOTREACHED();
return false; return false;

View File

@ -6,7 +6,7 @@
#define _ZIP_READER_IMPL_H #define _ZIP_READER_IMPL_H
#include "../include/cef.h" #include "../include/cef.h"
#include "base/platform_thread.h" #include "base/threading/platform_thread.h"
#include "third_party/zlib/contrib/minizip/unzip.h" #include "third_party/zlib/contrib/minizip/unzip.h"
#include <sstream> #include <sstream>
@ -40,7 +40,7 @@ public:
bool VerifyContext(); bool VerifyContext();
protected: protected:
PlatformThreadId supported_thread_id_; base::PlatformThreadId supported_thread_id_;
unzFile reader_; unzFile reader_;
bool has_fileopen_; bool has_fileopen_;
bool has_fileinfo_; bool has_fileinfo_;

View File

@ -64,12 +64,16 @@ CEF_EXPORT void cef_shutdown()
DCHECK(CefXmlReaderCppToC::DebugObjCt == 0); DCHECK(CefXmlReaderCppToC::DebugObjCt == 0);
DCHECK(CefZipReaderCppToC::DebugObjCt == 0); DCHECK(CefZipReaderCppToC::DebugObjCt == 0);
DCHECK(CefDownloadHandlerCToCpp::DebugObjCt == 0); DCHECK(CefDownloadHandlerCToCpp::DebugObjCt == 0);
DCHECK(CefHandlerCToCpp::DebugObjCt == 0);
DCHECK(CefReadHandlerCToCpp::DebugObjCt == 0); DCHECK(CefReadHandlerCToCpp::DebugObjCt == 0);
DCHECK(CefSchemeHandlerCToCpp::DebugObjCt == 0); DCHECK(CefSchemeHandlerCToCpp::DebugObjCt == 0);
DCHECK(CefSchemeHandlerFactoryCToCpp::DebugObjCt == 0); DCHECK(CefSchemeHandlerFactoryCToCpp::DebugObjCt == 0);
DCHECK(CefV8HandlerCToCpp::DebugObjCt == 0); DCHECK(CefV8HandlerCToCpp::DebugObjCt == 0);
DCHECK(CefWriteHandlerCToCpp::DebugObjCt == 0); DCHECK(CefWriteHandlerCToCpp::DebugObjCt == 0);
// TODO: This breakpoint may be hit if content is still loading when CEF
// exits. Re-enable the breakpoint if/when CEF stops content loading before
// exit.
//DCHECK(CefHandlerCToCpp::DebugObjCt == 0);
#endif // _DEBUG #endif // _DEBUG
} }

View File

@ -38,7 +38,6 @@ void CefShutdown()
#ifdef _DEBUG #ifdef _DEBUG
// Check that all wrapper objects have been destroyed // Check that all wrapper objects have been destroyed
DCHECK(CefDownloadHandlerCppToC::DebugObjCt == 0); DCHECK(CefDownloadHandlerCppToC::DebugObjCt == 0);
DCHECK(CefHandlerCppToC::DebugObjCt == 0);
DCHECK(CefReadHandlerCppToC::DebugObjCt == 0); DCHECK(CefReadHandlerCppToC::DebugObjCt == 0);
DCHECK(CefSchemeHandlerCppToC::DebugObjCt == 0); DCHECK(CefSchemeHandlerCppToC::DebugObjCt == 0);
DCHECK(CefSchemeHandlerFactoryCppToC::DebugObjCt == 0); DCHECK(CefSchemeHandlerFactoryCppToC::DebugObjCt == 0);
@ -53,6 +52,11 @@ void CefShutdown()
DCHECK(CefV8ValueCToCpp::DebugObjCt == 0); DCHECK(CefV8ValueCToCpp::DebugObjCt == 0);
DCHECK(CefXmlReaderCToCpp::DebugObjCt == 0); DCHECK(CefXmlReaderCToCpp::DebugObjCt == 0);
DCHECK(CefZipReaderCToCpp::DebugObjCt == 0); DCHECK(CefZipReaderCToCpp::DebugObjCt == 0);
// TODO: This breakpoint may be hit if content is still loading when CEF
// exits. Re-enable the breakpoint if/when CEF stops content loading before
// exit.
//DCHECK(CefHandlerCppToC::DebugObjCt == 0);
#endif // _DEBUG #endif // _DEBUG
} }

View File

@ -1,20 +1,20 @@
Index: common.gypi Index: common.gypi
=================================================================== ===================================================================
--- common.gypi (revision 55388) --- common.gypi (revision 70742)
+++ common.gypi (working copy) +++ common.gypi (working copy)
@@ -23,6 +23,9 @@ @@ -9,6 +9,9 @@
# Variables expected to be overriden on the GYP command line (-D) or by # Variables expected to be overriden on the GYP command line (-D) or by
# ~/.gyp/include.gypi. # ~/.gyp/include.gypi.
'variables': {
+ # Directory for CEF source files. This will be set by cef.gypi. + # Directory for CEF source files. This will be set by cef.gypi.
+ 'cef_directory%' : '', + 'cef_directory%' : '',
+ +
# Putting a variables dict inside another variables dict looks kind of # Putting a variables dict inside another variables dict looks kind of
# weird. This is done so that "branding" and "buildtype" are defined as # weird. This is done so that 'host_arch', 'chromeos', etc are defined as
# variables within the outer variables dict here. This is necessary # variables within the outer variables dict here. This is necessary
Index: win/system.gyp Index: win/system.gyp
=================================================================== ===================================================================
--- win/system.gyp (revision 55388) --- win/system.gyp (revision 70742)
+++ win/system.gyp (working copy) +++ win/system.gyp (working copy)
@@ -22,6 +22,13 @@ @@ -22,6 +22,13 @@
'action': ['', '<@(_inputs)'], 'action': ['', '<@(_inputs)'],

View File

@ -69,6 +69,9 @@ int APIENTRY wWinMain(HINSTANCE hInstance,
// Specify a cache path value. // Specify a cache path value.
//CefString(&settings.cache_path).FromASCII("c:\\temp\\cache"); //CefString(&settings.cache_path).FromASCII("c:\\temp\\cache");
// Disable accelerated compositing to view HTML5 video.
//browserDefaults.accelerated_compositing_disabled = true;
#ifdef TEST_SINGLE_THREADED_MESSAGE_LOOP #ifdef TEST_SINGLE_THREADED_MESSAGE_LOOP
// Initialize the CEF with messages processed using the current application's // Initialize the CEF with messages processed using the current application's
// message loop. // message loop.

View File

@ -6,7 +6,7 @@
#define _TEST_HANDLER_H #define _TEST_HANDLER_H
#include "include/cef.h" #include "include/cef.h"
#include "base/waitable_event.h" #include "base/synchronization/waitable_event.h"
#include "testing/gtest/include/gtest/gtest.h" #include "testing/gtest/include/gtest/gtest.h"
// Base implementation of CefHandler for unit tests. // Base implementation of CefHandler for unit tests.

View File

@ -6,7 +6,7 @@
#define _CEF_TEST_SUITE_H #define _CEF_TEST_SUITE_H
#include "build/build_config.h" #include "build/build_config.h"
#include "base/platform_thread.h" #include "base/threading/platform_thread.h"
#include "base/test/test_suite.h" #include "base/test/test_suite.h"
#include "include/cef.h" #include "include/cef.h"
@ -29,7 +29,7 @@ class CefTestSuite : public TestSuite {
virtual void Shutdown() { virtual void Shutdown() {
// Delay a bit so that the system has a chance to finish destroying windows // Delay a bit so that the system has a chance to finish destroying windows
// before CefShutdown() checks for memory leaks. // before CefShutdown() checks for memory leaks.
PlatformThread::Sleep(500); base::PlatformThread::Sleep(500);
CefShutdown(); CefShutdown();
TestSuite::Shutdown(); TestSuite::Shutdown();