Commit f3670439 authored by sammc's avatar sammc Committed by Commit bot

Remove mojo::InterfaceImpl from render_thread_impl and web_ui_mojo_browsertest.

BUG=489751

Review URL: https://codereview.chromium.org/1146813003

Cr-Commit-Position: refs/heads/master@{#330838}
parent e761ca37
......@@ -26,7 +26,7 @@
#include "content/shell/browser/shell.h"
#include "content/test/data/web_ui_test_mojo_bindings.mojom.h"
#include "third_party/mojo/src/mojo/edk/test/test_utils.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_impl.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/binding.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/interface_request.h"
#include "third_party/mojo/src/mojo/public/js/constants.h"
......@@ -60,13 +60,15 @@ bool GetResource(const std::string& id,
return true;
}
class BrowserTargetImpl : public mojo::InterfaceImpl<BrowserTarget> {
class BrowserTargetImpl : public BrowserTarget {
public:
explicit BrowserTargetImpl(base::RunLoop* run_loop) : run_loop_(run_loop) {}
BrowserTargetImpl(base::RunLoop* run_loop,
mojo::InterfaceRequest<BrowserTarget> request)
: run_loop_(run_loop), binding_(this, request.Pass()) {}
~BrowserTargetImpl() override {}
// mojo::InterfaceImpl<BrowserTarget> overrides:
// BrowserTarget overrides:
void Start(const mojo::Closure& closure) override {
closure.Run();
}
......@@ -79,6 +81,7 @@ class BrowserTargetImpl : public mojo::InterfaceImpl<BrowserTarget> {
base::RunLoop* run_loop_;
private:
mojo::Binding<BrowserTarget> binding_;
DISALLOW_COPY_AND_ASSIGN(BrowserTargetImpl);
};
......@@ -119,8 +122,7 @@ class PingTestWebUIController : public TestWebUIController {
}
void CreateHandler(mojo::InterfaceRequest<BrowserTarget> request) {
browser_target_.reset(mojo::WeakBindToRequest(
new BrowserTargetImpl(run_loop_), &request));
browser_target_.reset(new BrowserTargetImpl(run_loop_, request.Pass()));
}
private:
......
......@@ -138,6 +138,7 @@
#include "third_party/WebKit/public/web/WebSecurityPolicy.h"
#include "third_party/WebKit/public/web/WebView.h"
#include "third_party/icu/source/i18n/unicode/timezone.h"
#include "third_party/mojo/src/mojo/public/cpp/bindings/strong_binding.h"
#include "third_party/skia/include/core/SkGraphics.h"
#include "ui/base/layout.h"
#include "ui/base/ui_base_switches.h"
......@@ -340,11 +341,11 @@ void LowMemoryNotificationOnThisThread() {
isolate->LowMemoryNotification();
}
class RenderFrameSetupImpl : public mojo::InterfaceImpl<RenderFrameSetup> {
class RenderFrameSetupImpl : public RenderFrameSetup {
public:
RenderFrameSetupImpl()
: routing_id_highmark_(-1) {
}
explicit RenderFrameSetupImpl(
mojo::InterfaceRequest<RenderFrameSetup> request)
: routing_id_highmark_(-1), binding_(this, request.Pass()) {}
void ExchangeServiceProviders(
int32_t frame_routing_id,
......@@ -371,10 +372,11 @@ class RenderFrameSetupImpl : public mojo::InterfaceImpl<RenderFrameSetup> {
private:
int32_t routing_id_highmark_;
mojo::StrongBinding<RenderFrameSetup> binding_;
};
void CreateRenderFrameSetup(mojo::InterfaceRequest<RenderFrameSetup> request) {
mojo::BindToRequest(new RenderFrameSetupImpl(), &request);
new RenderFrameSetupImpl(request.Pass());
}
blink::WebGraphicsContext3D::Attributes GetOffscreenAttribs() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment