Update to Chromium revision beafd8cb (#314338).

- Remove unused CefContextMenuHandler::GetMisspellingHash() method.

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@2020 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2015-02-04 18:10:14 +00:00
parent 4f301a098b
commit 3dc9072f58
41 changed files with 331 additions and 244 deletions

View File

@@ -983,9 +983,9 @@ void CefBrowserHostImpl::WasHidden(bool hidden) {
web_contents()->GetRenderViewHost()->GetView());
if (view) {
if (hidden)
view->WasHidden();
view->Hide();
else
view->WasShown();
view->Show();
}
}
@@ -2492,7 +2492,7 @@ void CefBrowserHostImpl::DidFailLoad(
OnLoadEnd(frame, validated_url, error_code);
}
void CefBrowserHostImpl::FrameDetached(
void CefBrowserHostImpl::FrameDeleted(
content::RenderFrameHost* render_frame_host) {
base::AutoLock lock_scope(state_lock_);

View File

@@ -443,7 +443,7 @@ class CefBrowserHostImpl : public CefBrowserHost,
const GURL& validated_url,
int error_code,
const base::string16& error_description) override;
void FrameDetached(
void FrameDeleted(
content::RenderFrameHost* render_frame_host) override;
void PluginCrashed(const base::FilePath& plugin_path,
base::ProcessId plugin_pid) override;

View File

@@ -100,11 +100,6 @@ CefString CefContextMenuParamsImpl::GetMisspelledWord() {
return const_value().misspelled_word;
}
int CefContextMenuParamsImpl::GetMisspellingHash() {
CEF_VALUE_VERIFY_RETURN(false, 0);
return const_value().misspelling_hash;
}
bool CefContextMenuParamsImpl::GetDictionarySuggestions(
std::vector<CefString>& suggestions) {
CEF_VALUE_VERIFY_RETURN(false, false);

View File

@@ -32,7 +32,6 @@ class CefContextMenuParamsImpl
MediaStateFlags GetMediaStateFlags() override;
CefString GetSelectionText() override;
CefString GetMisspelledWord() override;
int GetMisspellingHash() override;
bool GetDictionarySuggestions(
std::vector<CefString>& suggestions) override;
bool IsEditable() override;

View File

@@ -28,6 +28,7 @@
#include "content/public/common/content_switches.h"
#include "content/public/common/url_constants.h"
#include "grit/cef_resources.h"
#include "net/base/net_errors.h"
#include "net/socket/tcp_server_socket.h"
#include "ui/base/layout.h"
#include "ui/base/resource/resource_bundle.h"
@@ -38,27 +39,36 @@ const char kTargetTypePage[] = "page";
const char kTargetTypeServiceWorker[] = "service_worker";
const char kTargetTypeOther[] = "other";
const int kBackLog = 10;
class TCPServerSocketFactory
: public content::DevToolsHttpHandler::ServerSocketFactory {
public:
TCPServerSocketFactory(const std::string& address, uint16 port, int backlog)
: content::DevToolsHttpHandler::ServerSocketFactory(
address, port, backlog) {}
TCPServerSocketFactory(const std::string& address, uint16 port)
: address_(address), port_(port) {
}
private:
// content::DevToolsHttpHandler::ServerSocketFactory.
scoped_ptr<net::ServerSocket> Create() const override {
return scoped_ptr<net::ServerSocket>(
new net::TCPServerSocket(NULL, net::NetLog::Source()));
// DevToolsHttpHandler::ServerSocketFactory.
scoped_ptr<net::ServerSocket> CreateForHttpServer() override {
scoped_ptr<net::ServerSocket> socket(
new net::TCPServerSocket(nullptr, net::NetLog::Source()));
if (socket->ListenWithAddressAndPort(address_, port_, kBackLog) != net::OK)
return scoped_ptr<net::ServerSocket>();
return socket;
}
std::string address_;
uint16 port_;
DISALLOW_COPY_AND_ASSIGN(TCPServerSocketFactory);
};
scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory>
CreateSocketFactory(uint16 port) {
return scoped_ptr<content::DevToolsHttpHandler::ServerSocketFactory>(
new TCPServerSocketFactory("127.0.0.1", port, 1));
new TCPServerSocketFactory("127.0.0.1", port));
}
class Target : public content::DevToolsTarget {
@@ -156,11 +166,6 @@ base::FilePath CefDevToolsDelegate::GetDebugFrontendDir() {
return base::FilePath();
}
scoped_ptr<net::ServerSocket>
CefDevToolsDelegate::CreateSocketForTethering(std::string* name) {
return scoped_ptr<net::ServerSocket>();
}
std::string CefDevToolsDelegate::GetChromeDevToolsURL() {
return base::StringPrintf("%s://%s/devtools.html",
content::kChromeDevToolsScheme, scheme::kChromeDevToolsHost);

View File

@@ -33,8 +33,6 @@ class CefDevToolsDelegate : public content::DevToolsHttpHandlerDelegate {
std::string GetDiscoveryPageHTML() override;
bool BundlesFrontendResources() override;
base::FilePath GetDebugFrontendDir() override;
scoped_ptr<net::ServerSocket> CreateSocketForTethering(
std::string* name) override;
// Returns the chrome-devtools URL.
std::string GetChromeDevToolsURL();

View File

@@ -12,7 +12,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/browser/printing/print_preview_dialog_controller.h"
#include "chrome/common/print_messages.h"
#include "components/printing/common/print_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/web_contents.h"

View File

@@ -17,8 +17,8 @@
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/browser/printing/printer_query.h"
#include "chrome/common/pref_names.h"
#include "chrome/common/print_messages.h"
#include "chrome/grit/generated_resources.h"
#include "components/printing/common/print_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/notification_details.h"
#include "content/public/browser/notification_service.h"

View File

@@ -10,7 +10,7 @@
#include "chrome/browser/browser_process.h"
#include "chrome/browser/printing/print_job_manager.h"
#include "chrome/browser/printing/printer_query.h"
#include "chrome/common/print_messages.h"
#include "components/printing/common/print_messages.h"
#include "content/public/browser/browser_thread.h"
#include "content/public/browser/render_view_host.h"
#include "content/public/browser/web_contents.h"

View File

@@ -27,5 +27,5 @@ bool CefLaunchProcess(CefRefPtr<CefCommandLine> command_line) {
CefValueController::AutoLock lock_scope(impl->controller());
base::LaunchOptions options;
return base::LaunchProcess(impl->command_line(), options, NULL);
return base::LaunchProcess(impl->command_line(), options).IsValid();
}

View File

@@ -192,7 +192,7 @@ class CefCopyFrameGenerator {
damage_rect));
request->set_area(gfx::Rect(view_->GetPhysicalBackingSize()));
view_->RequestCopyOfOutput(request.Pass());
view_->DelegatedFrameHostGetLayer()->RequestCopyOfOutput(request.Pass());
}
void CopyFromCompositingSurfaceHasResult(
@@ -473,7 +473,7 @@ CefRenderWidgetHostViewOSR::~CefRenderWidgetHostViewOSR() {
// necessary to remove all connections to its old ui::Compositor.
if (is_showing_)
delegated_frame_host_->WasHidden();
delegated_frame_host_->RemovingFromWindow();
delegated_frame_host_->ResetCompositor();
PlatformDestroyCompositorWidget();
@@ -532,11 +532,28 @@ bool CefRenderWidgetHostViewOSR::IsSurfaceAvailableForCopy() const {
}
void CefRenderWidgetHostViewOSR::Show() {
WasShown();
if (is_showing_)
return;
is_showing_ = true;
if (render_widget_host_)
render_widget_host_->WasShown(ui::LatencyInfo());
delegated_frame_host_->SetCompositor(compositor_.get());
delegated_frame_host_->WasShown(ui::LatencyInfo());
}
void CefRenderWidgetHostViewOSR::Hide() {
WasHidden();
if (!is_showing_)
return;
if (browser_impl_.get())
browser_impl_->CancelContextMenu();
if (render_widget_host_)
render_widget_host_->WasHidden();
delegated_frame_host_->WasHidden();
delegated_frame_host_->ResetCompositor();
is_showing_ = false;
}
bool CefRenderWidgetHostViewOSR::IsShowing() {
@@ -667,7 +684,7 @@ void CefRenderWidgetHostViewOSR::InitAsPopup(
handler->OnPopupSize(browser_impl_.get(), widget_pos);
ResizeRootLayer();
WasShown();
Show();
}
void CefRenderWidgetHostViewOSR::InitAsFullscreen(
@@ -675,31 +692,6 @@ void CefRenderWidgetHostViewOSR::InitAsFullscreen(
NOTREACHED() << "Fullscreen widgets are not supported in OSR";
}
void CefRenderWidgetHostViewOSR::WasShown() {
if (is_showing_)
return;
is_showing_ = true;
if (render_widget_host_)
render_widget_host_->WasShown(ui::LatencyInfo());
delegated_frame_host_->AddedToWindow();
delegated_frame_host_->WasShown(ui::LatencyInfo());
}
void CefRenderWidgetHostViewOSR::WasHidden() {
if (!is_showing_)
return;
if (browser_impl_.get())
browser_impl_->CancelContextMenu();
if (render_widget_host_)
render_widget_host_->WasHidden();
delegated_frame_host_->WasHidden();
delegated_frame_host_->RemovingFromWindow();
is_showing_ = false;
}
void CefRenderWidgetHostViewOSR::MovePluginWindows(
const std::vector<content::WebPluginGeometry>& moves) {
}
@@ -792,7 +784,7 @@ void CefRenderWidgetHostViewOSR::Destroy() {
} else {
if (popup_host_view_)
popup_host_view_->CancelPopupWidget();
WasHidden();
Hide();
}
}
@@ -986,24 +978,25 @@ CefRenderWidgetHostViewOSR::CreateSoftwareOutputDevice(
return make_scoped_ptr<cc::SoftwareOutputDevice>(software_output_device_);
}
ui::Compositor* CefRenderWidgetHostViewOSR::GetCompositor() const {
return compositor_.get();
}
ui::Layer* CefRenderWidgetHostViewOSR::GetLayer() {
ui::Layer* CefRenderWidgetHostViewOSR::DelegatedFrameHostGetLayer() const {
return root_layer_.get();
}
content::RenderWidgetHostImpl* CefRenderWidgetHostViewOSR::GetHost() {
DCHECK(render_widget_host_);
return render_widget_host_;
bool CefRenderWidgetHostViewOSR::DelegatedFrameHostIsVisible() const {
return !render_widget_host_->is_hidden();
}
bool CefRenderWidgetHostViewOSR::IsVisible() {
return IsShowing();
gfx::Size
CefRenderWidgetHostViewOSR::DelegatedFrameHostDesiredSizeInDIP() const {
return root_layer_->bounds().size();
}
scoped_ptr<content::ResizeLock> CefRenderWidgetHostViewOSR::CreateResizeLock(
bool CefRenderWidgetHostViewOSR::DelegatedFrameCanCreateResizeLock() const {
return !render_widget_host_->auto_resize_enabled();
}
scoped_ptr<content::ResizeLock>
CefRenderWidgetHostViewOSR::DelegatedFrameHostCreateResizeLock(
bool defer_compositor_lock) {
const gfx::Size& desired_size = root_layer_->bounds().size();
return scoped_ptr<content::ResizeLock>(new CefResizeLock(
@@ -1013,22 +1006,35 @@ scoped_ptr<content::ResizeLock> CefRenderWidgetHostViewOSR::CreateResizeLock(
kResizeLockTimeoutMs));
}
gfx::Size CefRenderWidgetHostViewOSR::DesiredFrameSize() {
return root_layer_->bounds().size();
void CefRenderWidgetHostViewOSR::DelegatedFrameHostResizeLockWasReleased() {
return render_widget_host_->WasResized();
}
float CefRenderWidgetHostViewOSR::CurrentDeviceScaleFactor() {
return scale_factor_;
void CefRenderWidgetHostViewOSR::DelegatedFrameHostSendCompositorSwapAck(
int output_surface_id,
const cc::CompositorFrameAck& ack) {
render_widget_host_->Send(new ViewMsg_SwapCompositorFrameAck(
render_widget_host_->GetRoutingID(),
output_surface_id, ack));
}
gfx::Size CefRenderWidgetHostViewOSR::ConvertViewSizeToPixel(
const gfx::Size& size) {
return content::ConvertViewSizeToPixel(this, size);
void
CefRenderWidgetHostViewOSR::DelegatedFrameHostSendReclaimCompositorResources(
int output_surface_id,
const cc::CompositorFrameAck& ack) {
render_widget_host_->Send(new ViewMsg_ReclaimCompositorResources(
render_widget_host_->GetRoutingID(),
output_surface_id, ack));
}
content::DelegatedFrameHost*
CefRenderWidgetHostViewOSR::GetDelegatedFrameHost() const {
return delegated_frame_host_.get();
void CefRenderWidgetHostViewOSR::DelegatedFrameHostOnLostCompositorResources() {
render_widget_host_->ScheduleComposite();
}
void CefRenderWidgetHostViewOSR::DelegatedFrameHostUpdateVSyncParameters(
const base::TimeTicks& timebase,
const base::TimeDelta& interval) {
render_widget_host_->UpdateVSyncParameters(timebase, interval);
}
bool CefRenderWidgetHostViewOSR::InstallTransparency() {
@@ -1334,7 +1340,7 @@ void CefRenderWidgetHostViewOSR::CancelPopupWidget() {
if (render_widget_host_)
render_widget_host_->LostCapture();
WasHidden();
Hide();
if (browser_impl_.get()) {
CefRefPtr<CefRenderHandler> handler =

View File

@@ -121,8 +121,6 @@ class CefRenderWidgetHostViewOSR
const gfx::Rect& pos) override;
void InitAsFullscreen(
content::RenderWidgetHostView* reference_host_view) override;
void WasShown() override;
void WasHidden() override;
void MovePluginWindows(
const std::vector<content::WebPluginGeometry>& moves) override;
void Blur() override;
@@ -209,16 +207,23 @@ class CefRenderWidgetHostViewOSR
ui::Compositor* compositor) override;
// DelegatedFrameHostClient implementation.
ui::Compositor* GetCompositor() const override;
ui::Layer* GetLayer() override;
content::RenderWidgetHostImpl* GetHost() override;
bool IsVisible() override;
scoped_ptr<content::ResizeLock> CreateResizeLock(
ui::Layer* DelegatedFrameHostGetLayer() const override;
bool DelegatedFrameHostIsVisible() const override;
gfx::Size DelegatedFrameHostDesiredSizeInDIP() const override;
bool DelegatedFrameCanCreateResizeLock() const override;
scoped_ptr<content::ResizeLock> DelegatedFrameHostCreateResizeLock(
bool defer_compositor_lock) override;
gfx::Size DesiredFrameSize() override;
float CurrentDeviceScaleFactor() override;
gfx::Size ConvertViewSizeToPixel(const gfx::Size& size) override;
content::DelegatedFrameHost* GetDelegatedFrameHost() const override;
void DelegatedFrameHostResizeLockWasReleased() override;
void DelegatedFrameHostSendCompositorSwapAck(
int output_surface_id,
const cc::CompositorFrameAck& ack) override;
void DelegatedFrameHostSendReclaimCompositorResources(
int output_surface_id,
const cc::CompositorFrameAck& ack) override;
void DelegatedFrameHostOnLostCompositorResources() override;
void DelegatedFrameHostUpdateVSyncParameters(
const base::TimeTicks& timebase,
const base::TimeDelta& interval) override;
bool InstallTransparency();

View File

@@ -29,9 +29,9 @@ void CefRenderWidgetHostViewOSR::SetActive(bool active) {
void CefRenderWidgetHostViewOSR::SetWindowVisibility(bool visible) {
if (visible)
WasShown();
Hide();
else
WasHidden();
Show();
}
void CefRenderWidgetHostViewOSR::WindowFrameChanged() {

View File

@@ -142,9 +142,10 @@ net::URLRequestContext* CefURLRequestContextGetter::GetURLRequestContext() {
storage_->set_network_delegate(new CefNetworkDelegate);
storage_->set_channel_id_service(new net::ChannelIDService(
new net::DefaultChannelIDStore(NULL),
base::WorkerPool::GetTaskRunner(true)));
storage_->set_channel_id_service(make_scoped_ptr(
new net::ChannelIDService(
new net::DefaultChannelIDStore(NULL),
base::WorkerPool::GetTaskRunner(true))));
storage_->set_http_user_agent_settings(
new CefHttpUserAgentSettings("en-us,en"));

View File

@@ -12,6 +12,7 @@
#include "base/values.h"
#include "content/public/common/common_param_traits.h"
#include "content/public/common/referrer.h"
#include "ui/gfx/ipc/gfx_param_traits.h"
#include "ipc/ipc_message_macros.h"
// TODO(cef): Re-using the message start for extensions may be problematic in
@@ -213,7 +214,6 @@ struct ParamTraits<scoped_refptr<net::UploadData> > {
#endif // CEF_LIBCEF_COMMON_CEF_MESSAGES_H_
#include "chrome/common/print_messages.h"
#include "chrome/common/spellcheck_messages.h"
#if defined(OS_WIN)

View File

@@ -38,10 +38,10 @@ MSVC_POP_WARNING();
#include "chrome/common/chrome_paths.h"
#include "chrome/renderer/loadtimes_extension_bindings.h"
#include "chrome/renderer/pepper/chrome_pdf_print_client.h"
#include "chrome/renderer/printing/print_web_view_helper.h"
#include "chrome/renderer/spellchecker/spellcheck.h"
#include "chrome/renderer/spellchecker/spellcheck_provider.h"
#include "components/pdf/renderer/ppb_pdf_impl.h"
#include "components/printing/renderer/print_web_view_helper.h"
#include "components/web_cache/renderer/web_cache_render_process_observer.h"
#include "content/child/child_thread.h"
#include "content/child/worker_task_runner.h"
@@ -50,6 +50,7 @@ MSVC_POP_WARNING();
#include "content/public/browser/render_process_host.h"
#include "content/public/common/content_constants.h"
#include "content/public/common/content_paths.h"
#include "content/public/renderer/plugin_instance_throttler.h"
#include "content/public/renderer/render_thread.h"
#include "content/public/renderer/render_view.h"
#include "content/public/renderer/render_view_visitor.h"
@@ -165,6 +166,18 @@ class CefPrintWebViewHelperDelegate :
return blink::WebElement();
}
bool IsOutOfProcessPdfEnabled() override {
return false;
}
bool IsPrintPreviewEnabled() override {
return false;
}
bool OverridePrint(blink::WebLocalFrame* frame) override {
return false;
}
private:
DISALLOW_COPY_AND_ASSIGN(CefPrintWebViewHelperDelegate);
};
@@ -602,8 +615,7 @@ bool CefContentRendererClient::OverrideCreatePlugin(
params_to_use.attributeValues.swap(new_values);
*plugin = render_frame_impl->CreatePlugin(
frame, info, params_to_use,
content::RenderFrame::POWER_SAVER_MODE_ESSENTIAL);
frame, info, params_to_use, nullptr);
return true;
}
#endif // defined(ENABLE_PLUGINS)
@@ -783,8 +795,6 @@ void CefContentRendererClient::BrowserCreated(
new CefPrerendererClient(render_view);
new printing::PrintWebViewHelper(
render_view,
false,
true,
make_scoped_ptr<printing::PrintWebViewHelper::Delegate>(
new CefPrintWebViewHelperDelegate()));

View File

@@ -552,7 +552,8 @@ v8::Local<v8::Value> CallV8Function(v8::Handle<v8::Context> context,
// Execute the function call using the ScriptController so that inspector
// instrumentation works.
if (CEF_CURRENTLY_ON_RT()) {
RefPtr<blink::LocalFrame> frame = blink::toFrameIfNotDetached(context);
RefPtr<blink::LocalFrame> frame =
toLocalFrame(blink::toFrameIfNotDetached(context));
DCHECK(frame);
if (frame &&
frame->script().canExecuteScripts(blink::AboutToExecuteScript)) {