diff options
author | rockot <rockot@chromium.org> | 2015-08-22 18:42:04 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-08-23 01:42:53 +0000 |
commit | bd9bf5a43f904f59ebac4f0982a3e3ddddf61e4b (patch) | |
tree | 3c161b06e3a5e95ad142a7f4ea28b0816ba0fb9e /content | |
parent | 59c45a7ebc21338ca0bf3b5e10b815a18e9ac7b9 (diff) | |
download | chromium_src-bd9bf5a43f904f59ebac4f0982a3e3ddddf61e4b.zip chromium_src-bd9bf5a43f904f59ebac4f0982a3e3ddddf61e4b.tar.gz chromium_src-bd9bf5a43f904f59ebac4f0982a3e3ddddf61e4b.tar.bz2 |
Revert of Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598 (patchset #1 id:1 of https://codereview.chromium.org/1310103002/ )
Reason for revert:
Looks like this breaks mojo_system_unittests on Android...
http://build.chromium.org/p/chromium.linux/buildstatus?builder=Android%20GN&number=29595
Original issue's description:
> Update mojo sdk to rev c02a28868825edfa57ab77947b8cb15e741c5598
>
> Re-land. Previously conflicted with another CL that landed
> just before the roll.
>
> BUG=None
> TBR=jam@chromium.org,ben@chromium.org
> TBR=mfoltz@chromium.org
> TBR=mek@chromium.org
> TBR=xhwang@chromium.org
> TBR=shess@chromium.org
>
> Committed: https://crrev.com/0bfe154baad9ddfb1f0c6ecc7cace36e8f430e75
> Cr-Commit-Position: refs/heads/master@{#344994}
TBR=ben@chromium.org,jam@chromium.org,mek@chromium.org,mfoltz@chromium.org,shess@chromium.org,xhwang@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=None
Review URL: https://codereview.chromium.org/1309103002
Cr-Commit-Position: refs/heads/master@{#344996}
Diffstat (limited to 'content')
7 files changed, 21 insertions, 10 deletions
diff --git a/content/browser/presentation/presentation_service_impl.cc b/content/browser/presentation/presentation_service_impl.cc index 80e2aea..97b5ddd 100644 --- a/content/browser/presentation/presentation_service_impl.cc +++ b/content/browser/presentation/presentation_service_impl.cc @@ -169,10 +169,12 @@ void PresentationServiceImpl::Bind( mojo::InterfaceRequest<presentation::PresentationService> request) { binding_.reset(new mojo::Binding<presentation::PresentationService>( this, request.Pass())); - binding_->set_connection_error_handler([this]() { - DVLOG(1) << "Connection error"; - delete this; - }); + binding_->set_error_handler(this); +} + +void PresentationServiceImpl::OnConnectionError() { + DVLOG(1) << "OnConnectionError"; + delete this; } void PresentationServiceImpl::SetClient( diff --git a/content/browser/presentation/presentation_service_impl.h b/content/browser/presentation/presentation_service_impl.h index 0a3fe6f..2e991fa 100644 --- a/content/browser/presentation/presentation_service_impl.h +++ b/content/browser/presentation/presentation_service_impl.h @@ -26,7 +26,6 @@ #include "content/public/browser/presentation_service_delegate.h" #include "content/public/browser/web_contents_observer.h" #include "content/public/common/frame_navigate_params.h" -#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" namespace content { @@ -49,6 +48,7 @@ using NewSessionMojoCallback = mojo::Callback< // from the renderer when the first presentation API request is handled. class CONTENT_EXPORT PresentationServiceImpl : public NON_EXPORTED_BASE(presentation::PresentationService), + public mojo::ErrorHandler, public WebContentsObserver, public PresentationServiceDelegate::Observer { public: @@ -198,6 +198,10 @@ class CONTENT_EXPORT PresentationServiceImpl // Creates a binding between this object and |request|. void Bind(mojo::InterfaceRequest<presentation::PresentationService> request); + // mojo::ErrorHandler override. + // Note that this is called when the RenderFrameHost is deleted. + void OnConnectionError() override; + // WebContentsObserver override. void DidNavigateAnyFrame( content::RenderFrameHost* render_frame_host, diff --git a/content/child/navigator_connect/service_port_provider.h b/content/child/navigator_connect/service_port_provider.h index e99c9be..7764be0 100644 --- a/content/child/navigator_connect/service_port_provider.h +++ b/content/child/navigator_connect/service_port_provider.h @@ -11,7 +11,6 @@ #include "content/child/worker_task_runner.h" #include "content/common/service_port_service.mojom.h" #include "third_party/WebKit/public/platform/modules/navigator_services/WebServicePortProvider.h" -#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" class GURL; diff --git a/content/renderer/presentation/presentation_dispatcher.h b/content/renderer/presentation/presentation_dispatcher.h index 71bbd0e..e332a46 100644 --- a/content/renderer/presentation/presentation_dispatcher.h +++ b/content/renderer/presentation/presentation_dispatcher.h @@ -5,8 +5,6 @@ #ifndef CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ #define CONTENT_RENDERER_PRESENTATION_PRESENTATION_DISPATCHER_H_ -#include <queue> - #include "base/compiler_specific.h" #include "base/containers/scoped_ptr_map.h" #include "base/id_map.h" @@ -16,7 +14,6 @@ #include "content/common/presentation/presentation_service.mojom.h" #include "content/public/renderer/render_frame_observer.h" #include "third_party/WebKit/public/platform/modules/presentation/WebPresentationClient.h" -#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h" namespace blink { class WebPresentationAvailabilityObserver; diff --git a/content/renderer/usb/web_usb_client_impl.cc b/content/renderer/usb/web_usb_client_impl.cc index ac4f681..84062d9 100644 --- a/content/renderer/usb/web_usb_client_impl.cc +++ b/content/renderer/usb/web_usb_client_impl.cc @@ -22,6 +22,7 @@ #include "third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceRequestOptions.h" #include "third_party/WebKit/public/platform/modules/webusb/WebUSBError.h" #include "third_party/mojo/src/mojo/public/cpp/bindings/array.h" +#include "third_party/mojo/src/mojo/public/cpp/bindings/error_handler.h" #include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h" namespace content { diff --git a/content/renderer/usb/web_usb_device_impl.cc b/content/renderer/usb/web_usb_device_impl.cc index d9b1dd8..e59d5bf 100644 --- a/content/renderer/usb/web_usb_device_impl.cc +++ b/content/renderer/usb/web_usb_device_impl.cc @@ -106,4 +106,8 @@ void WebUSBDeviceImpl::reset(blink::WebUSBDeviceResetCallbacks* callbacks) { RejectAsNotImplemented(callbacks); } +void WebUSBDeviceImpl::OnConnectionError() { + device_.reset(); +} + } // namespace content diff --git a/content/renderer/usb/web_usb_device_impl.h b/content/renderer/usb/web_usb_device_impl.h index 3f6eab5..7f01d8d 100644 --- a/content/renderer/usb/web_usb_device_impl.h +++ b/content/renderer/usb/web_usb_device_impl.h @@ -14,6 +14,7 @@ #include "third_party/WebKit/public/platform/modules/webusb/WebUSBDevice.h" #include "third_party/WebKit/public/platform/modules/webusb/WebUSBDeviceInfo.h" #include "third_party/WebKit/public/platform/modules/webusb/WebUSBError.h" +#include "third_party/mojo/src/mojo/public/cpp/bindings/error_handler.h" namespace mojo { class Shell; @@ -21,7 +22,7 @@ class Shell; namespace content { -class WebUSBDeviceImpl : public blink::WebUSBDevice { +class WebUSBDeviceImpl : public blink::WebUSBDevice, public mojo::ErrorHandler { public: WebUSBDeviceImpl(device::usb::DeviceManagerPtr device_manager, const blink::WebUSBDeviceInfo& device_info); @@ -61,6 +62,9 @@ class WebUSBDeviceImpl : public blink::WebUSBDevice { blink::WebUSBDeviceBulkTransferCallbacks* callbacks) override; void reset(blink::WebUSBDeviceResetCallbacks* callbacks) override; + // mojo::ErrorHandler implementation: + void OnConnectionError() override; + device::usb::DeviceManagerPtr device_manager_; blink::WebUSBDeviceInfo device_info_; |