Commit 12aeeb13 authored by Marshall Greenblatt's avatar Marshall Greenblatt

Update to Chromium revision 3a87aecc (#433059)

parent c6881fe1
......@@ -99,8 +99,12 @@ import("//build/config/locales.gni")
import("//build/config/sanitizers/sanitizers.gni")
import("//build/config/ui.gni")
import("//cef/cef_repack_locales.gni")
import("//chrome/common/features.gni")
import("//extensions/features/features.gni")
import("//media/media_options.gni")
import("//mojo/public/tools/bindings/mojom.gni")
import("//ppapi/features/features.gni")
import("//printing/features/features.gni")
import("//third_party/icu/config.gni")
import("//third_party/widevine/cdm/widevine.gni")
import("//tools/grit/repack.gni")
......@@ -318,10 +322,10 @@ static_library("libcef_static") {
"libcef/browser/net/network_delegate.h",
"libcef/browser/net/resource_request_job.cc",
"libcef/browser/net/resource_request_job.h",
"libcef/browser/net/response_filter_wrapper.cc",
"libcef/browser/net/response_filter_wrapper.h",
"libcef/browser/net/scheme_handler.cc",
"libcef/browser/net/scheme_handler.h",
"libcef/browser/net/source_stream.cc",
"libcef/browser/net/source_stream.h",
"libcef/browser/net/url_request_context.cc",
"libcef/browser/net/url_request_context.h",
"libcef/browser/net/url_request_context_getter.h",
......@@ -608,12 +612,13 @@ static_library("libcef_static") {
"//content/public/renderer",
"//content/public/utility",
"//crypto",
"//device/core",
"//device/base",
"//device/geolocation",
"//device/hid",
"//extensions/browser",
"//extensions/browser/api:api_registration",
"//extensions/common/api",
"//extensions/common/api:api_registration",
"//extensions/features",
"//extensions/renderer",
"//extensions/utility",
"//gpu",
......@@ -624,6 +629,8 @@ static_library("libcef_static") {
"//net:net_browser_services",
"//net:net_with_v8",
"//pdf",
"//ppapi/features",
"//printing/features",
"//skia",
"//storage/browser",
"//third_party/brotli",
......@@ -632,7 +639,7 @@ static_library("libcef_static") {
"//third_party/leveldatabase",
"//third_party/libxml",
"//third_party/WebKit/public:blink",
"//third_party/widevine/cdm:version_h",
"//third_party/widevine/cdm:headers",
"//third_party/icu",
"//third_party/zlib:minizip",
"//ui/base",
......@@ -672,8 +679,10 @@ static_library("libcef_static") {
"libcef/browser/osr/browser_platform_delegate_osr_win.cc",
"libcef/browser/osr/browser_platform_delegate_osr_win.h",
"libcef/browser/osr/render_widget_host_view_osr_win.cc",
"libcef/utility/printing_handler.cc",
"libcef/utility/printing_handler.h",
# Part of //chrome/utility.
"//chrome/utility/printing_handler.cc",
"//chrome/utility/printing_handler.h",
]
deps += [
......
......@@ -7,5 +7,5 @@
# https://bitbucket.org/chromiumembedded/cef/wiki/BranchesAndBuilding
{
'chromium_checkout': '614d31daee2f61b0180df403a8ad43f20b9f6dd7',
'chromium_checkout': '3a87aecc31cd1ffe751dd72c04e5a96a1fc8108a',
}
......@@ -62,22 +62,35 @@ typedef struct _cef_response_filter_t {
int (CEF_CALLBACK *init_filter)(struct _cef_response_filter_t* self);
///
// Called to filter a chunk of data. |data_in| is the input buffer containing
// |data_in_size| bytes of pre-filter data (|data_in| will be NULL if
// |data_in_size| is zero). |data_out| is the output buffer that can accept up
// to |data_out_size| bytes of filtered output data. Set |data_in_read| to the
// number of bytes that were read from |data_in|. Set |data_out_written| to
// the number of bytes that were written into |data_out|. If some or all of
// the pre-filter data was read successfully but more data is needed in order
// to continue filtering (filtered output is pending) return
// RESPONSE_FILTER_NEED_MORE_DATA. If some or all of the pre-filter data was
// read successfully and all available filtered output has been written return
// RESPONSE_FILTER_DONE. If an error occurs during filtering return
// RESPONSE_FILTER_ERROR. This function will be called repeatedly until there
// is no more data to filter (resource response is complete), |data_in_read|
// matches |data_in_size| (all available pre-filter bytes have been read), and
// the function returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not
// keep a reference to the buffers passed to this function.
// Called to filter a chunk of data. Expected usage is as follows:
//
// A. Read input data from |data_in| and set |data_in_read| to the number of
// bytes that were read up to a maximum of |data_in_size|. |data_in| will
// be NULL if |data_in_size| is zero.
// B. Write filtered output data to |data_out| and set |data_out_written| to
// the number of bytes that were written up to a maximum of
// |data_out_size|. If no output data was written then all data must be
// read from |data_in| (user must set |data_in_read| = |data_in_size|).
// C. Return RESPONSE_FILTER_DONE if all output data was written or
// RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending.
//
// This function will be called repeatedly until the input buffer has been
// fully read (user sets |data_in_read| = |data_in_size|) and there is no more
// input data to filter (the resource response is complete). This function may
// then be called an additional time with an NULL input buffer if the user
// filled the output buffer (set |data_out_written| = |data_out_size|) and
// returned RESPONSE_FILTER_NEED_MORE_DATA to indicate that output data is
// still pending.
//
// Calls to this function will stop when one of the following conditions is
// met:
//
// A. There is no more input data to filter (the resource response is
// complete) and the user sets |data_out_written| = 0 or returns
// RESPONSE_FILTER_DONE to indicate that all data has been written, or;
// B. The user returns RESPONSE_FILTER_ERROR to indicate an error.
//
// Do not keep a reference to the buffers passed to this function.
///
cef_response_filter_status_t (CEF_CALLBACK *filter)(
struct _cef_response_filter_t* self, void* data_in, size_t data_in_size,
......
......@@ -57,22 +57,34 @@ class CefResponseFilter : public virtual CefBase {
virtual bool InitFilter() =0;
///
// Called to filter a chunk of data. |data_in| is the input buffer containing
// |data_in_size| bytes of pre-filter data (|data_in| will be NULL if
// |data_in_size| is zero). |data_out| is the output buffer that can accept up
// to |data_out_size| bytes of filtered output data. Set |data_in_read| to the
// number of bytes that were read from |data_in|. Set |data_out_written| to
// the number of bytes that were written into |data_out|. If some or all of
// the pre-filter data was read successfully but more data is needed in order
// to continue filtering (filtered output is pending) return
// RESPONSE_FILTER_NEED_MORE_DATA. If some or all of the pre-filter data was
// read successfully and all available filtered output has been written return
// RESPONSE_FILTER_DONE. If an error occurs during filtering return
// RESPONSE_FILTER_ERROR. This method will be called repeatedly until there is
// no more data to filter (resource response is complete), |data_in_read|
// matches |data_in_size| (all available pre-filter bytes have been read), and
// the method returns RESPONSE_FILTER_DONE or RESPONSE_FILTER_ERROR. Do not
// keep a reference to the buffers passed to this method.
// Called to filter a chunk of data. Expected usage is as follows:
//
// A. Read input data from |data_in| and set |data_in_read| to the number of
// bytes that were read up to a maximum of |data_in_size|. |data_in| will
// be NULL if |data_in_size| is zero.
// B. Write filtered output data to |data_out| and set |data_out_written| to
// the number of bytes that were written up to a maximum of
// |data_out_size|. If no output data was written then all data must be
// read from |data_in| (user must set |data_in_read| = |data_in_size|).
// C. Return RESPONSE_FILTER_DONE if all output data was written or
// RESPONSE_FILTER_NEED_MORE_DATA if output data is still pending.
//
// This method will be called repeatedly until the input buffer has been
// fully read (user sets |data_in_read| = |data_in_size|) and there is no
// more input data to filter (the resource response is complete). This method
// may then be called an additional time with an empty input buffer if the
// user filled the output buffer (set |data_out_written| = |data_out_size|)
// and returned RESPONSE_FILTER_NEED_MORE_DATA to indicate that output data is
// still pending.
//
// Calls to this method will stop when one of the following conditions is met:
//
// A. There is no more input data to filter (the resource response is
// complete) and the user sets |data_out_written| = 0 or returns
// RESPONSE_FILTER_DONE to indicate that all data has been written, or;
// B. The user returns RESPONSE_FILTER_ERROR to indicate an error.
//
// Do not keep a reference to the buffers passed to this method.
///
/*--cef(optional_param=data_in,default_retval=RESPONSE_FILTER_ERROR)--*/
virtual FilterStatus Filter(void* data_in,
......
......@@ -563,12 +563,6 @@ typedef struct _cef_browser_settings_t {
///
cef_state_t javascript_dom_paste;
///
// Controls whether the caret position will be drawn. Also configurable using
// the "enable-caret-browsing" command-line switch.
///
cef_state_t caret_browsing;
///
// Controls whether any plugins will be loaded. Also configurable using the
// "disable-plugins" command-line switch.
......
......@@ -705,7 +705,6 @@ struct CefBrowserSettingsTraits {
target->javascript_close_windows = src->javascript_close_windows;
target->javascript_access_clipboard = src->javascript_access_clipboard;
target->javascript_dom_paste = src->javascript_dom_paste;
target->caret_browsing = src->caret_browsing;
target->plugins = src->plugins;
target->universal_access_from_file_urls =
src->universal_access_from_file_urls;
......
......@@ -741,7 +741,8 @@ void CefBrowserHostImpl::Print() {
if (!actionable_contents)
return;
printing::CefPrintViewManager::FromWebContents(
actionable_contents)->PrintNow();
actionable_contents)->PrintNow(
actionable_contents->GetRenderViewHost()->GetMainFrame());
} else {
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::Print, this));
......@@ -762,7 +763,8 @@ void CefBrowserHostImpl::PrintToPDF(const CefString& path,
callback.get(), path);
}
printing::CefPrintViewManager::FromWebContents(actionable_contents)->
PrintToPDF(base::FilePath(path), settings, pdf_callback);
PrintToPDF(actionable_contents->GetMainFrame(), base::FilePath(path),
settings, pdf_callback);
} else {
CEF_POST_TASK(CEF_UIT,
base::Bind(&CefBrowserHostImpl::PrintToPDF, this, path, settings,
......@@ -1413,7 +1415,8 @@ void CefBrowserHostImpl::DestroyBrowser() {
menu_manager_->Destroy();
// Notify any observers that may have state associated with this browser.
FOR_EACH_OBSERVER(Observer, observers_, OnBrowserDestroyed(this));
for (auto& observer : observers_)
observer.OnBrowserDestroyed(this);
// Disassociate the platform delegate from this browser.
platform_delegate_->BrowserDestroyed(this);
......@@ -2108,11 +2111,12 @@ void CefBrowserHostImpl::UpdateTargetURL(content::WebContents* source,
}
}
bool CefBrowserHostImpl::AddMessageToConsole(content::WebContents* source,
int32_t level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) {
bool CefBrowserHostImpl::DidAddMessageToConsole(
content::WebContents* source,
int32_t level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) {
if (client_.get()) {
CefRefPtr<CefDisplayHandler> handler = client_->GetDisplayHandler();
if (handler.get())
......@@ -2355,28 +2359,21 @@ void CefBrowserHostImpl::RequestMediaAccessPermission(
bool webcam_requested =
(request.video_type == content::MEDIA_DEVICE_VIDEO_CAPTURE);
if (microphone_requested || webcam_requested) {
switch (request.request_type) {
case content::MEDIA_OPEN_DEVICE_PEPPER_ONLY:
case content::MEDIA_DEVICE_ACCESS:
case content::MEDIA_GENERATE_STREAM:
case content::MEDIA_ENUMERATE_DEVICES:
// Pick the desired device or fall back to the first available of the
// given type.
if (microphone_requested) {
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
request.requested_audio_device_id,
true,
false,
&devices);
}
if (webcam_requested) {
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
request.requested_video_device_id,
false,
true,
&devices);
}
break;
// Pick the desired device or fall back to the first available of the
// given type.
if (microphone_requested) {
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
request.requested_audio_device_id,
true,
false,
&devices);
}
if (webcam_requested) {
CefMediaCaptureDevicesDispatcher::GetInstance()->GetRequestedDevice(
request.requested_video_device_id,
false,
true,
&devices);
}
}
......@@ -3015,6 +3012,24 @@ gfx::Point CefBrowserHostImpl::GetScreenPoint(const gfx::Point& view) const {
return gfx::Point();
}
void CefBrowserHostImpl::StartDragging(
const content::DropData& drop_data,
blink::WebDragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset,
const content::DragEventSourceInfo& event_info,
content::RenderWidgetHostImpl* source_rwh) {
if (platform_delegate_) {
platform_delegate_->StartDragging(drop_data, allowed_ops, image,
image_offset, event_info, source_rwh);
}
}
void CefBrowserHostImpl::UpdateDragCursor(blink::WebDragOperation operation) {
if (platform_delegate_)
platform_delegate_->UpdateDragCursor(operation);
}
void CefBrowserHostImpl::OnAddressChange(CefRefPtr<CefFrame> frame,
const GURL& url) {
if (client_.get()) {
......
......@@ -32,6 +32,11 @@
#include "content/public/browser/web_contents_delegate.h"
#include "content/public/browser/web_contents_observer.h"
namespace content {
struct DragEventSourceInfo;
class RenderWidgetHostImpl;
}
namespace net {
class URLRequest;
}
......@@ -323,6 +328,15 @@ class CefBrowserHostImpl : public CefBrowserHost,
// scaling will be applied to the result.
gfx::Point GetScreenPoint(const gfx::Point& view) const;
void StartDragging(
const content::DropData& drop_data,
blink::WebDragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset,
const content::DragEventSourceInfo& event_info,
content::RenderWidgetHostImpl* source_rwh);
void UpdateDragCursor(blink::WebDragOperation operation);
// Thread safe accessors.
const CefBrowserSettings& settings() const { return settings_; }
CefRefPtr<CefClient> client() const { return client_; }
......@@ -365,11 +379,11 @@ class CefBrowserHostImpl : public CefBrowserHost,
void CloseContents(content::WebContents* source) override;
void UpdateTargetURL(content::WebContents* source,
const GURL& url) override;
bool AddMessageToConsole(content::WebContents* source,
int32_t level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) override;
bool DidAddMessageToConsole(content::WebContents* source,
int32_t level,
const base::string16& message,
int32_t line_no,
const base::string16& source_id) override;
void BeforeUnloadFired(content::WebContents* source,
bool proceed,
bool* proceed_to_fire_unload) override;
......
......@@ -18,6 +18,7 @@
#include "libcef/browser/extensions/extensions_browser_client.h"
#include "libcef/browser/extensions/extension_system_factory.h"
#include "libcef/browser/net/chrome_scheme_handler.h"
#include "libcef/browser/printing/printing_message_filter.h"
#include "libcef/browser/thread_util.h"
#include "libcef/common/extensions/extensions_client.h"
#include "libcef/common/extensions/extensions_util.h"
......@@ -181,6 +182,8 @@ void CefBrowserMainParts::PreMainMessageLoopRun() {
extensions::CefExtensionSystemFactory::GetInstance();
}
printing::CefPrintingMessageFilter::EnsureShutdownNotifierFactoryBuilt();
CefRequestContextSettings settings;
CefContext::Get()->PopulateRequestContextSettings(&settings);
......
......@@ -177,6 +177,21 @@ void CefBrowserPlatformDelegate::DragTargetDrop(const CefMouseEvent& event) {
NOTREACHED();
}
void CefBrowserPlatformDelegate::StartDragging(
const content::DropData& drop_data,
blink::WebDragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset,
const content::DragEventSourceInfo& event_info,
content::RenderWidgetHostImpl* source_rwh) {
NOTREACHED();
}
void CefBrowserPlatformDelegate::UpdateDragCursor(
blink::WebDragOperation operation) {
NOTREACHED();
}
void CefBrowserPlatformDelegate::DragSourceEndedAt(
int x, int y,
cef_drag_operations_mask_t op) {
......
......@@ -244,6 +244,14 @@ class CefBrowserPlatformDelegate {
cef_drag_operations_mask_t allowed_ops);
virtual void DragTargetDragLeave();
virtual void DragTargetDrop(const CefMouseEvent& event);
virtual void StartDragging(
const content::DropData& drop_data,
blink::WebDragOperationsMask allowed_ops,
const gfx::ImageSkia& image,
const gfx::Vector2d& image_offset,
const content::DragEventSourceInfo& event_info,
content::RenderWidgetHostImpl* source_rwh);
virtual void UpdateDragCursor(blink::WebDragOperation operation);
virtual void DragSourceEndedAt(int x, int y,
cef_drag_operations_mask_t op);
virtual void DragSourceSystemDragEnded();
......
......@@ -82,7 +82,7 @@ class NET_EXPORT CefURLFetcherResponseWriter :
return num_bytes;
}
int Finish(const net::CompletionCallback& callback) override {
int Finish(int net_error, const net::CompletionCallback& callback) override {
if (url_request_.get())
url_request_ = NULL;
return net::OK;
......
......@@ -39,7 +39,9 @@
#include "base/base_switches.h"
#include "base/command_line.h"
#include "base/files/file_path.h"
#include "base/json/json_reader.h"
#include "base/path_service.h"
#include "cef/grit/cef_resources.h"
#include "chrome/browser/spellchecker/spellcheck_message_filter.h"
#include "chrome/common/chrome_switches.h"
#include "components/navigation_interception/intercept_navigation_throttle.h"
......@@ -60,6 +62,7 @@
#include "content/public/browser/render_widget_host_view.h"
#include "content/public/browser/resource_dispatcher_host.h"
#include "content/public/common/content_switches.h"
#include "content/public/common/service_names.mojom.h"
#include "content/public/common/storage_quota_params.h"
#include "content/public/common/web_preferences.h"
#include "extensions/browser/extensions_browser_client.h"
......@@ -72,6 +75,7 @@
#include "net/ssl/ssl_cert_request_info.h"
#include "ppapi/host/ppapi_host.h"
#include "third_party/WebKit/public/web/WebWindowFeatures.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/base/ui_base_switches.h"
#include "url/gurl.h"
......@@ -457,9 +461,10 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
const base::CommandLine* command_line =
base::CommandLine::ForCurrentProcess();
const int id = host->GetID();
Profile* profile = Profile::FromBrowserContext(host->GetBrowserContext());
host->GetChannel()->AddFilter(new CefBrowserMessageFilter(id));
host->AddFilter(new printing::CefPrintingMessageFilter(id));
host->AddFilter(new printing::CefPrintingMessageFilter(id, profile));
if (!command_line->HasSwitch(switches::kDisableSpellChecking)) {
host->AddFilter(new SpellCheckMessageFilter(id));
......@@ -468,18 +473,16 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
#endif
}
content::BrowserContext* browser_context = host->GetBrowserContext();
host->AddFilter(new CefPluginInfoMessageFilter(id,
static_cast<CefBrowserContext*>(browser_context)));
static_cast<CefBrowserContext*>(profile)));
if (extensions::ExtensionsEnabled()) {
host->AddFilter(
new extensions::ExtensionMessageFilter(id, browser_context));
new extensions::ExtensionMessageFilter(id, profile));
host->AddFilter(
new extensions::IOThreadExtensionMessageFilter(id, browser_context));
new extensions::IOThreadExtensionMessageFilter(id, profile));
host->AddFilter(
new extensions::ExtensionsGuestViewMessageFilter(id, browser_context));
new extensions::ExtensionsGuestViewMessageFilter(id, profile));
}
// If the renderer process crashes then the host may already have
......@@ -489,7 +492,7 @@ void CefContentBrowserClient::RenderProcessWillLaunch(
host->AddObserver(CefBrowserInfoManager::GetInstance());
host->Send(new CefProcessMsg_SetIsIncognitoProcess(
browser_context->IsOffTheRecord()));
profile->IsOffTheRecord()));
}
bool CefContentBrowserClient::ShouldUseProcessPerSite(
......@@ -587,6 +590,25 @@ void CefContentBrowserClient::SiteInstanceDeleting(
site_instance->GetId()));
}
std::unique_ptr<base::Value>
CefContentBrowserClient::GetServiceManifestOverlay(
const std::string& name) {
int id = -1;
if (name == content::mojom::kBrowserServiceName)
id = IDR_CEF_BROWSER_MANIFEST_OVERLAY;
else if (name == content::mojom::kRendererServiceName)
id = IDR_CEF_RENDERER_MANIFEST_OVERLAY;
else if (name == content::mojom::kUtilityServiceName)
id = IDR_CEF_UTILITY_MANIFEST_OVERLAY;
if (id == -1)
return nullptr;
base::StringPiece manifest_contents =
ui::ResourceBundle::GetSharedInstance().GetRawDataResourceForScale(
id, ui::ScaleFactor::SCALE_FACTOR_NONE);
return base::JSONReader::Read(manifest_contents);
}
void CefContentBrowserClient::AppendExtraCommandLineSwitches(
base::CommandLine* command_line, int child_process_id) {
const base::CommandLine* browser_cmd =
......@@ -660,7 +682,7 @@ void CefContentBrowserClient::AppendExtraCommandLineSwitches(
command_line->CopySwitchesFrom(*browser_cmd, kSwitchNames,
arraysize(kSwitchNames));
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
if (!browser_cmd->HasSwitch(switches::kNoSandbox)) {
// Pass the Widevine CDM path to the Zygote process. See comments in
// CefWidevineLoader::AddPepperPlugins.
......
......@@ -46,6 +46,8 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
bool IsHandledURL(const GURL& url) override;
void SiteInstanceGotProcess(content::SiteInstance* site_instance) override;
void SiteInstanceDeleting(content::SiteInstance* site_instance) override;
std::unique_ptr<base::Value> GetServiceManifestOverlay(
const std::string& name) override;
void AppendExtraCommandLineSwitches(base::CommandLine* command_line,
int child_process_id) override;
content::QuotaPermissionContext*
......@@ -104,7 +106,7 @@ class CefContentBrowserClient : public content::ContentBrowserClient {
#endif
#if defined(OS_WIN)
const wchar_t* GetResourceDllName() override;
const wchar_t* GetResourceDllName();
bool PreSpawnRenderer(sandbox::TargetPolicy* policy) override;
#endif
......
......@@ -398,7 +398,7 @@ void CefContext::OnContextInitialized() {
static_cast<ChromeBrowserProcessStub*>(g_browser_process)->
OnContextInitialized();
#if defined(WIDEVINE_CDM_AVAILABLE) && defined(ENABLE_PEPPER_CDMS)
#if defined(WIDEVINE_CDM_AVAILABLE) && BUILDFLAG(ENABLE_PEPPER_CDMS)
CefWidevineLoader::GetInstance()->OnContextInitialized();
#endif
......
......@@ -48,7 +48,7 @@ class ResponseWriter : public net::URLFetcherResponseWriter {
int Write(net::IOBuffer* buffer,
int num_bytes,
const net::CompletionCallback& callback) override;
int Finish(const net::CompletionCallback& callback) override;
int Finish(int net_error, const net::CompletionCallback& callback) override;
private:
base::WeakPtr<CefDevToolsFrontend> shell_devtools_;
......@@ -89,7 +89,8 @@ int ResponseWriter::Write(net::IOBuffer* buffer,
return num_bytes;
}
int ResponseWriter::Finish(const net::CompletionCallback& callback) {
int ResponseWriter::Finish(int net_error,
const net::CompletionCallback& callback) {
return net::OK;
}
......
......@@ -195,8 +195,10 @@ void CefJavaScriptDialogManager::RunBeforeUnloadDialog(
weak_ptr_factory_.GetWeakPtr(), callback));
}
void CefJavaScriptDialogManager::CancelActiveAndPendingDialogs(
content::WebContents* web_contents) {
void CefJavaScriptDialogManager::CancelDialogs(
content::WebContents* web_contents,
bool suppress_callbacks,
bool reset_state) {
CefRefPtr<CefClient> client = browser_->GetClient();
if (client.get()) {
CefRefPtr<CefJSDialogHandler> handler = client->GetJSDialogHandler();
......@@ -212,10 +214,6 @@ void CefJavaScriptDialogManager::CancelActiveAndPendingDialogs(
}
}
void CefJavaScriptDialogManager::ResetDialogState(
content::WebContents* web_contents) {
}
void CefJavaScriptDialogManager::DialogClosed(
const DialogClosedCallback& callback,
bool success,
......
......@@ -41,10 +41,9 @@ class CefJavaScriptDialogManager : public content::JavaScriptDialogManager {
content::WebContents* web_contents,
bool is_reload,
const DialogClosedCallback& callback) override;
void CancelActiveAndPendingDialogs(
content::WebContents* web_contents) override;
void ResetDialogState(
content::WebContents* web_contents) override;
void CancelDialogs(content::WebContents* web_contents,
bool suppress_callbacks,
bool reset_state) override;
private:
// Method executed by the callback passed to CefJavaScriptDialogRunner::Run.
......
......@@ -654,7 +654,8 @@ void CefMenuModelImpl::MenuWillShow() {
delegate_->MenuWillShow(this);
if (menu_model_delegate_)
menu_model_delegate_->MenuWillShow(this);
FOR_EACH_OBSERVER(Observer, observers_, MenuWillShow(this));
for (auto& observer : observers_)
observer.MenuWillShow(this);
}
void CefMenuModelImpl::MenuWillClose() {
......@@ -776,7 +777,8 @@ void CefMenuModelImpl::OnMenuClosed() {
delegate_->MenuClosed(this);
if (menu_model_delegate_)
menu_model_delegate_->MenuClosed(this);
FOR_EACH_OBSERVER(Observer, observers_, MenuClosed(this));
for (auto& observer : observers_)
observer.MenuClosed(this);
}