Update to Chromium revision 213078.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1338 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt 2013-07-24 20:15:18 +00:00
parent 6a7353be3e
commit a2a3513620
69 changed files with 510 additions and 444 deletions

View File

@ -17,5 +17,5 @@
{
'chromium_url': 'http://src.chromium.org/svn/trunk/src',
'chromium_revision': '208345',
'chromium_revision': '213078',
}

View File

@ -564,7 +564,7 @@
'type': 'none',
'dependencies': [
'<(DEPTH)/ui/base/strings/ui_strings.gyp:ui_strings',
'<(DEPTH)/webkit/support/webkit_support.gyp:webkit_strings',
'<(DEPTH)/webkit/webkit_resources.gyp:webkit_strings',
'cef_strings',
],
'variables': {
@ -693,10 +693,11 @@
'type': 'none',
'dependencies': [
'<(DEPTH)/content/browser/devtools/devtools_resources.gyp:devtools_resources',
'<(DEPTH)/content/browser/tracing/tracing_resources.gyp:tracing_resources',
'<(DEPTH)/content/content_resources.gyp:content_resources',
'<(DEPTH)/net/net.gyp:net_resources',
'<(DEPTH)/ui/ui.gyp:ui_resources',
'<(DEPTH)/webkit/support/webkit_support.gyp:webkit_resources',
'<(DEPTH)/webkit/webkit_resources.gyp:webkit_resources',
'cef_locales',
'cef_resources',
],
@ -709,6 +710,7 @@
'action_name': 'repack_cef_pack',
'variables': {
'pak_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/tracing_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/content/content_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/net/net_resources.pak',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/ui_resources_100_percent.pak',
@ -731,6 +733,7 @@
'action_name': 'make_pack_resources_header',
'variables': {
'header_inputs': [
'<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing/grit/tracing_resources.h',
'<(SHARED_INTERMEDIATE_DIR)/content/grit/content_resources.h',
'<(SHARED_INTERMEDIATE_DIR)/net/grit/net_resources.h',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_resources/grit/ui_resources.h',
@ -793,6 +796,7 @@
'<(DEPTH)/third_party/WebKit/public/web',
# CEF grit resource includes
'<(grit_out_dir)',
'<(SHARED_INTERMEDIATE_DIR)/content/browser/tracing',
'<(SHARED_INTERMEDIATE_DIR)/ui/ui_strings',
'<(SHARED_INTERMEDIATE_DIR)/webkit',
],
@ -1002,6 +1006,7 @@
# Include sources for proxy support.
'<(DEPTH)/base/prefs/testing_pref_store.cc',
'<(DEPTH)/base/prefs/testing_pref_store.h',
'<(DEPTH)/chrome/browser/net/pref_proxy_config_tracker.cc',
'<(DEPTH)/chrome/browser/net/pref_proxy_config_tracker.h',
'<(DEPTH)/chrome/browser/net/pref_proxy_config_tracker_impl.cc',
'<(DEPTH)/chrome/browser/net/pref_proxy_config_tracker_impl.h',

View File

@ -116,7 +116,7 @@ typedef struct _cef_download_item_t {
///
// Returns the unique identifier for this download.
///
int32 (CEF_CALLBACK *get_id)(struct _cef_download_item_t* self);
uint32 (CEF_CALLBACK *get_id)(struct _cef_download_item_t* self);
///
// Returns the URL.

View File

@ -118,7 +118,7 @@ class CefDownloadItem : public virtual CefBase {
// Returns the unique identifier for this download.
///
/*--cef()--*/
virtual int32 GetId() =0;
virtual uint32 GetId() =0;
///
// Returns the URL.

View File

@ -11,17 +11,14 @@
#include "libcef/browser/download_manager_delegate.h"
#include "libcef/browser/thread_util.h"
#include "libcef/browser/url_request_context_getter.h"
#include "libcef/common/cef_switches.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "base/logging.h"
#include "base/threading/thread.h"
#include "content/public/browser/download_manager.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/geolocation_permission_context.h"
#include "content/public/browser/resource_context.h"
#include "content/public/browser/speech_recognition_preferences.h"
#include "content/public/browser/storage_partition.h"
using content::BrowserThread;
@ -158,26 +155,6 @@ class CefGeolocationPermissionContext
DISALLOW_COPY_AND_ASSIGN(CefGeolocationPermissionContext);
};
class CefSpeechRecognitionPreferences
: public content::SpeechRecognitionPreferences {
public:
CefSpeechRecognitionPreferences() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
filter_profanities_ =
command_line.HasSwitch(switches::kEnableProfanityFilter);
}
// Overridden from SpeechRecognitionPreferences:
virtual bool FilterProfanities() const OVERRIDE {
return filter_profanities_;
}
private:
bool filter_profanities_;
DISALLOW_COPY_AND_ASSIGN(CefSpeechRecognitionPreferences);
};
} // namespace
class CefBrowserContext::CefResourceContext : public content::ResourceContext {
@ -222,7 +199,7 @@ CefBrowserContext::~CefBrowserContext() {
}
}
base::FilePath CefBrowserContext::GetPath() {
base::FilePath CefBrowserContext::GetPath() const {
return _Context->cache_path();
}
@ -272,6 +249,15 @@ net::URLRequestContextGetter*
return GetRequestContext();
}
void CefBrowserContext::RequestMIDISysExPermission(
int render_process_id,
int render_view_id,
const GURL& requesting_frame,
const MIDISysExPermissionCallback& callback) {
// TODO(CEF): Implement Web MIDI API permission handling.
callback.Run(false);
}
content::ResourceContext* CefBrowserContext::GetResourceContext() {
return resource_context_.get();
}
@ -285,13 +271,6 @@ content::GeolocationPermissionContext*
return geolocation_permission_context_;
}
content::SpeechRecognitionPreferences*
CefBrowserContext::GetSpeechRecognitionPreferences() {
if (!speech_recognition_preferences_.get())
speech_recognition_preferences_ = new CefSpeechRecognitionPreferences();
return speech_recognition_preferences_.get();
}
quota::SpecialStoragePolicy* CefBrowserContext::GetSpecialStoragePolicy() {
return NULL;
}

View File

@ -28,7 +28,7 @@ class CefBrowserContext : public content::BrowserContext {
virtual ~CefBrowserContext();
// BrowserContext methods.
virtual base::FilePath GetPath() OVERRIDE;
virtual base::FilePath GetPath() const OVERRIDE;
virtual bool IsOffTheRecord() const OVERRIDE;
virtual content::DownloadManagerDelegate* GetDownloadManagerDelegate() OVERRIDE;
virtual net::URLRequestContextGetter* GetRequestContext() OVERRIDE;
@ -41,11 +41,14 @@ class CefBrowserContext : public content::BrowserContext {
GetMediaRequestContextForStoragePartition(
const base::FilePath& partition_path,
bool in_memory) OVERRIDE;
virtual void RequestMIDISysExPermission(
int render_process_id,
int render_view_id,
const GURL& requesting_frame,
const MIDISysExPermissionCallback& callback) OVERRIDE;
virtual content::ResourceContext* GetResourceContext() OVERRIDE;
virtual content::GeolocationPermissionContext*
GetGeolocationPermissionContext() OVERRIDE;
virtual content::SpeechRecognitionPreferences*
GetSpeechRecognitionPreferences() OVERRIDE;
virtual quota::SpecialStoragePolicy* GetSpecialStoragePolicy() OVERRIDE;
net::URLRequestContextGetter* CreateRequestContext(
@ -70,8 +73,6 @@ class CefBrowserContext : public content::BrowserContext {
scoped_refptr<CefURLRequestContextGetter> url_request_getter_;
scoped_refptr<content::GeolocationPermissionContext>
geolocation_permission_context_;
scoped_refptr<content::SpeechRecognitionPreferences>
speech_recognition_preferences_;
bool use_osr_next_contents_view_;

View File

@ -1631,7 +1631,7 @@ void CefBrowserHostImpl::HandleKeyboardEvent(
bool CefBrowserHostImpl::CanDragEnter(
content::WebContents* source,
const WebDropData& data,
const content::DropData& data,
WebKit::WebDragOperationsMask mask) {
CefRefPtr<CefDragHandler> handler = client_->GetDragHandler();
if (handler.get()) {
@ -1649,7 +1649,10 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
int route_id,
WindowContainerType window_container_type,
const string16& frame_name,
const GURL& target_url) {
const GURL& target_url,
WindowOpenDisposition disposition,
const WebKit::WebWindowFeatures& features,
bool user_gesture) {
CefContentBrowserClient::Get()->GetOrCreateBrowserInfo(
web_contents->GetRenderProcessHost()->GetID(), route_id);
@ -1714,7 +1717,7 @@ void CefBrowserHostImpl::RunFileChooser(
RunFileChooserOnUIThread(params,
base::Bind(&CefBrowserHostImpl::OnRunFileChooserDelegateCallback, this,
tab));
tab, params.mode));
}
bool CefBrowserHostImpl::SetPendingPopupInfo(
@ -1757,7 +1760,8 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
// For open device request pick the desired device or fall back to the
// first available of the given type.
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
request.requested_device_id,
(microphone_requested ? request.requested_audio_device_id :
request.requested_video_device_id),
microphone_requested,
webcam_requested,
&devices);
@ -1828,7 +1832,7 @@ void CefBrowserHostImpl::RenderViewReady() {
}
}
void CefBrowserHostImpl::RenderViewGone(base::TerminationStatus status) {
void CefBrowserHostImpl::RenderProcessGone(base::TerminationStatus status) {
queue_messages_ = true;
cef_termination_status_t ts = TS_ABNORMAL_TERMINATION;
@ -2354,6 +2358,7 @@ void CefBrowserHostImpl::OnRunFileChooserCallback(
void CefBrowserHostImpl::OnRunFileChooserDelegateCallback(
content::WebContents* tab,
content::FileChooserParams::Mode mode,
const std::vector<base::FilePath>& file_paths) {
CEF_REQUIRE_UIT();
@ -2361,12 +2366,6 @@ void CefBrowserHostImpl::OnRunFileChooserDelegateCallback(
if (!render_view_host)
return;
const int kReadFilePermissions =
base::PLATFORM_FILE_OPEN |
base::PLATFORM_FILE_READ |
base::PLATFORM_FILE_EXCLUSIVE_READ |
base::PLATFORM_FILE_ASYNC;
// Convert FilePath list to SelectedFileInfo list.
std::vector<ui::SelectedFileInfo> selected_files;
for (size_t i = 0; i < file_paths.size(); ++i) {
@ -2375,6 +2374,5 @@ void CefBrowserHostImpl::OnRunFileChooserDelegateCallback(
}
// Notify our RenderViewHost in all cases.
render_view_host->FilesSelectedInChooser(selected_files,
kReadFilePermissions);
render_view_host->FilesSelectedInChooser(selected_files, mode);
}

View File

@ -28,6 +28,7 @@
#include "content/public/browser/web_contents.h"
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
#include "content/public/common/file_chooser_params.h"
#include "net/url_request/url_request_context_getter.h"
namespace content {
@ -303,14 +304,17 @@ class CefBrowserHostImpl : public CefBrowserHost,
const content::NativeWebKeyboardEvent& event) OVERRIDE;
virtual bool CanDragEnter(
content::WebContents* source,
const WebDropData& data,
const content::DropData& data,
WebKit::WebDragOperationsMask operations_allowed) OVERRIDE;
virtual bool ShouldCreateWebContents(
content::WebContents* web_contents,
int route_id,
WindowContainerType window_container_type,
const string16& frame_name,
const GURL& target_url) OVERRIDE;
const GURL& target_url,
WindowOpenDisposition disposition,
const WebKit::WebWindowFeatures& features,
bool user_gesture) OVERRIDE;
virtual void WebContentsCreated(content::WebContents* source_contents,
int64 source_frame_id,
const string16& frame_name,
@ -337,7 +341,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
virtual void RenderViewDeleted(
content::RenderViewHost* render_view_host) OVERRIDE;
virtual void RenderViewReady() OVERRIDE;
virtual void RenderViewGone(base::TerminationStatus status) OVERRIDE;
virtual void RenderProcessGone(base::TerminationStatus status) OVERRIDE;
virtual void DidCommitProvisionalLoadForFrame(
int64 frame_id,
bool is_main_frame,
@ -471,6 +475,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
// Used with WebContentsDelegate::RunFileChooser to notify the WebContents.
void OnRunFileChooserDelegateCallback(
content::WebContents* tab,
content::FileChooserParams::Mode mode,
const std::vector<base::FilePath>& file_paths);
CefWindowInfo window_info_;

View File

@ -14,7 +14,7 @@
#include "base/bind.h"
#include "base/command_line.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_number_conversions.h"
#include "chrome/browser/net/proxy_service_factory.h"
#include "content/browser/webui/content_web_ui_controller_factory.h"
@ -74,7 +74,7 @@ int CefBrowserMainParts::PreCreateThreads() {
// Initialize proxy configuration tracker.
pref_proxy_config_tracker_.reset(
ProxyServiceFactory::CreatePrefProxyConfigTracker(
ProxyServiceFactory::CreatePrefProxyConfigTrackerOfLocalState(
pref_service_.get()));
return 0;
@ -86,11 +86,9 @@ void CefBrowserMainParts::PreMainMessageLoopRun() {
// Initialize the proxy configuration service. This needs to occur before
// CefURLRequestContextGetter::GetURLRequestContext() is called for the
// first time.
ChromeProxyConfigService* chrome_proxy_config_service =
ProxyServiceFactory::CreateProxyConfigService();
proxy_config_service_.reset(chrome_proxy_config_service);
pref_proxy_config_tracker_->SetChromeProxyConfigService(
chrome_proxy_config_service);
proxy_config_service_.reset(
ProxyServiceFactory::CreateProxyConfigService(
pref_proxy_config_tracker_.get()));
// Initialize the request context getter. This indirectly triggers a call
// to CefURLRequestContextGetter::GetURLRequestContext() on the IO thread.

View File

@ -7,7 +7,7 @@
#pragma once
#include "base/basictypes.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
// Class used to process events on the current message loop.
class CefBrowserMessageLoop : public base::MessageLoopForUI {

View File

@ -14,7 +14,7 @@
#include "libcef/common/response_impl.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
#include "content/public/common/url_fetcher.h"
#include "net/base/load_flags.h"

View File

@ -31,6 +31,7 @@
#include "content/browser/net/view_blob_internals_job_factory.h"
#include "content/public/common/url_constants.h"
#include "grit/cef_resources.h"
#include "grit/tracing_resources.h"
#include "ipc/ipc_channel.h"
#include "net/url_request/url_request.h"
#include "v8/include/v8.h"
@ -257,10 +258,10 @@ class Delegate : public InternalHandlerDelegate {
bool OnTracing(const std::string& path, Action* action) {
if (path == "tracing.js") {
action->resource_id = IDR_CEF_TRACING_JS;
action->resource_id = IDR_TRACING_JS;
} else {
action->mime_type = "text/html";
action->resource_id = IDR_CEF_TRACING_HTML;
action->resource_id = IDR_TRACING_HTML;
}
return true;
}

View File

@ -13,8 +13,8 @@
#include "include/cef_process_message.h"
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
#include "net/url_request/url_request_job_factory.h"
#include "url/gurl.h"
namespace base {
class ListValue;

View File

@ -38,8 +38,8 @@
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/common/content_switches.h"
#include "googleurl/src/gurl.h"
#include "ui/base/ui_base_switches.h"
#include "url/gurl.h"
namespace {
@ -213,7 +213,7 @@ class CefPluginServiceFilter : public content::PluginServiceFilter {
const void* context,
const GURL& url,
const GURL& policy_url,
webkit::WebPluginInfo* plugin) OVERRIDE {
content::WebPluginInfo* plugin) OVERRIDE {
bool allowed = true;
CefRefPtr<CefBrowserHostImpl> browser =

View File

@ -17,7 +17,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/content_browser_client.h"
#include "googleurl/src/gurl.h"
#include "url/gurl.h"
class CefBrowserContext;
class CefBrowserInfo;

View File

@ -182,7 +182,7 @@ bool CefContext::Initialize(const CefMainArgs& args,
cache_path_ = base::FilePath(CefString(&settings.cache_path));
if (!cache_path_.empty() &&
!file_util::DirectoryExists(cache_path_) &&
!base::DirectoryExists(cache_path_) &&
!file_util::CreateDirectory(cache_path_)) {
NOTREACHED() << "The cache_path directory could not be created";
cache_path_ = base::FilePath();

View File

@ -20,10 +20,10 @@
#include "base/logging.h"
#include "base/threading/thread_restrictions.h"
#include "content/browser/net/sqlite_persistent_cookie_store.h"
#include "googleurl/src/gurl.h"
#include "net/cookies/cookie_util.h"
#include "net/cookies/parsed_cookie.h"
#include "net/url_request/url_request_context.h"
#include "url/gurl.h"
using content::BrowserThread;
@ -285,7 +285,7 @@ bool CefCookieManagerImpl::SetStoragePath(
// TODO(cef): Move directory creation to the blocking pool instead of
// allowing file IO on this thread.
base::ThreadRestrictions::ScopedAllowIO allow_io;
if (file_util::DirectoryExists(new_path) ||
if (base::DirectoryExists(new_path) ||
file_util::CreateDirectory(new_path)) {
const base::FilePath& cookie_path = new_path.AppendASCII("Cookies");
persistent_store =

View File

@ -14,7 +14,7 @@
#include "base/rand_util.h"
#include "base/strings/stringprintf.h"
#include "base/strings/string_number_conversions.h"
#include "base/time.h"
#include "base/time/time.h"
#include "content/public/browser/devtools_http_handler.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"

View File

@ -7,7 +7,7 @@
#include "libcef/common/time_util.h"
#include "content/public/browser/download_item.h"
#include "googleurl/src/gurl.h"
#include "url/gurl.h"
CefDownloadItemImpl::CefDownloadItemImpl(content::DownloadItem* value)
@ -76,7 +76,7 @@ CefString CefDownloadItemImpl::GetFullPath() {
return const_value().GetFullPath().value();
}
int32 CefDownloadItemImpl::GetId() {
uint32 CefDownloadItemImpl::GetId() {
CEF_VALUE_VERIFY_RETURN(false, 0);
return const_value().GetId();
}

View File

@ -31,7 +31,7 @@ class CefDownloadItemImpl
virtual CefTime GetStartTime() OVERRIDE;
virtual CefTime GetEndTime() OVERRIDE;
virtual CefString GetFullPath() OVERRIDE;
virtual int32 GetId() OVERRIDE;
virtual uint32 GetId() OVERRIDE;
virtual CefString GetURL() OVERRIDE;
virtual CefString GetSuggestedFileName() OVERRIDE;
virtual CefString GetContentDisposition() OVERRIDE;

View File

@ -53,7 +53,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
public:
CefBeforeDownloadCallbackImpl(
const base::WeakPtr<DownloadManager>& manager,
int32 download_id,
uint32 download_id,
const base::FilePath& suggested_name,
const content::DownloadTargetCallback& callback)
: manager_(manager),
@ -88,7 +88,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
private:
static void GenerateFilename(
base::WeakPtr<DownloadManager> manager,
int32 download_id,
uint32 download_id,
const base::FilePath& suggested_name,
const base::FilePath& download_path,
bool show_dialog,
@ -97,7 +97,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
if (!suggested_path.empty()) {
// Create the directory if necessary.
base::FilePath dir_path = suggested_path.DirName();
if (!file_util::DirectoryExists(dir_path) &&
if (!base::DirectoryExists(dir_path) &&
!file_util::CreateDirectory(dir_path)) {
NOTREACHED() << "failed to create the download directory";
suggested_path.clear();
@ -122,7 +122,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
static void ChooseDownloadPath(
base::WeakPtr<DownloadManager> manager,
int32 download_id,
uint32 download_id,
const base::FilePath& suggested_path,
bool show_dialog,
const content::DownloadTargetCallback& callback) {
@ -184,7 +184,7 @@ class CefBeforeDownloadCallbackImpl : public CefBeforeDownloadCallback {
}
base::WeakPtr<DownloadManager> manager_;
int32 download_id_;
uint32 download_id_;
base::FilePath suggested_name_;
content::DownloadTargetCallback callback_;
@ -198,7 +198,7 @@ class CefDownloadItemCallbackImpl : public CefDownloadItemCallback {
public:
explicit CefDownloadItemCallbackImpl(
const base::WeakPtr<DownloadManager>& manager,
int32 download_id)
uint32 download_id)
: manager_(manager),
download_id_(download_id) {
}
@ -223,7 +223,7 @@ class CefDownloadItemCallbackImpl : public CefDownloadItemCallback {
}
base::WeakPtr<DownloadManager> manager_;
int32 download_id_;
uint32 download_id_;
IMPLEMENT_REFCOUNTING(CefDownloadItemCallbackImpl);
DISALLOW_COPY_AND_ASSIGN(CefDownloadItemCallbackImpl);
@ -341,3 +341,9 @@ bool CefDownloadManagerDelegate::DetermineDownloadTarget(
return true;
}
void CefDownloadManagerDelegate::GetNextId(
const content::DownloadIdCallback& callback) {
static uint32 next_id = DownloadItem::kInvalidId + 1;
callback.Run(next_id++);
}

View File

@ -36,6 +36,7 @@ class CefDownloadManagerDelegate
virtual bool DetermineDownloadTarget(
content::DownloadItem* item,
const content::DownloadTargetCallback& callback) OVERRIDE;
virtual void GetNextId(const content::DownloadIdCallback& callback) OVERRIDE;
content::DownloadManager* manager_;
base::WeakPtrFactory<content::DownloadManager> manager_ptr_factory_;

View File

@ -9,7 +9,7 @@
#include <string>
#include "include/cef_scheme.h"
#include "base/memory/scoped_ptr.h"
#include "googleurl/src/gurl.h"
#include "url/gurl.h"
namespace scheme {

View File

@ -153,22 +153,33 @@ void CefMediaCaptureDevicesDispatcher::OnVideoCaptureDevicesChanged(
}
void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
int render_process_id,
int render_view_id,
const content::MediaStreamDevice& device,
int render_process_id,
int render_view_id,
int page_request_id,
const content::MediaStreamDevice& device,
content::MediaRequestState state) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserThread::PostTask(
BrowserThread::UI, FROM_HERE,
base::Bind(
&CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread,
base::Unretained(this), render_process_id, render_view_id, device,
state));
base::Unretained(this), render_process_id, render_view_id,
page_request_id, device, state));
}
void CefMediaCaptureDevicesDispatcher::OnAudioStreamPlayingChanged(
int render_process_id, int render_view_id, int stream_id, bool playing) {
int render_process_id,
int render_view_id,
int stream_id,
bool is_playing,
float power_dbfs,
bool clipped) {
}
void CefMediaCaptureDevicesDispatcher::OnCreatingAudioStream(
int render_process_id,
int render_view_id) {
}
void CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread(
@ -192,11 +203,13 @@ void CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread(
void CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread(
int render_process_id,
int render_view_id,
int page_request_id,
const content::MediaStreamDevice& device,
content::MediaRequestState state) {
FOR_EACH_OBSERVER(Observer, observers_,
OnRequestUpdate(render_process_id,
render_view_id,
page_request_id,
device,
state));
}

View File

@ -35,6 +35,7 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
virtual void OnRequestUpdate(
int render_process_id,
int render_view_id,
int page_request_id,
const content::MediaStreamDevice& device,
const content::MediaRequestState state) {}
@ -78,15 +79,20 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
virtual void OnVideoCaptureDevicesChanged(
const content::MediaStreamDevices& devices) OVERRIDE;
virtual void OnMediaRequestStateChanged(
int render_process_id,
int render_view_id,
const content::MediaStreamDevice& device,
int render_process_id,
int render_view_id,
int page_request_id,
const content::MediaStreamDevice& device,
content::MediaRequestState state) OVERRIDE;
virtual void OnAudioStreamPlayingChanged(
int render_process_id,
int render_view_id,
int stream_id,
bool playing) OVERRIDE;
int render_process_id,
int render_view_id,
int stream_id,
bool is_playing,
float power_dbfs,
bool clipped) OVERRIDE;
virtual void OnCreatingAudioStream(int render_process_id,
int render_view_id) OVERRIDE;
private:
friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>;
@ -100,6 +106,7 @@ class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
void UpdateMediaRequestStateOnUIThread(
int render_process_id,
int render_view_id,
int page_request_id,
const content::MediaStreamDevice& device,
content::MediaRequestState state);

View File

@ -5,7 +5,7 @@
#include "libcef/browser/menu_creator_runner_mac.h"
#include "libcef/browser/browser_host_impl.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "base/compiler_specific.h"
#import "base/mac/scoped_sending_event.h"
#include "content/public/browser/web_contents_view.h"

View File

@ -5,7 +5,7 @@
#include "libcef/browser/menu_creator_runner_win.h"
#include "libcef/browser/browser_host_impl.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "content/public/browser/web_contents_view.h"
#include "ui/gfx/point.h"
#include "ui/views/controls/menu/menu_2.h"

View File

@ -9,7 +9,7 @@
#include "base/bind.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "ui/base/accelerators/accelerator.h"
namespace {

View File

@ -12,9 +12,9 @@
#include "content/public/browser/global_request_id.h"
#include "content/public/common/page_transition_types.h"
#include "content/public/common/referrer.h"
#include "googleurl/src/gurl.h"
#include "net/base/upload_data.h"
#include "ui/base/window_open_disposition.h"
#include "url/gurl.h"
// Parameters that tell CefBrowserHostImpl::Navigate() what to do.
struct CefNavigateParams {

View File

@ -16,7 +16,7 @@
#include "base/lazy_instance.h"
#include "base/synchronization/lock.h"
#include "content/public/browser/render_process_host.h"
#include "googleurl/src/gurl.h"
#include "url/gurl.h"
namespace {

View File

@ -8,7 +8,7 @@
#include "libcef/browser/render_widget_host_view_osr.h"
#include "libcef/common/content_client.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "content/browser/renderer_host/render_widget_host_impl.h"
#include "content/public/browser/content_browser_client.h"
#include "content/public/browser/render_view_host.h"
@ -165,7 +165,7 @@ void CefRenderWidgetHostViewOSR::WasHidden() {
void CefRenderWidgetHostViewOSR::MovePluginWindows(
const gfx::Vector2d& scroll_offset,
const std::vector<webkit::npapi::WebPluginGeometry>& moves) {
const std::vector<content::WebPluginGeometry>& moves) {
}
void CefRenderWidgetHostViewOSR::Focus() {
@ -206,7 +206,8 @@ void CefRenderWidgetHostViewOSR::SetIsLoading(bool is_loading) {
#if !defined(OS_MACOSX)
void CefRenderWidgetHostViewOSR::TextInputTypeChanged(
ui::TextInputType type,
bool can_compose_inline) {
bool can_compose_inline,
ui::TextInputMode mode) {
}
void CefRenderWidgetHostViewOSR::ImeCancelComposition() {
@ -232,7 +233,7 @@ void CefRenderWidgetHostViewOSR::DidUpdateBackingStore(
}
}
void CefRenderWidgetHostViewOSR::RenderViewGone(
void CefRenderWidgetHostViewOSR::RenderProcessGone(
base::TerminationStatus status,
int error_code) {
render_widget_host_ = NULL;

View File

@ -113,13 +113,14 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase {
virtual void WasHidden() OVERRIDE;
virtual void MovePluginWindows(
const gfx::Vector2d& scroll_offset,
const std::vector<webkit::npapi::WebPluginGeometry>& moves) OVERRIDE;
const std::vector<content::WebPluginGeometry>& moves) OVERRIDE;
virtual void Focus() OVERRIDE;
virtual void Blur() OVERRIDE;
virtual void UpdateCursor(const WebCursor& cursor) OVERRIDE;
virtual void SetIsLoading(bool is_loading) OVERRIDE;
virtual void TextInputTypeChanged(ui::TextInputType type,
bool can_compose_inline) OVERRIDE;
bool can_compose_inline,
ui::TextInputMode mode) OVERRIDE;
virtual void ImeCancelComposition() OVERRIDE;
virtual void ImeCompositionRangeChanged(
const ui::Range& range,
@ -129,7 +130,7 @@ class CefRenderWidgetHostViewOSR : public content::RenderWidgetHostViewBase {
const gfx::Vector2d& scroll_delta,
const std::vector<gfx::Rect>& copy_rects,
const ui::LatencyInfo& latency_info) OVERRIDE;
virtual void RenderViewGone(base::TerminationStatus status,
virtual void RenderProcessGone(base::TerminationStatus status,
int error_code) OVERRIDE;
#if defined(OS_WIN) && !defined(USE_AURA)
virtual void WillWmDestroy() OVERRIDE;

View File

@ -76,7 +76,8 @@ void CefRenderWidgetHostViewOSR::ImeCancelComposition() {
void CefRenderWidgetHostViewOSR::TextInputTypeChanged(
ui::TextInputType type,
bool can_compose_inline) {
bool can_compose_inline,
ui::TextInputMode mode) {
[NSApp updateWindows];
}

View File

@ -9,7 +9,7 @@
#include "include/cef_frame.h"
#include "content/public/browser/content_browser_client.h"
#include "googleurl/src/gurl.h"
#include "url/gurl.h"
namespace net {
class FtpTransactionFactory;

View File

@ -21,10 +21,9 @@
#include "base/bind.h"
#include "base/lazy_instance.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/string_util.h"
#include "base/synchronization/lock.h"
#include "googleurl/src/url_util.h"
#include "net/base/completion_callback.h"
#include "net/base/io_buffer.h"
#include "net/base/upload_data.h"
@ -36,6 +35,7 @@
#include "net/url_request/url_request_http_job.h"
#include "net/url_request/url_request_job.h"
#include "net/url_request/url_request_job_factory_impl.h"
#include "url/url_util.h"
using net::URLRequestStatus;

View File

@ -1,217 +1,228 @@
// Copyright (c) 2012 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 "libcef/browser/speech_recognition_manager_delegate.h"
#include <set>
#include <string>
#include "base/bind.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/speech_recognition_manager.h"
#include "content/public/browser/speech_recognition_session_context.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/speech_recognition_error.h"
#include "content/public/common/speech_recognition_result.h"
using content::BrowserThread;
using content::SpeechRecognitionManager;
using content::WebContents;
// Simple utility to get notified when a WebContents is closed or crashes.
// Both the callback site and the callback thread are passed by the caller in
// the constructor. There is no restriction on the constructor, however this
// class must be destroyed on the UI thread, due to the NotificationRegistrar
// dependency.
class CefSpeechRecognitionManagerDelegate::WebContentsWatcher
: public base::RefCountedThreadSafe<WebContentsWatcher>,
public content::NotificationObserver {
public:
typedef base::Callback<void(int render_process_id, int render_view_id)>
WebContentsClosedCallback;
WebContentsWatcher(WebContentsClosedCallback web_contents_closed_callback,
BrowserThread::ID callback_thread)
: web_contents_closed_callback_(web_contents_closed_callback),
callback_thread_(callback_thread) {
}
// Starts monitoring the WebContents corresponding to the given
// |render_process_id|, |render_view_id| pair, invoking
// |web_contents_closed_callback_| if closed/unloaded.
void Watch(int render_process_id, int render_view_id) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
&WebContentsWatcher::Watch, this, render_process_id, render_view_id));
return;
}
WebContents* web_contents = NULL;
// Copyright (c) 2012 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 "libcef/browser/speech_recognition_manager_delegate.h"
#include <set>
#include <string>
#include "libcef/common/cef_switches.h"
#include "base/bind.h"
#include "base/command_line.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_observer.h"
#include "content/public/browser/notification_registrar.h"
#include "content/public/browser/notification_source.h"
#include "content/public/browser/notification_types.h"
#include "content/public/browser/render_process_host.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/speech_recognition_manager.h"
#include "content/public/browser/speech_recognition_session_context.h"
#include "content/public/browser/web_contents.h"
#include "content/public/common/speech_recognition_error.h"
#include "content/public/common/speech_recognition_result.h"
using content::BrowserThread;
using content::SpeechRecognitionManager;
using content::WebContents;
// Simple utility to get notified when a WebContents is closed or crashes.
// Both the callback site and the callback thread are passed by the caller in
// the constructor. There is no restriction on the constructor, however this
// class must be destroyed on the UI thread, due to the NotificationRegistrar
// dependency.
class CefSpeechRecognitionManagerDelegate::WebContentsWatcher
: public base::RefCountedThreadSafe<WebContentsWatcher>,
public content::NotificationObserver {
public:
typedef base::Callback<void(int render_process_id, int render_view_id)>
WebContentsClosedCallback;
WebContentsWatcher(WebContentsClosedCallback web_contents_closed_callback,
BrowserThread::ID callback_thread)
: web_contents_closed_callback_(web_contents_closed_callback),
callback_thread_(callback_thread) {
}
// Starts monitoring the WebContents corresponding to the given
// |render_process_id|, |render_view_id| pair, invoking
// |web_contents_closed_callback_| if closed/unloaded.
void Watch(int render_process_id, int render_view_id) {
if (!BrowserThread::CurrentlyOn(BrowserThread::UI)) {
BrowserThread::PostTask(BrowserThread::UI, FROM_HERE, base::Bind(
&WebContentsWatcher::Watch, this, render_process_id, render_view_id));
return;
}
WebContents* web_contents = NULL;
content::RenderViewHost* render_view_host =
content::RenderViewHost::FromID(render_process_id, render_view_id);
if (render_view_host)
web_contents = WebContents::FromRenderViewHost(render_view_host);
DCHECK(web_contents);
// Avoid multiple registrations on |registrar_| for the same |web_contents|.
if (registered_web_contents_.find(web_contents) !=
registered_web_contents_.end()) {
return;
}
registered_web_contents_.insert(web_contents);
// Lazy initialize the registrar.
if (!registrar_.get())
registrar_.reset(new content::NotificationRegistrar());
registrar_->Add(this,
content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
content::Source<WebContents>(web_contents));
}
// content::NotificationObserver implementation.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type);
WebContents* web_contents = content::Source<WebContents>(source).ptr();
int render_process_id = web_contents->GetRenderProcessHost()->GetID();
int render_view_id = web_contents->GetRenderViewHost()->GetRoutingID();
registrar_->Remove(this,
content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
content::Source<WebContents>(web_contents));
registered_web_contents_.erase(web_contents);
BrowserThread::PostTask(callback_thread_, FROM_HERE, base::Bind(
web_contents_closed_callback_, render_process_id, render_view_id));
}
private:
friend class base::RefCountedThreadSafe<WebContentsWatcher>;
virtual ~WebContentsWatcher() {
// Must be destroyed on the UI thread due to |registrar_| non thread-safety.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
// Lazy-initialized and used on the UI thread to handle web contents
// notifications (tab closing).
scoped_ptr<content::NotificationRegistrar> registrar_;
// Keeps track of which WebContent(s) have been registered, in order to avoid
// double registrations on |registrar_|
std::set<content::WebContents*> registered_web_contents_;
// Callback used to notify, on the thread specified by |callback_thread_| the
// closure of a registered tab.
WebContentsClosedCallback web_contents_closed_callback_;
content::BrowserThread::ID callback_thread_;
DISALLOW_COPY_AND_ASSIGN(WebContentsWatcher);
};
CefSpeechRecognitionManagerDelegate
::CefSpeechRecognitionManagerDelegate() {
}
CefSpeechRecognitionManagerDelegate
::~CefSpeechRecognitionManagerDelegate() {
}
void CefSpeechRecognitionManagerDelegate::WebContentsClosedCallback(
int render_process_id, int render_view_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
SpeechRecognitionManager* manager = SpeechRecognitionManager::GetInstance();
// |manager| becomes NULL if a browser shutdown happens between the post of
// this task (from the UI thread) and this call (on the IO thread). In this
// case we just return.
if (!manager)
return;
manager->AbortAllSessionsForRenderView(render_process_id, render_view_id);
}
void CefSpeechRecognitionManagerDelegate::OnRecognitionStart(
int session_id) {
const content::SpeechRecognitionSessionContext& context =
SpeechRecognitionManager::GetInstance()->GetSessionContext(session_id);
// Register callback to auto abort session on tab closure.
// |web_contents_watcher_| is lazyly istantiated on the first call.
if (!web_contents_watcher_.get()) {
web_contents_watcher_ = new WebContentsWatcher(
base::Bind(
&CefSpeechRecognitionManagerDelegate::WebContentsClosedCallback,
base::Unretained(this)),
BrowserThread::IO);
}
web_contents_watcher_->Watch(context.render_process_id,
context.render_view_id);
}
void CefSpeechRecognitionManagerDelegate::OnAudioStart(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnEnvironmentEstimationComplete(
int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnSoundStart(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnSoundEnd(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnAudioEnd(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnRecognitionResults(
int session_id, const content::SpeechRecognitionResults& result) {
}
void CefSpeechRecognitionManagerDelegate::OnRecognitionError(
int session_id, const content::SpeechRecognitionError& error) {
}
void CefSpeechRecognitionManagerDelegate::OnAudioLevelsChange(
int session_id, float volume, float noise_volume) {
}
void CefSpeechRecognitionManagerDelegate::OnRecognitionEnd(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::GetDiagnosticInformation(
bool* can_report_metrics,
std::string* hardware_info) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
void CefSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
int session_id,
base::Callback<void(bool ask_user, bool is_allowed)> callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
const content::SpeechRecognitionSessionContext& context =
SpeechRecognitionManager::GetInstance()->GetSessionContext(session_id);
// Make sure that initiators properly set the |render_process_id| field.
DCHECK_NE(context.render_process_id, 0);
callback.Run(false, true);
}
content::SpeechRecognitionEventListener*
CefSpeechRecognitionManagerDelegate::GetEventListener() {
return this;
}
web_contents = WebContents::FromRenderViewHost(render_view_host);
DCHECK(web_contents);
// Avoid multiple registrations on |registrar_| for the same |web_contents|.
if (registered_web_contents_.find(web_contents) !=
registered_web_contents_.end()) {
return;
}
registered_web_contents_.insert(web_contents);
// Lazy initialize the registrar.
if (!registrar_.get())
registrar_.reset(new content::NotificationRegistrar());
registrar_->Add(this,
content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
content::Source<WebContents>(web_contents));
}
// content::NotificationObserver implementation.
virtual void Observe(int type,
const content::NotificationSource& source,
const content::NotificationDetails& details) OVERRIDE {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK_EQ(content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED, type);
WebContents* web_contents = content::Source<WebContents>(source).ptr();
int render_process_id = web_contents->GetRenderProcessHost()->GetID();
int render_view_id = web_contents->GetRenderViewHost()->GetRoutingID();
registrar_->Remove(this,
content::NOTIFICATION_WEB_CONTENTS_DISCONNECTED,
content::Source<WebContents>(web_contents));
registered_web_contents_.erase(web_contents);
BrowserThread::PostTask(callback_thread_, FROM_HERE, base::Bind(
web_contents_closed_callback_, render_process_id, render_view_id));
}
private:
friend class base::RefCountedThreadSafe<WebContentsWatcher>;
virtual ~WebContentsWatcher() {
// Must be destroyed on the UI thread due to |registrar_| non thread-safety.
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
}
// Lazy-initialized and used on the UI thread to handle web contents
// notifications (tab closing).
scoped_ptr<content::NotificationRegistrar> registrar_;
// Keeps track of which WebContent(s) have been registered, in order to avoid
// double registrations on |registrar_|
std::set<content::WebContents*> registered_web_contents_;
// Callback used to notify, on the thread specified by |callback_thread_| the
// closure of a registered tab.
WebContentsClosedCallback web_contents_closed_callback_;
content::BrowserThread::ID callback_thread_;
DISALLOW_COPY_AND_ASSIGN(WebContentsWatcher);
};
CefSpeechRecognitionManagerDelegate
::CefSpeechRecognitionManagerDelegate() {
const CommandLine& command_line = *CommandLine::ForCurrentProcess();
filter_profanities_ =
command_line.HasSwitch(switches::kEnableProfanityFilter);
}
CefSpeechRecognitionManagerDelegate
::~CefSpeechRecognitionManagerDelegate() {
}
void CefSpeechRecognitionManagerDelegate::WebContentsClosedCallback(
int render_process_id, int render_view_id) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
SpeechRecognitionManager* manager = SpeechRecognitionManager::GetInstance();
// |manager| becomes NULL if a browser shutdown happens between the post of
// this task (from the UI thread) and this call (on the IO thread). In this
// case we just return.
if (!manager)
return;
manager->AbortAllSessionsForRenderView(render_process_id, render_view_id);
}
void CefSpeechRecognitionManagerDelegate::OnRecognitionStart(
int session_id) {
const content::SpeechRecognitionSessionContext& context =
SpeechRecognitionManager::GetInstance()->GetSessionContext(session_id);
// Register callback to auto abort session on tab closure.
// |web_contents_watcher_| is lazyly istantiated on the first call.
if (!web_contents_watcher_.get()) {
web_contents_watcher_ = new WebContentsWatcher(
base::Bind(
&CefSpeechRecognitionManagerDelegate::WebContentsClosedCallback,
base::Unretained(this)),
BrowserThread::IO);
}
web_contents_watcher_->Watch(context.render_process_id,
context.render_view_id);
}
void CefSpeechRecognitionManagerDelegate::OnAudioStart(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnEnvironmentEstimationComplete(
int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnSoundStart(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnSoundEnd(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnAudioEnd(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::OnRecognitionResults(
int session_id, const content::SpeechRecognitionResults& result) {
}
void CefSpeechRecognitionManagerDelegate::OnRecognitionError(
int session_id, const content::SpeechRecognitionError& error) {
}
void CefSpeechRecognitionManagerDelegate::OnAudioLevelsChange(
int session_id, float volume, float noise_volume) {
}
void CefSpeechRecognitionManagerDelegate::OnRecognitionEnd(int session_id) {
}
void CefSpeechRecognitionManagerDelegate::GetDiagnosticInformation(
bool* can_report_metrics,
std::string* hardware_info) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
void CefSpeechRecognitionManagerDelegate::CheckRecognitionIsAllowed(
int session_id,
base::Callback<void(bool ask_user, bool is_allowed)> callback) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
const content::SpeechRecognitionSessionContext& context =
SpeechRecognitionManager::GetInstance()->GetSessionContext(session_id);
// Make sure that initiators properly set the |render_process_id| field.
DCHECK_NE(context.render_process_id, 0);
callback.Run(false, true);
}
content::SpeechRecognitionEventListener*
CefSpeechRecognitionManagerDelegate::GetEventListener() {
return this;
}
bool CefSpeechRecognitionManagerDelegate::FilterProfanities(
int render_process_id) {
return filter_profanities_;
}

View File

@ -45,6 +45,7 @@ class CefSpeechRecognitionManagerDelegate
int session_id,
base::Callback<void(bool ask_user, bool is_allowed)> callback) OVERRIDE;
virtual content::SpeechRecognitionEventListener* GetEventListener() OVERRIDE;
virtual bool FilterProfanities(int render_process_id) OVERRIDE;
private:
class WebContentsWatcher;
@ -54,6 +55,7 @@ class CefSpeechRecognitionManagerDelegate
void WebContentsClosedCallback(int render_process_id, int render_view_id);
scoped_refptr<WebContentsWatcher> web_contents_watcher_;
bool filter_profanities_;
DISALLOW_COPY_AND_ASSIGN(CefSpeechRecognitionManagerDelegate);
};

View File

@ -9,7 +9,7 @@
#include "libcef/browser/thread_util.h"
#include "base/debug/trace_event.h"
#include "base/time.h"
#include "base/time/time.h"
bool CefBeginTracing(CefRefPtr<CefTraceClient> client,
const CefString& categories) {

View File

@ -130,7 +130,9 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
std::string(),
false,
false));
storage_->set_http_server_properties(new net::HttpServerPropertiesImpl);
storage_->set_http_server_properties(
make_scoped_ptr<net::HttpServerProperties>(
new net::HttpServerPropertiesImpl));
net::HttpCache::DefaultBackend* main_backend =
new net::HttpCache::DefaultBackend(
@ -216,7 +218,7 @@ void CefURLRequestContextGetter::SetCookieStoragePath(
// TODO(cef): Move directory creation to the blocking pool instead of
// allowing file IO on this thread.
base::ThreadRestrictions::ScopedAllowIO allow_io;
if (file_util::DirectoryExists(path) ||
if (base::DirectoryExists(path) ||
file_util::CreateDirectory(path)) {
const base::FilePath& cookie_path = path.AppendASCII("Cookies");
persistent_store =

View File

@ -95,7 +95,7 @@ void CefWebContentsViewOSR::StoreFocus() {
void CefWebContentsViewOSR::RestoreFocus() {
}
WebDropData* CefWebContentsViewOSR::GetDropData() const {
content::DropData* CefWebContentsViewOSR::GetDropData() const {
return NULL;
}
@ -121,7 +121,8 @@ bool CefWebContentsViewOSR::GetAllowOverlappingViews() const {
// RenderViewHostDelegateView methods.
void CefWebContentsViewOSR::StartDragging(const WebDropData& drop_data,
void CefWebContentsViewOSR::StartDragging(
const content::DropData& drop_data,
WebKit::WebDragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset,
@ -130,11 +131,12 @@ void CefWebContentsViewOSR::StartDragging(const WebDropData& drop_data,
web_contents_->SystemDragEnded();
}
void CefWebContentsViewOSR::ShowPopupMenu(const gfx::Rect& bounds,
void CefWebContentsViewOSR::ShowPopupMenu(
const gfx::Rect& bounds,
int item_height,
double item_font_size,
int selected_item,
const std::vector<WebMenuItem>& items,
const std::vector<content::MenuItem>& items,
bool right_aligned,
bool allow_multiple_selection) {
}

View File

@ -48,7 +48,7 @@ class CefWebContentsViewOSR : public content::WebContentsViewPort,
virtual void SetInitialFocus() OVERRIDE;
virtual void StoreFocus() OVERRIDE;
virtual void RestoreFocus() OVERRIDE;
virtual WebDropData* GetDropData() const OVERRIDE;
virtual content::DropData* GetDropData() const OVERRIDE;
virtual gfx::Rect GetViewBounds() const OVERRIDE;
#if defined(OS_MACOSX)
virtual bool IsEventTracking() const OVERRIDE;
@ -58,16 +58,18 @@ class CefWebContentsViewOSR : public content::WebContentsViewPort,
#endif
// RenderViewHostDelegateView methods.
virtual void StartDragging(const WebDropData& drop_data,
virtual void StartDragging(
const content::DropData& drop_data,
WebKit::WebDragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset,
const content::DragEventSourceInfo& event_info) OVERRIDE;
virtual void ShowPopupMenu(const gfx::Rect& bounds,
virtual void ShowPopupMenu(
const gfx::Rect& bounds,
int item_height,
double item_font_size,
int selected_item,
const std::vector<WebMenuItem>& items,
const std::vector<content::MenuItem>& items,
bool right_aligned,
bool allow_multiple_selection) OVERRIDE;

View File

@ -14,13 +14,13 @@ namespace {
void PluginsCallbackImpl(
CefRefPtr<CefWebPluginInfoVisitor> visitor,
const std::vector<webkit::WebPluginInfo>& all_plugins) {
const std::vector<content::WebPluginInfo>& all_plugins) {
CEF_REQUIRE_UIT();
int count = 0;
int total = static_cast<int>(all_plugins.size());
std::vector<webkit::WebPluginInfo>::const_iterator it = all_plugins.begin();
std::vector<content::WebPluginInfo>::const_iterator it = all_plugins.begin();
for (; it != all_plugins.end(); ++it, ++count) {
CefRefPtr<CefWebPluginInfoImpl> info(new CefWebPluginInfoImpl(*it));
if (!visitor->Visit(info.get(), count, total))
@ -34,7 +34,7 @@ void PluginsCallbackImpl(
// CefWebPluginInfoImpl
CefWebPluginInfoImpl::CefWebPluginInfoImpl(
const webkit::WebPluginInfo& plugin_info)
const content::WebPluginInfo& plugin_info)
: plugin_info_(plugin_info) {
}

View File

@ -7,11 +7,11 @@
#pragma once
#include "include/cef_web_plugin.h"
#include "webkit/plugins/webplugininfo.h"
#include "content/public/common/webplugininfo.h"
class CefWebPluginInfoImpl : public CefWebPluginInfo {
public:
explicit CefWebPluginInfoImpl(const webkit::WebPluginInfo& plugin_info);
explicit CefWebPluginInfoImpl(const content::WebPluginInfo& plugin_info);
virtual CefString GetName() OVERRIDE;
virtual CefString GetPath() OVERRIDE;
@ -19,7 +19,7 @@ class CefWebPluginInfoImpl : public CefWebPluginInfo {
virtual CefString GetDescription() OVERRIDE;
private:
webkit::WebPluginInfo plugin_info_;
content::WebPluginInfo plugin_info_;
IMPLEMENT_REFCOUNTING(CefWebPluginInfoImpl);
};

View File

@ -6,7 +6,7 @@
// IPC messages for CEF.
// Multiply-included message file, hence no include guard.
#include "base/shared_memory.h"
#include "base/memory/shared_memory.h"
#include "base/values.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/referrer.h"

View File

@ -5,7 +5,7 @@
#include "libcef/common/drag_data_impl.h"
#include "base/files/file_path.h"
CefDragDataImpl::CefDragDataImpl(const WebDropData& data)
CefDragDataImpl::CefDragDataImpl(const content::DropData& data)
: data_(data) {
}
@ -54,7 +54,7 @@ bool CefDragDataImpl::GetFileNames(std::vector<CefString>& names) {
if (data_.filenames.empty())
return false;
std::vector<WebDropData::FileInfo>::const_iterator it =
std::vector<content::DropData::FileInfo>::const_iterator it =
data_.filenames.begin();
for (; it != data_.filenames.end(); ++it)
names.push_back(it->path);

View File

@ -9,12 +9,12 @@
#include <vector>
#include "include/cef_drag_data.h"
#include "webkit/common/webdropdata.h"
#include "content/public/common/drop_data.h"
// Implementation of CefDragData.
class CefDragDataImpl : public CefDragData {
public:
explicit CefDragDataImpl(const WebDropData& data);
explicit CefDragDataImpl(const content::DropData& data);
virtual bool IsLink();
virtual bool IsFragment();
@ -29,7 +29,7 @@ class CefDragDataImpl : public CefDragData {
virtual bool GetFileNames(std::vector<CefString>& names);
protected:
WebDropData data_;
content::DropData data_;
IMPLEMENT_REFCOUNTING(CefDragDataImpl);
};

View File

@ -445,14 +445,14 @@ void CefMainDelegate::InitializeResourceBundle() {
content_client_.set_allow_pack_file_load(true);
if (file_util::PathExists(cef_pak_file)) {
if (base::PathExists(cef_pak_file)) {
ResourceBundle::GetSharedInstance().AddDataPackFromPath(
cef_pak_file, ui::SCALE_FACTOR_NONE);
} else {
NOTREACHED() << "Could not load cef.pak";
}
if (file_util::PathExists(devtools_pak_file)) {
if (base::PathExists(devtools_pak_file)) {
ResourceBundle::GetSharedInstance().AddDataPackFromPath(
devtools_pak_file, ui::SCALE_FACTOR_NONE);
}

View File

@ -9,7 +9,7 @@
#include "base/bind.h"
#include "base/location.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "base/message_loop/message_loop_proxy.h"
#include "content/public/browser/browser_thread.h"

View File

@ -7,7 +7,7 @@
#pragma once
#include "include/internal/cef_time.h"
#include "base/time.h"
#include "base/time/time.h"
// Converts cef_time_t to/from a base::Time object.
void cef_time_to_basetime(const cef_time_t& cef_time, base::Time& time);

View File

@ -4,7 +4,7 @@
#include <sstream>
#include "include/cef_url.h"
#include "googleurl/src/gurl.h"
#include "url/gurl.h"
bool CefParseURL(const CefString& url,
CefURLParts& parts) {

View File

@ -8,7 +8,7 @@
#include "libcef/renderer/render_urlrequest_impl.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "content/public/common/content_client.h"
// static

View File

@ -34,7 +34,6 @@
#include "third_party/WebKit/public/web/WebScriptSource.h"
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "webkit/base/file_path_string_conversions.h"
#include "webkit/glue/webkit_glue.h"
using WebKit::WebFrame;
@ -48,6 +47,15 @@ namespace {
const int64 kInvalidBrowserId = -1;
const int64 kInvalidFrameId = -1;
WebKit::WebString FilePathStringToWebString(
const base::FilePath::StringType& str) {
#if defined(OS_POSIX)
return WideToUTF16Hack(base::SysNativeMBToWide(str));
#elif defined(OS_WIN)
return WideToUTF16Hack(str);
#endif
}
} // namespace
@ -78,25 +86,25 @@ CefRefPtr<CefBrowserHost> CefBrowserImpl::GetHost() {
bool CefBrowserImpl::CanGoBack() {
CEF_REQUIRE_RT_RETURN(false);
return webkit_glue::CanGoBackOrForward(render_view()->GetWebView(), -1);
return webkit_glue::CanGoBack(render_view()->GetWebView());
}
void CefBrowserImpl::GoBack() {
CEF_REQUIRE_RT_RETURN_VOID();
webkit_glue::GoBackOrForward(render_view()->GetWebView(), -1);
webkit_glue::GoBack(render_view()->GetWebView());
}
bool CefBrowserImpl::CanGoForward() {
CEF_REQUIRE_RT_RETURN(false);
return webkit_glue::CanGoBackOrForward(render_view()->GetWebView(), 1);
return webkit_glue::CanGoForward(render_view()->GetWebView());
}
void CefBrowserImpl::GoForward() {
CEF_REQUIRE_RT_RETURN_VOID();
webkit_glue::GoBackOrForward(render_view()->GetWebView(), 1);
webkit_glue::GoForward(render_view()->GetWebView());
}
bool CefBrowserImpl::IsLoading() {
@ -334,7 +342,7 @@ void CefBrowserImpl::LoadRequest(const CefMsg_LoadRequest_Params& params) {
data.assign(element.bytes(), element.bytes_length());
body.appendData(data);
} else if (element.type() == net::UploadElement::TYPE_FILE) {
body.appendFile(webkit_base::FilePathToWebString(element.file_path()));
body.appendFile(FilePathStringToWebString(element.file_path().value()));
} else {
NOTREACHED();
}

View File

@ -469,7 +469,7 @@ bool CefContentRendererClient::OverrideCreatePlugin(
content::RenderViewImpl* render_view_impl =
static_cast<content::RenderViewImpl*>(render_view);
webkit::WebPluginInfo info;
content::WebPluginInfo info;
std::string mime_type;
bool found = render_view_impl->GetPluginInfo(params.url,
frame->top()->document().url(),

View File

@ -16,7 +16,7 @@
#include "base/compiler_specific.h"
#include "base/memory/scoped_ptr.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "base/sequenced_task_runner.h"
#include "content/public/renderer/content_renderer_client.h"

View File

@ -8,12 +8,12 @@
#include "libcef/common/cef_messages.h"
#include "base/bind.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "content/common/devtools_messages.h"
#include "googleurl/src/gurl.h"
#include "googleurl/src/url_util.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
#include "url/gurl.h"
#include "url/url_util.h"
CefRenderMessageFilter::CefRenderMessageFilter()
: channel_(NULL) {

View File

@ -7,7 +7,7 @@
#include "libcef/common/response_impl.h"
#include "base/logging.h"
#include "base/message_loop.h"
#include "base/message_loop/message_loop.h"
#include "third_party/WebKit/public/platform/Platform.h"
#include "third_party/WebKit/public/platform/WebString.h"
#include "third_party/WebKit/public/platform/WebURL.h"

View File

@ -11,7 +11,7 @@
#include "config.h"
MSVC_PUSH_WARNING_LEVEL(0);
#include "core/page/Frame.h"
#include "core/workers//WorkerContext.h"
#include "core/workers/WorkerGlobalScope.h"
#include "bindings/v8/ScriptController.h"
#include "bindings/v8/V8Binding.h"
#include "bindings/v8/V8RecursionScope.h"
@ -32,10 +32,10 @@ MSVC_POP_WARNING();
#include "base/lazy_instance.h"
#include "base/strings/string_number_conversions.h"
#include "base/threading/thread_local.h"
#include "googleurl/src/gurl.h"
#include "third_party/WebKit/public/web/WebKit.h"
#include "third_party/WebKit/public/web/WebFrame.h"
#include "third_party/WebKit/public/web/WebScriptController.h"
#include "url/gurl.h"
namespace {
@ -472,40 +472,45 @@ void GetCefString(v8::Handle<v8::String> str, CefString& out) {
}
// V8 function callback.
v8::Handle<v8::Value> FunctionCallbackImpl(const v8::Arguments& args) {
void FunctionCallbackImpl(const v8::FunctionCallbackInfo<v8::Value>& info) {
WebCore::V8RecursionScope recursion_scope(
WebCore::toScriptExecutionContext(v8::Context::GetCurrent()));
CefV8Handler* handler =
static_cast<CefV8Handler*>(v8::External::Cast(*args.Data())->Value());
static_cast<CefV8Handler*>(v8::External::Cast(*info.Data())->Value());
CefV8ValueList params;
for (int i = 0; i < args.Length(); i++)
params.push_back(new CefV8ValueImpl(args[i]));
for (int i = 0; i < info.Length(); i++)
params.push_back(new CefV8ValueImpl(info[i]));
CefString func_name;
GetCefString(v8::Handle<v8::String>::Cast(args.Callee()->GetName()),
GetCefString(v8::Handle<v8::String>::Cast(info.Callee()->GetName()),
func_name);
CefRefPtr<CefV8Value> object = new CefV8ValueImpl(args.This());
CefRefPtr<CefV8Value> object = new CefV8ValueImpl(info.This());
CefRefPtr<CefV8Value> retval;
CefString exception;
if (handler->Execute(func_name, object, params, retval, exception)) {
if (!exception.empty()) {
return v8::ThrowException(v8::Exception::Error(GetV8String(exception)));
info.GetReturnValue().Set(
v8::ThrowException(v8::Exception::Error(GetV8String(exception))));
return;
} else {
CefV8ValueImpl* rv = static_cast<CefV8ValueImpl*>(retval.get());
if (rv && rv->IsValid())
return rv->GetV8Value(true);
if (rv && rv->IsValid()) {
info.GetReturnValue().Set(rv->GetV8Value(true));
return;
}
}
}
return v8::Undefined();
info.GetReturnValue().SetUndefined();
}
// V8 Accessor callbacks
v8::Handle<v8::Value> AccessorGetterCallbackImpl(v8::Local<v8::String> property,
const v8::AccessorInfo& info) {
void AccessorGetterCallbackImpl(
v8::Local<v8::String> property,
const v8::PropertyCallbackInfo<v8::Value>& info) {
WebCore::V8RecursionScope recursion_scope(
WebCore::toScriptExecutionContext(v8::Context::GetCurrent()));
@ -524,22 +529,26 @@ v8::Handle<v8::Value> AccessorGetterCallbackImpl(v8::Local<v8::String> property,
GetCefString(property, name);
if (accessorPtr->Get(name, object, retval, exception)) {
if (!exception.empty()) {
return v8::ThrowException(
v8::Exception::Error(GetV8String(exception)));
info.GetReturnValue().Set(
v8::ThrowException(v8::Exception::Error(GetV8String(exception))));
return;
} else {
CefV8ValueImpl* rv = static_cast<CefV8ValueImpl*>(retval.get());
if (rv && rv->IsValid())
return rv->GetV8Value(true);
if (rv && rv->IsValid()) {
info.GetReturnValue().Set(rv->GetV8Value(true));
return;
}
}
}
}
return v8::Undefined();
return info.GetReturnValue().SetUndefined();
}
void AccessorSetterCallbackImpl(v8::Local<v8::String> property,
v8::Local<v8::Value> value,
const v8::AccessorInfo& info) {
void AccessorSetterCallbackImpl(
v8::Local<v8::String> property,
v8::Local<v8::Value> value,
const v8::PropertyCallbackInfo<void>& info) {
WebCore::V8RecursionScope recursion_scope(
WebCore::toScriptExecutionContext(v8::Context::GetCurrent()));
@ -586,7 +595,7 @@ v8::Local<v8::Value> CallV8Function(v8::Handle<v8::Context> context,
DCHECK(controller);
if (controller) {
func_rv = WebCore::ScriptController::callFunctionWithInstrumentation(
controller->workerContext()->scriptExecutionContext(),
controller->workerGlobalScope()->scriptExecutionContext(),
function, receiver, argc, args);
}
}
@ -1673,9 +1682,10 @@ bool CefV8ValueImpl::SetValue(const CefString& key, AccessControl settings,
if (!accessorPtr.get())
return false;
v8::AccessorGetter getter = AccessorGetterCallbackImpl;
v8::AccessorSetter setter = (attribute & V8_PROPERTY_ATTRIBUTE_READONLY) ?
NULL : AccessorSetterCallbackImpl;
v8::AccessorGetterCallback getter = AccessorGetterCallbackImpl;
v8::AccessorSetterCallback setter =
(attribute & V8_PROPERTY_ATTRIBUTE_READONLY) ?
NULL : AccessorSetterCallbackImpl;
v8::TryCatch try_catch;
try_catch.SetVerbose(true);

View File

@ -14,31 +14,43 @@ MSVC_PUSH_WARNING_LEVEL(0);
#include "bindings/v8/ScriptController.h"
#include "core/history/BackForwardController.h"
#include "core/page/Page.h"
#include "third_party/WebKit/Source/WebKit/chromium/src/WebFrameImpl.h"
#include "third_party/WebKit/Source/WebKit/chromium/src/WebViewImpl.h"
#include "third_party/WebKit/Source/web/WebFrameImpl.h"
#include "third_party/WebKit/Source/web/WebViewImpl.h"
MSVC_POP_WARNING();
#undef LOG
namespace webkit_glue {
bool CanGoBackOrForward(WebKit::WebView* view, int distance) {
bool CanGoBack(WebKit::WebView* view) {
if (!view)
return false;
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
if (distance == 0)
return true;
if (distance > 0 && distance <= impl->page()->backForward()->forwardCount())
return true;
if (distance < 0 && -distance <= impl->page()->backForward()->backCount())
return true;
return false;
return (impl->page()->backForward()->backCount() > 0);
}
void GoBackOrForward(WebKit::WebView* view, int distance) {
bool CanGoForward(WebKit::WebView* view) {
if (!view)
return false;
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
return (impl->page()->backForward()->forwardCount() > 0);
}
void GoBack(WebKit::WebView* view) {
if (!view)
return;
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
impl->page()->goBackOrForward(distance);
WebCore::BackForwardController* controller = impl->page()->backForward();
if (controller->backCount() > 0)
controller->goBack();
}
void GoForward(WebKit::WebView* view) {
if (!view)
return;
WebKit::WebViewImpl* impl = reinterpret_cast<WebKit::WebViewImpl*>(view);
WebCore::BackForwardController* controller = impl->page()->backForward();
if (controller->forwardCount() > 0)
controller->goForward();
}
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame) {

View File

@ -17,8 +17,10 @@ class WebView;
namespace webkit_glue {
bool CanGoBackOrForward(WebKit::WebView* view, int distance);
void GoBackOrForward(WebKit::WebView* view, int distance);
bool CanGoBack(WebKit::WebView* view);
bool CanGoForward(WebKit::WebView* view);
void GoBack(WebKit::WebView* view);
void GoForward(WebKit::WebView* view);
// Retrieve the V8 context associated with the frame.
v8::Handle<v8::Context> GetV8Context(WebKit::WebFrame* frame);

View File

@ -15,8 +15,6 @@
<include name="IDR_CEF_CREDITS_SWIFTSHADER_JPG" file="..\..\..\chrome\browser\resources\swiftshader.jpg" type="BINDATA" />
<include name="IDR_CEF_LICENSE_TXT" file="..\..\LICENSE.txt" type="BINDATA" />
<include name="IDR_CEF_VERSION_HTML" file="about_version.html" type="BINDATA" />
<include name="IDR_CEF_TRACING_HTML" file="..\..\..\third_party\trace-viewer\src\about_tracing.html" flattenhtml="true" allowexternalscript="true" type="BINDATA" />
<include name="IDR_CEF_TRACING_JS" file="..\..\..\third_party\trace-viewer\src\about_tracing.js" flattenhtml="true" type="BINDATA" />
</includes>
</release>
</grit>

View File

@ -177,7 +177,7 @@ cef_string_userfree_t CEF_CALLBACK download_item_get_full_path(
return _retval.DetachToUserFree();
}
int32 CEF_CALLBACK download_item_get_id(struct _cef_download_item_t* self) {
uint32 CEF_CALLBACK download_item_get_id(struct _cef_download_item_t* self) {
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
DCHECK(self);
@ -185,7 +185,7 @@ int32 CEF_CALLBACK download_item_get_id(struct _cef_download_item_t* self) {
return 0;
// Execute
int32 _retval = CefDownloadItemCppToC::Get(self)->GetId();
uint32 _retval = CefDownloadItemCppToC::Get(self)->GetId();
// Return type: simple
return _retval;

View File

@ -160,14 +160,14 @@ CefString CefDownloadItemCToCpp::GetFullPath() {
return _retvalStr;
}
int32 CefDownloadItemCToCpp::GetId() {
uint32 CefDownloadItemCToCpp::GetId() {
if (CEF_MEMBER_MISSING(struct_, get_id))
return 0;
// AUTO-GENERATED CONTENT - DELETE THIS COMMENT BEFORE MODIFYING
// Execute
int32 _retval = struct_->get_id(struct_);
uint32 _retval = struct_->get_id(struct_);
// Return type: simple
return _retval;

View File

@ -45,7 +45,7 @@ class CefDownloadItemCToCpp
virtual CefTime GetStartTime() OVERRIDE;
virtual CefTime GetEndTime() OVERRIDE;
virtual CefString GetFullPath() OVERRIDE;
virtual int32 GetId() OVERRIDE;
virtual uint32 GetId() OVERRIDE;
virtual CefString GetURL() OVERRIDE;
virtual CefString GetSuggestedFileName() OVERRIDE;
virtual CefString GetContentDisposition() OVERRIDE;

View File

@ -29,7 +29,7 @@ patches = [
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=933
'name': 'webkit_933',
'path': '../third_party/WebKit/Source/WebKit/chromium/src/',
'path': '../third_party/WebKit/Source/web/',
},
{
# http://code.google.com/p/gyp/issues/detail?id=331

View File

@ -1,8 +1,8 @@
Index: message_loop.cc
===================================================================
--- message_loop.cc (revision 194165)
--- message_loop.cc (revision 213078)
+++ message_loop.cc (working copy)
@@ -191,7 +191,7 @@
@@ -193,7 +193,7 @@
MessageLoop::~MessageLoop() {
DCHECK_EQ(this, current());

View File

@ -1,8 +1,8 @@
Index: page/FrameView.cpp
===================================================================
--- page/FrameView.cpp (revision 151551)
--- page/FrameView.cpp (revision 154753)
+++ page/FrameView.cpp (working copy)
@@ -198,10 +198,12 @@
@@ -191,10 +191,12 @@
if (!page)
return;
@ -17,7 +17,7 @@ Index: page/FrameView.cpp
PassRefPtr<FrameView> FrameView::create(Frame* frame)
Index: platform/mac/NSScrollerImpDetails.mm
===================================================================
--- platform/mac/NSScrollerImpDetails.mm (revision 151551)
--- platform/mac/NSScrollerImpDetails.mm (revision 154753)
+++ platform/mac/NSScrollerImpDetails.mm (working copy)
@@ -33,6 +33,7 @@

View File

@ -1,13 +1,13 @@
Index: WebNode.cpp
===================================================================
--- WebNode.cpp (revision 146842)
--- WebNode.cpp (revision 154753)
+++ WebNode.cpp (working copy)
@@ -181,7 +181,7 @@
@@ -173,7 +173,7 @@
void WebNode::addEventListener(const WebString& eventType, WebDOMEventListener* listener, bool useCapture)
{
// Please do not add more eventTypes to this list without an API review.
- RELEASE_ASSERT(eventType == "mousedown");
+ //RELEASE_ASSERT(eventType == "mousedown");
+ // RELEASE_ASSERT(eventType == "mousedown");
EventListenerWrapper* listenerWrapper = listener->createEventListenerWrapper(eventType, useCapture, m_private.get());
// The listenerWrapper is only referenced by the actual Node. Once it goes

View File

@ -1,8 +1,8 @@
Index: public/web/WebView.h
===================================================================
--- public/web/WebView.h (revision 152953)
--- public/web/WebView.h (revision 154753)
+++ public/web/WebView.h (working copy)
@@ -421,6 +421,7 @@
@@ -423,6 +423,7 @@
// Sets whether select popup menus should be rendered by the browser.
WEBKIT_EXPORT static void setUseExternalPopupMenus(bool);
@ -10,11 +10,11 @@ Index: public/web/WebView.h
// Visited link state --------------------------------------------------
Index: Source/WebKit/chromium/src/ChromeClientImpl.cpp
Index: Source/web/ChromeClientImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/ChromeClientImpl.cpp (revision 152953)
+++ Source/WebKit/chromium/src/ChromeClientImpl.cpp (working copy)
@@ -895,7 +895,7 @@
--- Source/web/ChromeClientImpl.cpp (revision 154753)
+++ Source/web/ChromeClientImpl.cpp (working copy)
@@ -872,7 +872,7 @@
PassRefPtr<PopupMenu> ChromeClientImpl::createPopupMenu(Frame& frame, PopupMenuClient* client) const
{
@ -23,11 +23,11 @@ Index: Source/WebKit/chromium/src/ChromeClientImpl.cpp
return adoptRef(new ExternalPopupMenu(frame, client, m_webView->client()));
return adoptRef(new PopupMenuChromium(frame, client));
Index: Source/WebKit/chromium/src/WebViewImpl.cpp
Index: Source/web/WebViewImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/WebViewImpl.cpp (revision 152953)
+++ Source/WebKit/chromium/src/WebViewImpl.cpp (working copy)
@@ -393,6 +393,7 @@
--- Source/web/WebViewImpl.cpp (revision 154753)
+++ Source/web/WebViewImpl.cpp (working copy)
@@ -388,6 +388,7 @@
, m_fakeDoubleTapPageScaleFactor(0)
, m_fakeDoubleTapUseAnchor(false)
, m_contextMenuAllowed(false)
@ -35,7 +35,7 @@ Index: Source/WebKit/chromium/src/WebViewImpl.cpp
, m_doingDragAndDrop(false)
, m_ignoreInputEvents(false)
, m_suppressNextKeypressEvent(false)
@@ -3676,9 +3677,14 @@
@@ -3702,9 +3703,14 @@
updateLayerTreeViewport();
}
@ -51,11 +51,11 @@ Index: Source/WebKit/chromium/src/WebViewImpl.cpp
}
void WebViewImpl::setEmulatedTextZoomFactor(float textZoomFactor)
Index: Source/WebKit/chromium/src/WebViewImpl.h
Index: Source/web/WebViewImpl.h
===================================================================
--- Source/WebKit/chromium/src/WebViewImpl.h (revision 152953)
+++ Source/WebKit/chromium/src/WebViewImpl.h (working copy)
@@ -415,7 +415,8 @@
--- Source/web/WebViewImpl.h (revision 154753)
+++ Source/web/WebViewImpl.h (working copy)
@@ -420,7 +420,8 @@
// Returns true if popup menus should be rendered by the browser, false if
// they should be rendered by WebKit (which is the default).
@ -65,7 +65,7 @@ Index: Source/WebKit/chromium/src/WebViewImpl.h
bool contextMenuAllowed() const
{
@@ -733,6 +734,8 @@
@@ -721,6 +722,8 @@
bool m_contextMenuAllowed;

View File

@ -268,7 +268,7 @@ bool ClientHandler::OnDragEnter(CefRefPtr<CefBrowser> browser,
REQUIRE_UI_THREAD();
// Forbid dragging of link URLs.
if (dragData->IsLink())
if (mask & DRAG_OPERATION_LINK)
return true;
return false;