Update to Chromium revision 190564.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1168 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2013-04-02 17:21:37 +00:00
parent e1f8c276f8
commit 03e5a75ea4
21 changed files with 397 additions and 385 deletions

View File

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

View File

@ -487,10 +487,10 @@
}, },
'sources': [ 'sources': [
'<@(includes_win)', '<@(includes_win)',
# TODO(cef): Remove webkit_unscaled_resources.rc once custom cursor # TODO(cef): Remove ui_unscaled_resources.rc once custom cursor
# resources can be loaded via ResourceBundle. See crbug.com/147663. # resources can be loaded via ResourceBundle. See crbug.com/147663.
'$(OutDir)/obj/global_intermediate/webkit/webkit_resources.rc', '$(OutDir)/obj/global_intermediate/webkit/webkit_resources.rc',
'$(OutDir)/obj/global_intermediate/webkit/webkit_unscaled_resources.rc', '$(OutDir)/obj/global_intermediate/ui/ui_resources/ui_unscaled_resources.rc',
'libcef_dll/libcef_dll.rc', 'libcef_dll/libcef_dll.rc',
], ],
'link_settings': { 'link_settings': {

View File

@ -106,6 +106,7 @@ typedef struct _cef_download_handler_t {
/// ///
// Called when a download's status or progress information has been updated. // Called when a download's status or progress information has been updated.
// This may be called multiple times before and after on_before_download().
// Execute |callback| either asynchronously or in this function to cancel the // Execute |callback| either asynchronously or in this function to cancel the
// download if desired. Do not keep a reference to |download_item| outside of // download if desired. Do not keep a reference to |download_item| outside of
// this function. // this function.

View File

@ -97,6 +97,7 @@ class CefDownloadHandler : public virtual CefBase {
/// ///
// Called when a download's status or progress information has been updated. // Called when a download's status or progress information has been updated.
// This may be called multiple times before and after OnBeforeDownload().
// Execute |callback| either asynchronously or in this method to cancel the // Execute |callback| either asynchronously or in this method to cancel the
// download if desired. Do not keep a reference to |download_item| outside of // download if desired. Do not keep a reference to |download_item| outside of
// this method. // this method.

View File

@ -1598,6 +1598,7 @@ bool CefBrowserHostImpl::ShouldCreateWebContents(
void CefBrowserHostImpl::WebContentsCreated( void CefBrowserHostImpl::WebContentsCreated(
content::WebContents* source_contents, content::WebContents* source_contents,
int64 source_frame_id, int64 source_frame_id,
const string16& frame_name,
const GURL& target_url, const GURL& target_url,
content::WebContents* new_contents) { content::WebContents* new_contents) {
scoped_ptr<PendingPopupInfo> pending_popup_info; scoped_ptr<PendingPopupInfo> pending_popup_info;

View File

@ -298,6 +298,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
const GURL& target_url) OVERRIDE; const GURL& target_url) OVERRIDE;
virtual void WebContentsCreated(content::WebContents* source_contents, virtual void WebContentsCreated(content::WebContents* source_contents,
int64 source_frame_id, int64 source_frame_id,
const string16& frame_name,
const GURL& target_url, const GURL& target_url,
content::WebContents* new_contents) OVERRIDE; content::WebContents* new_contents) OVERRIDE;
virtual void DidNavigateMainFramePostCommit( virtual void DidNavigateMainFramePostCommit(

View File

@ -448,7 +448,7 @@ void OnChromeTracingProcessMessage(CefRefPtr<CefBrowser> browser,
if (action == "tracingControllerInitialized") { if (action == "tracingControllerInitialized") {
// Send the client info to the tracingController. // Send the client info to the tracingController.
} else if (action == "beginTracing") { } else if (action == "beginTracing") {
if (!arguments || arguments->GetSize() != 2) { if (!arguments || arguments->GetSize() != 3) {
NOTREACHED() << "Invalid arguments to " << action.c_str(); NOTREACHED() << "Invalid arguments to " << action.c_str();
return; return;
} }

View File

@ -74,7 +74,7 @@ content::DevToolsAgentHost* CefDevToolsBindingHandler::ForIdentifier(
if (GetIdentifier(host) == identifier) { if (GetIdentifier(host) == identifier) {
// May create a new agent host. // May create a new agent host.
scoped_refptr<content::DevToolsAgentHost> agent_host( scoped_refptr<content::DevToolsAgentHost> agent_host(
content::DevToolsAgentHost::GetFor(host)); content::DevToolsAgentHost::GetOrCreateFor(host));
agents_map_[identifier] = agent_host; agents_map_[identifier] = agent_host;
return agent_host; return agent_host;
} }
@ -163,6 +163,10 @@ content::DevToolsHttpHandlerDelegate::TargetType
return kTargetTypeTab; return kTargetTypeTab;
} }
std::string CefDevToolsDelegate::GetViewDescription(content::RenderViewHost*) {
return std::string();
}
std::string CefDevToolsDelegate::GetDevToolsURL(content::RenderViewHost* rvh, std::string CefDevToolsDelegate::GetDevToolsURL(content::RenderViewHost* rvh,
bool http_scheme) { bool http_scheme) {
const CommandLine& command_line = *CommandLine::ForCurrentProcess(); const CommandLine& command_line = *CommandLine::ForCurrentProcess();

View File

@ -62,6 +62,7 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE; virtual std::string GetPageThumbnailData(const GURL& url) OVERRIDE;
virtual content::RenderViewHost* CreateNewTarget() OVERRIDE; virtual content::RenderViewHost* CreateNewTarget() OVERRIDE;
virtual TargetType GetTargetType(content::RenderViewHost*) OVERRIDE; virtual TargetType GetTargetType(content::RenderViewHost*) OVERRIDE;
virtual std::string GetViewDescription(content::RenderViewHost*) OVERRIDE;
// Returns the DevTools URL for the specified RenderViewHost. // Returns the DevTools URL for the specified RenderViewHost.
std::string GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme); std::string GetDevToolsURL(content::RenderViewHost* rvh, bool http_scheme);

View File

@ -1,216 +1,217 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#include "libcef/browser/media_capture_devices_dispatcher.h" #include "libcef/browser/media_capture_devices_dispatcher.h"
#include "base/prefs/pref_registry_simple.h" #include "base/prefs/pref_registry_simple.h"
#include "base/prefs/pref_service.h" #include "base/prefs/pref_service.h"
#include "chrome/common/pref_names.h" #include "chrome/common/pref_names.h"
#include "content/public/browser/browser_thread.h" #include "content/public/browser/browser_thread.h"
#include "content/public/browser/media_devices_monitor.h" #include "content/public/browser/media_devices_monitor.h"
#include "content/public/common/media_stream_request.h" #include "content/public/common/media_stream_request.h"
using content::BrowserThread; using content::BrowserThread;
using content::MediaStreamDevices; using content::MediaStreamDevices;
namespace { namespace {
const content::MediaStreamDevice* FindDefaultDeviceWithId( const content::MediaStreamDevice* FindDefaultDeviceWithId(
const content::MediaStreamDevices& devices, const content::MediaStreamDevices& devices,
const std::string& device_id) { const std::string& device_id) {
if (devices.empty()) if (devices.empty())
return NULL; return NULL;
content::MediaStreamDevices::const_iterator iter = devices.begin(); content::MediaStreamDevices::const_iterator iter = devices.begin();
for (; iter != devices.end(); ++iter) { for (; iter != devices.end(); ++iter) {
if (iter->id == device_id) { if (iter->id == device_id) {
return &(*iter); return &(*iter);
} }
} }
return &(*devices.begin()); return &(*devices.begin());
}; };
} // namespace } // namespace
CefMediaCaptureDevicesDispatcher* CefMediaCaptureDevicesDispatcher*
CefMediaCaptureDevicesDispatcher::GetInstance() { CefMediaCaptureDevicesDispatcher::GetInstance() {
return Singleton<CefMediaCaptureDevicesDispatcher>::get(); return Singleton<CefMediaCaptureDevicesDispatcher>::get();
} }
CefMediaCaptureDevicesDispatcher::CefMediaCaptureDevicesDispatcher() CefMediaCaptureDevicesDispatcher::CefMediaCaptureDevicesDispatcher()
: devices_enumerated_(false) {} : devices_enumerated_(false) {}
CefMediaCaptureDevicesDispatcher::~CefMediaCaptureDevicesDispatcher() {} CefMediaCaptureDevicesDispatcher::~CefMediaCaptureDevicesDispatcher() {}
void CefMediaCaptureDevicesDispatcher::RegisterPrefs( void CefMediaCaptureDevicesDispatcher::RegisterPrefs(
PrefRegistrySimple* registry) { PrefRegistrySimple* registry) {
registry->RegisterStringPref(prefs::kDefaultAudioCaptureDevice, registry->RegisterStringPref(prefs::kDefaultAudioCaptureDevice,
std::string()); std::string());
registry->RegisterStringPref(prefs::kDefaultVideoCaptureDevice, registry->RegisterStringPref(prefs::kDefaultVideoCaptureDevice,
std::string()); std::string());
} }
void CefMediaCaptureDevicesDispatcher::AddObserver(Observer* observer) { void CefMediaCaptureDevicesDispatcher::AddObserver(Observer* observer) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!observers_.HasObserver(observer)) if (!observers_.HasObserver(observer))
observers_.AddObserver(observer); observers_.AddObserver(observer);
} }
void CefMediaCaptureDevicesDispatcher::RemoveObserver(Observer* observer) { void CefMediaCaptureDevicesDispatcher::RemoveObserver(Observer* observer) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
observers_.RemoveObserver(observer); observers_.RemoveObserver(observer);
} }
const MediaStreamDevices& const MediaStreamDevices&
CefMediaCaptureDevicesDispatcher::GetAudioCaptureDevices() { CefMediaCaptureDevicesDispatcher::GetAudioCaptureDevices() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!devices_enumerated_) { if (!devices_enumerated_) {
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE, BrowserThread::IO, FROM_HERE,
base::Bind(&content::EnsureMonitorCaptureDevices)); base::Bind(&content::EnsureMonitorCaptureDevices));
devices_enumerated_ = true; devices_enumerated_ = true;
} }
return audio_devices_; return audio_devices_;
} }
const MediaStreamDevices& const MediaStreamDevices&
CefMediaCaptureDevicesDispatcher::GetVideoCaptureDevices() { CefMediaCaptureDevicesDispatcher::GetVideoCaptureDevices() {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
if (!devices_enumerated_) { if (!devices_enumerated_) {
BrowserThread::PostTask( BrowserThread::PostTask(
BrowserThread::IO, FROM_HERE, BrowserThread::IO, FROM_HERE,
base::Bind(&content::EnsureMonitorCaptureDevices)); base::Bind(&content::EnsureMonitorCaptureDevices));
devices_enumerated_ = true; devices_enumerated_ = true;
} }
return video_devices_; return video_devices_;
} }
void CefMediaCaptureDevicesDispatcher::GetDefaultDevices( void CefMediaCaptureDevicesDispatcher::GetDefaultDevices(
PrefService* prefs, PrefService* prefs,
bool audio, bool audio,
bool video, bool video,
content::MediaStreamDevices* devices) { content::MediaStreamDevices* devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(audio || video); DCHECK(audio || video);
std::string default_device; std::string default_device;
if (audio) { if (audio) {
default_device = prefs->GetString(prefs::kDefaultAudioCaptureDevice); default_device = prefs->GetString(prefs::kDefaultAudioCaptureDevice);
GetRequestedDevice(default_device, true, false, devices); GetRequestedDevice(default_device, true, false, devices);
} }
if (video) { if (video) {
default_device = prefs->GetString(prefs::kDefaultVideoCaptureDevice); default_device = prefs->GetString(prefs::kDefaultVideoCaptureDevice);
GetRequestedDevice(default_device, false, true, devices); GetRequestedDevice(default_device, false, true, devices);
} }
} }
void CefMediaCaptureDevicesDispatcher::GetRequestedDevice( void CefMediaCaptureDevicesDispatcher::GetRequestedDevice(
const std::string& requested_device_id, const std::string& requested_device_id,
bool audio, bool audio,
bool video, bool video,
content::MediaStreamDevices* devices) { content::MediaStreamDevices* devices) {
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
DCHECK(audio || video); DCHECK(audio || video);
if (audio) { if (audio) {
const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices(); const content::MediaStreamDevices& audio_devices = GetAudioCaptureDevices();
const content::MediaStreamDevice* const device = const content::MediaStreamDevice* const device =
FindDefaultDeviceWithId(audio_devices, requested_device_id); FindDefaultDeviceWithId(audio_devices, requested_device_id);
if (device) if (device)
devices->push_back(*device); devices->push_back(*device);
} }
if (video) { if (video) {
const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices(); const content::MediaStreamDevices& video_devices = GetVideoCaptureDevices();
const content::MediaStreamDevice* const device = const content::MediaStreamDevice* const device =
FindDefaultDeviceWithId(video_devices, requested_device_id); FindDefaultDeviceWithId(video_devices, requested_device_id);
if (device) if (device)
devices->push_back(*device); devices->push_back(*device);
} }
} }
void CefMediaCaptureDevicesDispatcher::OnCaptureDevicesOpened( void CefMediaCaptureDevicesDispatcher::OnCaptureDevicesOpened(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
const content::MediaStreamDevices& devices) { const content::MediaStreamDevices& devices,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); const base::Closure& close_callback) {
} DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
void CefMediaCaptureDevicesDispatcher::OnCaptureDevicesClosed(
int render_process_id, void CefMediaCaptureDevicesDispatcher::OnCaptureDevicesClosed(
int render_view_id, int render_process_id,
const content::MediaStreamDevices& devices) { int render_view_id,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); const content::MediaStreamDevices& devices) {
} DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
}
void CefMediaCaptureDevicesDispatcher::OnAudioCaptureDevicesChanged(
const content::MediaStreamDevices& devices) { void CefMediaCaptureDevicesDispatcher::OnAudioCaptureDevicesChanged(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); const content::MediaStreamDevices& devices) {
BrowserThread::PostTask( DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserThread::UI, FROM_HERE, BrowserThread::PostTask(
base::Bind( BrowserThread::UI, FROM_HERE,
&CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread, base::Bind(
base::Unretained(this), devices)); &CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread,
} base::Unretained(this), devices));
}
void CefMediaCaptureDevicesDispatcher::OnVideoCaptureDevicesChanged(
const content::MediaStreamDevices& devices) { void CefMediaCaptureDevicesDispatcher::OnVideoCaptureDevicesChanged(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); const content::MediaStreamDevices& devices) {
BrowserThread::PostTask( DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserThread::UI, FROM_HERE, BrowserThread::PostTask(
base::Bind( BrowserThread::UI, FROM_HERE,
&CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread, base::Bind(
base::Unretained(this), devices)); &CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread,
} base::Unretained(this), devices));
}
void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
int render_process_id, void CefMediaCaptureDevicesDispatcher::OnMediaRequestStateChanged(
int render_view_id, int render_process_id,
const content::MediaStreamDevice& device, int render_view_id,
content::MediaRequestState state) { const content::MediaStreamDevice& device,
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO)); content::MediaRequestState state) {
BrowserThread::PostTask( DCHECK(BrowserThread::CurrentlyOn(BrowserThread::IO));
BrowserThread::UI, FROM_HERE, BrowserThread::PostTask(
base::Bind( BrowserThread::UI, FROM_HERE,
&CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread, base::Bind(
base::Unretained(this), render_process_id, render_view_id, device, &CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread,
state)); base::Unretained(this), render_process_id, render_view_id, device,
state));
}
}
void CefMediaCaptureDevicesDispatcher::OnAudioStreamPlayingChanged(
int render_process_id, int render_view_id, int stream_id, bool playing) { void CefMediaCaptureDevicesDispatcher::OnAudioStreamPlayingChanged(
} int render_process_id, int render_view_id, int stream_id, bool playing) {
}
void CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread(
const content::MediaStreamDevices& devices) { void CefMediaCaptureDevicesDispatcher::UpdateAudioDevicesOnUIThread(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); const content::MediaStreamDevices& devices) {
devices_enumerated_ = true; DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
audio_devices_ = devices; devices_enumerated_ = true;
FOR_EACH_OBSERVER(Observer, observers_, audio_devices_ = devices;
OnUpdateAudioDevices(audio_devices_)); FOR_EACH_OBSERVER(Observer, observers_,
} OnUpdateAudioDevices(audio_devices_));
}
void CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread(
const content::MediaStreamDevices& devices){ void CefMediaCaptureDevicesDispatcher::UpdateVideoDevicesOnUIThread(
DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI)); const content::MediaStreamDevices& devices){
devices_enumerated_ = true; DCHECK(BrowserThread::CurrentlyOn(BrowserThread::UI));
video_devices_ = devices; devices_enumerated_ = true;
FOR_EACH_OBSERVER(Observer, observers_, video_devices_ = devices;
OnUpdateVideoDevices(video_devices_)); FOR_EACH_OBSERVER(Observer, observers_,
} OnUpdateVideoDevices(video_devices_));
}
void CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread(
int render_process_id, void CefMediaCaptureDevicesDispatcher::UpdateMediaRequestStateOnUIThread(
int render_view_id, int render_process_id,
const content::MediaStreamDevice& device, int render_view_id,
content::MediaRequestState state) { const content::MediaStreamDevice& device,
FOR_EACH_OBSERVER(Observer, observers_, content::MediaRequestState state) {
OnRequestUpdate(render_process_id, FOR_EACH_OBSERVER(Observer, observers_,
render_view_id, OnRequestUpdate(render_process_id,
device, render_view_id,
state)); device,
} state));
}

View File

@ -1,128 +1,129 @@
// Copyright (c) 2012 The Chromium Authors. All rights reserved. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be // Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file. // found in the LICENSE file.
#ifndef CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ #ifndef CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
#define CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_ #define CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
#include "base/callback.h" #include "base/callback.h"
#include "base/memory/scoped_ptr.h" #include "base/memory/scoped_ptr.h"
#include "base/memory/singleton.h" #include "base/memory/singleton.h"
#include "base/observer_list.h" #include "base/observer_list.h"
#include "content/public/browser/media_observer.h" #include "content/public/browser/media_observer.h"
#include "content/public/common/media_stream_request.h" #include "content/public/common/media_stream_request.h"
class PrefRegistrySimple; class PrefRegistrySimple;
class PrefService; class PrefService;
// This singleton is used to receive updates about media events from the content // This singleton is used to receive updates about media events from the content
// layer. Based on chrome/browser/media/media_capture_devices_dispatcher.[h|cc]. // layer. Based on chrome/browser/media/media_capture_devices_dispatcher.[h|cc].
class CefMediaCaptureDevicesDispatcher : public content::MediaObserver { class CefMediaCaptureDevicesDispatcher : public content::MediaObserver {
public: public:
class Observer { class Observer {
public: public:
// Handle an information update consisting of a up-to-date audio capture // Handle an information update consisting of a up-to-date audio capture
// device lists. This happens when a microphone is plugged in or unplugged. // device lists. This happens when a microphone is plugged in or unplugged.
virtual void OnUpdateAudioDevices( virtual void OnUpdateAudioDevices(
const content::MediaStreamDevices& devices) {} const content::MediaStreamDevices& devices) {}
// Handle an information update consisting of a up-to-date video capture // Handle an information update consisting of a up-to-date video capture
// device lists. This happens when a camera is plugged in or unplugged. // device lists. This happens when a camera is plugged in or unplugged.
virtual void OnUpdateVideoDevices( virtual void OnUpdateVideoDevices(
const content::MediaStreamDevices& devices) {} const content::MediaStreamDevices& devices) {}
// Handle an information update related to a media stream request. // Handle an information update related to a media stream request.
virtual void OnRequestUpdate( virtual void OnRequestUpdate(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
const content::MediaStreamDevice& device, const content::MediaStreamDevice& device,
const content::MediaRequestState state) {} const content::MediaRequestState state) {}
virtual ~Observer() {} virtual ~Observer() {}
}; };
static CefMediaCaptureDevicesDispatcher* GetInstance(); static CefMediaCaptureDevicesDispatcher* GetInstance();
// Registers the preferences related to Media Stream default devices. // Registers the preferences related to Media Stream default devices.
static void RegisterPrefs(PrefRegistrySimple* registry); static void RegisterPrefs(PrefRegistrySimple* registry);
// Methods for observers. Called on UI thread. // Methods for observers. Called on UI thread.
// Observers should add themselves on construction and remove themselves // Observers should add themselves on construction and remove themselves
// on destruction. // on destruction.
void AddObserver(Observer* observer); void AddObserver(Observer* observer);
void RemoveObserver(Observer* observer); void RemoveObserver(Observer* observer);
const content::MediaStreamDevices& GetAudioCaptureDevices(); const content::MediaStreamDevices& GetAudioCaptureDevices();
const content::MediaStreamDevices& GetVideoCaptureDevices(); const content::MediaStreamDevices& GetVideoCaptureDevices();
// Helper to get the default devices which can be used by the media request, // Helper to get the default devices which can be used by the media request,
// if the return list is empty, it means there is no available device on the // if the return list is empty, it means there is no available device on the
// OS. // OS.
// Called on the UI thread. // Called on the UI thread.
void GetDefaultDevices(PrefService* prefs, void GetDefaultDevices(PrefService* prefs,
bool audio, bool audio,
bool video, bool video,
content::MediaStreamDevices* devices); content::MediaStreamDevices* devices);
// Helper for picking the device that was requested for an OpenDevice request. // Helper for picking the device that was requested for an OpenDevice request.
// If the device requested is not available it will revert to using the first // If the device requested is not available it will revert to using the first
// available one instead or will return an empty list if no devices of the // available one instead or will return an empty list if no devices of the
// requested kind are present. // requested kind are present.
void GetRequestedDevice(const std::string& requested_device_id, void GetRequestedDevice(const std::string& requested_device_id,
bool audio, bool audio,
bool video, bool video,
content::MediaStreamDevices* devices); content::MediaStreamDevices* devices);
// Overridden from content::MediaObserver: // Overridden from content::MediaObserver:
virtual void OnCaptureDevicesOpened( virtual void OnCaptureDevicesOpened(
int render_process_id, int render_process_id,
int render_view_id, int render_view_id,
const content::MediaStreamDevices& devices) OVERRIDE; const content::MediaStreamDevices& devices,
virtual void OnCaptureDevicesClosed( const base::Closure& close_callback) OVERRIDE;
int render_process_id, virtual void OnCaptureDevicesClosed(
int render_view_id, int render_process_id,
const content::MediaStreamDevices& devices) OVERRIDE; int render_view_id,
virtual void OnAudioCaptureDevicesChanged( const content::MediaStreamDevices& devices) OVERRIDE;
const content::MediaStreamDevices& devices) OVERRIDE; virtual void OnAudioCaptureDevicesChanged(
virtual void OnVideoCaptureDevicesChanged( const content::MediaStreamDevices& devices) OVERRIDE;
const content::MediaStreamDevices& devices) OVERRIDE; virtual void OnVideoCaptureDevicesChanged(
virtual void OnMediaRequestStateChanged( const content::MediaStreamDevices& devices) OVERRIDE;
int render_process_id, virtual void OnMediaRequestStateChanged(
int render_view_id, int render_process_id,
const content::MediaStreamDevice& device, int render_view_id,
content::MediaRequestState state) OVERRIDE; const content::MediaStreamDevice& device,
virtual void OnAudioStreamPlayingChanged( content::MediaRequestState state) OVERRIDE;
int render_process_id, virtual void OnAudioStreamPlayingChanged(
int render_view_id, int render_process_id,
int stream_id, int render_view_id,
bool playing) OVERRIDE; int stream_id,
bool playing) OVERRIDE;
private:
friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>; private:
friend struct DefaultSingletonTraits<CefMediaCaptureDevicesDispatcher>;
CefMediaCaptureDevicesDispatcher();
virtual ~CefMediaCaptureDevicesDispatcher(); CefMediaCaptureDevicesDispatcher();
virtual ~CefMediaCaptureDevicesDispatcher();
// Called by the MediaObserver() functions, executed on UI thread.
void UpdateAudioDevicesOnUIThread(const content::MediaStreamDevices& devices); // Called by the MediaObserver() functions, executed on UI thread.
void UpdateVideoDevicesOnUIThread(const content::MediaStreamDevices& devices); void UpdateAudioDevicesOnUIThread(const content::MediaStreamDevices& devices);
void UpdateMediaRequestStateOnUIThread( void UpdateVideoDevicesOnUIThread(const content::MediaStreamDevices& devices);
int render_process_id, void UpdateMediaRequestStateOnUIThread(
int render_view_id, int render_process_id,
const content::MediaStreamDevice& device, int render_view_id,
content::MediaRequestState state); const content::MediaStreamDevice& device,
content::MediaRequestState state);
// A list of cached audio capture devices.
content::MediaStreamDevices audio_devices_; // A list of cached audio capture devices.
content::MediaStreamDevices audio_devices_;
// A list of cached video capture devices.
content::MediaStreamDevices video_devices_; // A list of cached video capture devices.
content::MediaStreamDevices video_devices_;
// A list of observers for the device update notifications.
ObserverList<Observer> observers_; // A list of observers for the device update notifications.
ObserverList<Observer> observers_;
// Flag to indicate if device enumeration has been done/doing.
// Only accessed on UI thread. // Flag to indicate if device enumeration has been done/doing.
bool devices_enumerated_; // Only accessed on UI thread.
}; bool devices_enumerated_;
};
#endif // CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_
#endif // CEF_LIBCEF_BROWSER_MEDIA_CAPTURE_DEVICES_DISPATCHER_H_

View File

@ -181,12 +181,6 @@ void CefResourceRequestJob::Start() {
changed = true; changed = true;
} }
if (SetHeaderIfMissing(headerMap,
net::HttpRequestHeaders::kAcceptCharset,
ua_settings->GetAcceptCharset())) {
changed = true;
}
if (SetHeaderIfMissing(headerMap, if (SetHeaderIfMissing(headerMap,
net::HttpRequestHeaders::kUserAgent, net::HttpRequestHeaders::kUserAgent,
ua_settings->GetUserAgent(request_->url()))) { ua_settings->GetUserAgent(request_->url()))) {

View File

@ -31,16 +31,16 @@
#include "content/public/common/content_switches.h" #include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h" #include "content/public/common/url_constants.h"
#include "net/base/cert_verifier.h" #include "net/base/cert_verifier.h"
#include "net/base/default_server_bound_cert_store.h"
#include "net/base/host_resolver.h"
#include "net/base/server_bound_cert_service.h"
#include "net/base/ssl_config_service_defaults.h"
#include "net/cookies/cookie_monster.h" #include "net/cookies/cookie_monster.h"
#include "net/dns/host_resolver.h"
#include "net/ftp/ftp_network_layer.h" #include "net/ftp/ftp_network_layer.h"
#include "net/http/http_auth_handler_factory.h" #include "net/http/http_auth_handler_factory.h"
#include "net/http/http_cache.h" #include "net/http/http_cache.h"
#include "net/http/http_server_properties_impl.h" #include "net/http/http_server_properties_impl.h"
#include "net/proxy/proxy_service.h" #include "net/proxy/proxy_service.h"
#include "net/ssl/default_server_bound_cert_store.h"
#include "net/ssl/server_bound_cert_service.h"
#include "net/ssl/ssl_config_service_defaults.h"
#include "net/url_request/static_http_user_agent_settings.h" #include "net/url_request/static_http_user_agent_settings.h"
#include "net/url_request/url_request.h" #include "net/url_request/url_request.h"
#include "net/url_request/url_request_context.h" #include "net/url_request/url_request_context.h"
@ -94,8 +94,7 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
new net::DefaultServerBoundCertStore(NULL), new net::DefaultServerBoundCertStore(NULL),
base::WorkerPool::GetTaskRunner(true))); base::WorkerPool::GetTaskRunner(true)));
storage_->set_http_user_agent_settings( storage_->set_http_user_agent_settings(
new net::StaticHttpUserAgentSettings( new net::StaticHttpUserAgentSettings("en-us,en", EmptyString()));
"en-us,en", "iso-8859-1,*,utf-8", EmptyString()));
storage_->set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL)); storage_->set_host_resolver(net::HostResolver::CreateDefaultResolver(NULL));
storage_->set_cert_verifier(net::CertVerifier::CreateDefault()); storage_->set_cert_verifier(net::CertVerifier::CreateDefault());
@ -105,6 +104,7 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
ProxyServiceFactory::CreateProxyService( ProxyServiceFactory::CreateProxyService(
NULL, NULL,
url_request_context_.get(), url_request_context_.get(),
url_request_context_->network_delegate(),
_Context->proxy_config_service().release(), _Context->proxy_config_service().release(),
command_line)); command_line));
storage_->set_proxy_service(system_proxy_service.release()); storage_->set_proxy_service(system_proxy_service.release());

View File

@ -80,6 +80,9 @@ void CefWebContentsViewOSR::RenderViewCreated(content::RenderViewHost* host) {
void CefWebContentsViewOSR::RenderViewSwappedIn(content::RenderViewHost* host) { void CefWebContentsViewOSR::RenderViewSwappedIn(content::RenderViewHost* host) {
} }
void CefWebContentsViewOSR::SetOverscrollControllerEnabled(bool enabled) {
}
void CefWebContentsViewOSR::Focus() { void CefWebContentsViewOSR::Focus() {
} }

View File

@ -43,6 +43,7 @@ class CefWebContentsViewOSR : public content::WebContentsViewPort,
virtual void SizeContents(const gfx::Size& size) OVERRIDE; virtual void SizeContents(const gfx::Size& size) OVERRIDE;
virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE; virtual void RenderViewCreated(content::RenderViewHost* host) OVERRIDE;
virtual void RenderViewSwappedIn(content::RenderViewHost* host) OVERRIDE; virtual void RenderViewSwappedIn(content::RenderViewHost* host) OVERRIDE;
virtual void SetOverscrollControllerEnabled(bool enabled) OVERRIDE;
virtual void Focus() OVERRIDE; virtual void Focus() OVERRIDE;
virtual void SetInitialFocus() OVERRIDE; virtual void SetInitialFocus() OVERRIDE;
virtual void StoreFocus() OVERRIDE; virtual void StoreFocus() OVERRIDE;

View File

@ -16,11 +16,6 @@ patches = [
'name': 'build', 'name': 'build',
'path': '../build/', 'path': '../build/',
}, },
{
# http://code.google.com/p/gyp/issues/detail?id=223
'name': 'tools_gyp',
'path': '../tools/gyp/',
},
{ {
# http://code.google.com/p/chromiumembedded/issues/detail?id=496 # http://code.google.com/p/chromiumembedded/issues/detail?id=496
'name': 'zlib', 'name': 'zlib',
@ -42,6 +37,11 @@ patches = [
'name': 'webkit_features', 'name': 'webkit_features',
'path': '../third_party/WebKit/Source/WebKit/chromium/', 'path': '../third_party/WebKit/Source/WebKit/chromium/',
}, },
{
# http://code.google.com/p/chromiumembedded/issues/detail?id=933
'name': 'webkit_933',
'path': '../third_party/WebKit/Source/WebKit/chromium/src/',
},
{ {
# http://code.google.com/p/chromiumembedded/issues/detail?id=364 # http://code.google.com/p/chromiumembedded/issues/detail?id=364
'name': 'spi_webcore_364', 'name': 'spi_webcore_364',

View File

@ -1,8 +1,8 @@
Index: page/FrameView.cpp Index: page/FrameView.cpp
=================================================================== ===================================================================
--- page/FrameView.cpp (revision 143980) --- page/FrameView.cpp (revision 146842)
+++ page/FrameView.cpp (working copy) +++ page/FrameView.cpp (working copy)
@@ -208,10 +208,12 @@ @@ -209,10 +209,12 @@
if (!page) if (!page)
return; return;
@ -17,7 +17,7 @@ Index: page/FrameView.cpp
PassRefPtr<FrameView> FrameView::create(Frame* frame) PassRefPtr<FrameView> FrameView::create(Frame* frame)
Index: platform/mac/NSScrollerImpDetails.mm Index: platform/mac/NSScrollerImpDetails.mm
=================================================================== ===================================================================
--- platform/mac/NSScrollerImpDetails.mm (revision 143980) --- platform/mac/NSScrollerImpDetails.mm (revision 146842)
+++ platform/mac/NSScrollerImpDetails.mm (working copy) +++ platform/mac/NSScrollerImpDetails.mm (working copy)
@@ -34,6 +34,7 @@ @@ -34,6 +34,7 @@
#if PLATFORM(CHROMIUM) #if PLATFORM(CHROMIUM)

View File

@ -1,14 +0,0 @@
Index: pylib/gyp/input.py
===================================================================
--- pylib/gyp/input.py (revision 1583)
+++ pylib/gyp/input.py (working copy)
@@ -843,7 +843,8 @@
# that don't load quickly, this can be faster than
# <!(python modulename param eters). Do this in |build_file_dir|.
oldwd = os.getcwd() # Python doesn't like os.open('.'): no fchdir.
- os.chdir(build_file_dir)
+ if not build_file_dir is None:
+ os.chdir(build_file_dir)
try:
parsed_contents = shlex.split(contents)

View File

@ -0,0 +1,13 @@
Index: WebNode.cpp
===================================================================
--- WebNode.cpp (revision 146842)
+++ WebNode.cpp (working copy)
@@ -181,7 +181,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");
EventListenerWrapper* listenerWrapper = listener->createEventListenerWrapper(eventType, useCapture, m_private.get());
// The listenerWrapper is only referenced by the actual Node. Once it goes

View File

@ -60,7 +60,11 @@ ClientHandler::ClientHandler()
if (m_StartupURL.empty()) if (m_StartupURL.empty())
m_StartupURL = "http://www.google.com/"; m_StartupURL = "http://www.google.com/";
m_bExternalDevTools = command_line->HasSwitch(cefclient::kExternalDevTools); // Also use external dev tools if off-screen rendering is enabled since we
// disallow popup windows.
m_bExternalDevTools =
command_line->HasSwitch(cefclient::kExternalDevTools) ||
AppIsOffScreenRenderingEnabled();
} }
ClientHandler::~ClientHandler() { ClientHandler::~ClientHandler() {

View File

@ -149,7 +149,6 @@ class DownloadTestHandler : public TestHandler {
CefRefPtr<CefBeforeDownloadCallback> callback) OVERRIDE { CefRefPtr<CefBeforeDownloadCallback> callback) OVERRIDE {
EXPECT_TRUE(CefCurrentlyOn(TID_UI)); EXPECT_TRUE(CefCurrentlyOn(TID_UI));
EXPECT_FALSE(got_on_before_download_); EXPECT_FALSE(got_on_before_download_);
EXPECT_FALSE(got_on_download_updated_);
got_on_before_download_.yes(); got_on_before_download_.yes();
@ -185,7 +184,6 @@ class DownloadTestHandler : public TestHandler {
CefRefPtr<CefDownloadItem> download_item, CefRefPtr<CefDownloadItem> download_item,
CefRefPtr<CefDownloadItemCallback> callback) OVERRIDE { CefRefPtr<CefDownloadItemCallback> callback) OVERRIDE {
EXPECT_TRUE(CefCurrentlyOn(TID_UI)); EXPECT_TRUE(CefCurrentlyOn(TID_UI));
EXPECT_TRUE(got_on_before_download_);
got_on_download_updated_.yes(); got_on_download_updated_.yes();
@ -193,14 +191,14 @@ class DownloadTestHandler : public TestHandler {
EXPECT_TRUE(download_item.get()); EXPECT_TRUE(download_item.get());
EXPECT_TRUE(callback.get()); EXPECT_TRUE(callback.get());
EXPECT_EQ(download_id_, download_item->GetId()); if (got_on_before_download_)
EXPECT_EQ(download_id_, download_item->GetId());
EXPECT_LE(0LL, download_item->GetCurrentSpeed());
EXPECT_LE(0, download_item->GetPercentComplete());
EXPECT_TRUE(download_item->IsValid()); EXPECT_TRUE(download_item->IsValid());
EXPECT_FALSE(download_item->IsCanceled()); EXPECT_FALSE(download_item->IsCanceled());
EXPECT_LT(0LL, download_item->GetCurrentSpeed());
EXPECT_LT(0, download_item->GetPercentComplete());
EXPECT_EQ(static_cast<int64>(sizeof(kTestContent)-1),
download_item->GetTotalBytes());
EXPECT_STREQ(kTestDownloadUrl, download_item->GetURL().ToString().c_str()); EXPECT_STREQ(kTestDownloadUrl, download_item->GetURL().ToString().c_str());
EXPECT_STREQ(kTestContentDisposition, EXPECT_STREQ(kTestContentDisposition,
download_item->GetContentDisposition().ToString().c_str()); download_item->GetContentDisposition().ToString().c_str());
@ -219,11 +217,13 @@ class DownloadTestHandler : public TestHandler {
EXPECT_EQ(100, download_item->GetPercentComplete()); EXPECT_EQ(100, download_item->GetPercentComplete());
EXPECT_EQ(static_cast<int64>(sizeof(kTestContent)-1), EXPECT_EQ(static_cast<int64>(sizeof(kTestContent)-1),
download_item->GetReceivedBytes()); download_item->GetReceivedBytes());
EXPECT_EQ(static_cast<int64>(sizeof(kTestContent)-1),
download_item->GetTotalBytes());
DestroyTest(); DestroyTest();
} else { } else {
EXPECT_TRUE(download_item->IsInProgress()); EXPECT_TRUE(download_item->IsInProgress());
EXPECT_LT(0LL, download_item->GetReceivedBytes()); EXPECT_LE(0LL, download_item->GetReceivedBytes());
} }
} }