Skip to content

Commit

Permalink
Revert of Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad796…
Browse files Browse the repository at this point in the history
…0480 (patchset #3 id:40001 of https://codereview.chromium.org/728553002/)

Reason for revert:
Breaks incremental builds, crbug.com/433524

Original issue's description:
> Update mojo sdk to rev afb4440fd5a10cba980878c326180b7ad7960480
>
> TBR=jam@chromium.org
>
> Committed: https://crrev.com/184f354ddeff66784515ddbbee9c46355cadab6a
> Cr-Commit-Position: refs/heads/master@{#304114}

TBR=jam@chromium.org,jamesr@chromium.org
NOTREECHECKS=true
NOTRY=true

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

Cr-Commit-Position: refs/heads/master@{#304305}
  • Loading branch information
nico authored and Commit bot committed Nov 15, 2014
1 parent 3ec1799 commit 671db43
Show file tree
Hide file tree
Showing 173 changed files with 3,433 additions and 6,284 deletions.
12 changes: 6 additions & 6 deletions build/all.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,13 @@
# NOTE: This list of targets is present because
# mojo_base.gyp:mojo_base cannot be built on iOS, as
# javascript-related targets cause v8 to be built.
'../mojo/edk/mojo_edk_tests.gyp:mojo_public_bindings_unittests',
'../mojo/edk/mojo_edk_tests.gyp:mojo_public_environment_unittests',
'../mojo/edk/mojo_edk_tests.gyp:mojo_public_system_perftests',
'../mojo/edk/mojo_edk_tests.gyp:mojo_public_system_unittests',
'../mojo/edk/mojo_edk_tests.gyp:mojo_public_utility_unittests',
'../mojo/edk/mojo_edk.gyp:mojo_public_bindings_unittests',
'../mojo/edk/mojo_edk.gyp:mojo_public_environment_unittests',
'../mojo/edk/mojo_edk.gyp:mojo_public_system_perftests',
'../mojo/edk/mojo_edk.gyp:mojo_public_system_unittests',
'../mojo/edk/mojo_edk.gyp:mojo_public_utility_unittests',
'../mojo/edk/mojo_edk.gyp:mojo_system_impl',
'../mojo/edk/mojo_edk_tests.gyp:mojo_system_unittests',
'../mojo/edk/mojo_edk.gyp:mojo_system_unittests',
'../mojo/mojo_base.gyp:mojo_common_lib',
'../mojo/mojo_base.gyp:mojo_common_unittests',
'../mojo/public/mojo_public.gyp:mojo_cpp_bindings',
Expand Down
4 changes: 3 additions & 1 deletion content/browser/webui/web_ui_mojo_browsertest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,9 @@ class PingBrowserTargetImpl : public BrowserTargetImpl {

~PingBrowserTargetImpl() override {}

// mojo::InterfaceImpl<BrowserTarget> overrides:
void OnConnectionEstablished() override { client()->Ping(); }

// Quit the RunLoop when called.
void PingResponse() override {
got_message = true;
Expand Down Expand Up @@ -131,7 +134,6 @@ class PingTestWebUIController : public TestWebUIController {
void CreateHandler(mojo::InterfaceRequest<BrowserTarget> request) {
browser_target_.reset(mojo::WeakBindToRequest(
new PingBrowserTargetImpl(run_loop_), &request));
browser_target_->client()->Ping();
}

private:
Expand Down
14 changes: 6 additions & 8 deletions device/battery/battery_monitor_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -11,26 +11,24 @@ namespace device {
// static
void BatteryMonitorImpl::Create(
mojo::InterfaceRequest<BatteryMonitor> request) {
new BatteryMonitorImpl(request.Pass());
BindToRequest(new BatteryMonitorImpl(), &request);
}

BatteryMonitorImpl::BatteryMonitorImpl(
mojo::InterfaceRequest<BatteryMonitor> request)
: binding_(this, request.Pass()),
subscription_(BatteryStatusService::GetInstance()->AddCallback(
base::Bind(&BatteryMonitorImpl::DidChange, base::Unretained(this)))) {
BatteryMonitorImpl::BatteryMonitorImpl() {
}

BatteryMonitorImpl::~BatteryMonitorImpl() {
}

void BatteryMonitorImpl::RegisterSubscription() {
void BatteryMonitorImpl::OnConnectionEstablished() {
subscription_ = BatteryStatusService::GetInstance()->AddCallback(
base::Bind(&BatteryMonitorImpl::DidChange, base::Unretained(this)));
}

void BatteryMonitorImpl::DidChange(const BatteryStatus& battery_status) {
BatteryStatusPtr status(BatteryStatus::New());
*status = battery_status;
binding_.client()->DidChange(status.Pass());
client()->DidChange(status.Pass());
}

} // namespace device
18 changes: 8 additions & 10 deletions device/battery/battery_monitor_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,33 +2,31 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_
#define DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_

#include "base/memory/scoped_ptr.h"
#include "device/battery/battery_export.h"
#include "device/battery/battery_monitor.mojom.h"
#include "device/battery/battery_status_service.h"
#include "mojo/public/cpp/bindings/strong_binding.h"

#ifndef DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_
#define DEVICE_BATTERY_BATTERY_MONITOR_IMPL_H_

namespace device {

class BatteryMonitorImpl : public BatteryMonitor {
class BatteryMonitorImpl : public mojo::InterfaceImpl<BatteryMonitor> {
public:
DEVICE_BATTERY_EXPORT static void Create(
mojo::InterfaceRequest<BatteryMonitor> request);

private:
explicit BatteryMonitorImpl(mojo::InterfaceRequest<BatteryMonitor> request);
BatteryMonitorImpl();
~BatteryMonitorImpl() override;

void RegisterSubscription();
// mojo::InterfaceImpl<..> methods:
void OnConnectionEstablished() override;

void DidChange(const BatteryStatus& battery_status);

mojo::StrongBinding<BatteryMonitor> binding_;
scoped_ptr<BatteryStatusService::BatteryUpdateSubscription> subscription_;

DISALLOW_COPY_AND_ASSIGN(BatteryMonitorImpl);
};

} // namespace device
Expand Down
2 changes: 1 addition & 1 deletion media/mojo/services/mojo_demuxer_stream_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ void MojoDemuxerStreamImpl::OnBufferReady(
mojo::MediaDecoderBuffer::From(buffer));
}

void MojoDemuxerStreamImpl::DidConnect() {
void MojoDemuxerStreamImpl::OnConnectionEstablished() {
// This is called when our DemuxerStreamClient has connected itself and is
// ready to receive messages. Send an initial config and notify it that
// we are now ready for business.
Expand Down
3 changes: 2 additions & 1 deletion media/mojo/services/mojo_demuxer_stream_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ class MojoDemuxerStreamImpl : public mojo::InterfaceImpl<mojo::DemuxerStream> {
mojo::MediaDecoderBufferPtr)>& callback)
override;

void DidConnect();
// mojo::InterfaceImpl overrides.
void OnConnectionEstablished() override;

private:
// |callback| is the callback that was passed to the initiating Read()
Expand Down
12 changes: 4 additions & 8 deletions media/mojo/services/mojo_renderer_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,12 @@ void MojoRendererImpl::Initialize(
demuxer_stream_provider_->GetStream(DemuxerStream::VIDEO);

mojo::DemuxerStreamPtr audio_stream;
if (audio) {
mojo::BindToProxy(new MojoDemuxerStreamImpl(audio), &audio_stream)
->DidConnect();
}
if (audio)
mojo::BindToProxy(new MojoDemuxerStreamImpl(audio), &audio_stream);

mojo::DemuxerStreamPtr video_stream;
if (video) {
mojo::BindToProxy(new MojoDemuxerStreamImpl(video), &video_stream)
->DidConnect();
}
if (video)
mojo::BindToProxy(new MojoDemuxerStreamImpl(video), &video_stream);

remote_audio_renderer_->Initialize(
audio_stream.Pass(),
Expand Down
2 changes: 1 addition & 1 deletion mojo/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ group("tests") {
deps = [
"//mojo/common:mojo_common_unittests",
"//mojo/converters/surfaces/tests:mojo_surfaces_lib_unittests",
"//mojo/edk/js/test:js_unittests",
"//mojo/edk/js/tests:js_unittests",
"//mojo/edk/system:mojo_message_pipe_perftests",
"//mojo/edk/system:mojo_system_unittests",
"//mojo/public/c/system/tests:perftests",
Expand Down
66 changes: 20 additions & 46 deletions mojo/edk/embedder/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,11 @@
# found in the LICENSE file.

source_set("embedder") {
# This isn't really a standalone target; it must be linked into the
# This isn't really a standalone target, it must be linked into the
# mojo_system_impl component.
visibility = [ "//mojo/edk/system" ]

sources = [
"channel_info_forward.h",
"channel_init.cc",
"channel_init.h",
"configuration.h",
"embedder.cc",
"embedder.h",
"embedder_internal.h",
"entrypoints.cc",
# Test-only code:
# TODO(vtl): It's a little unfortunate that these end up in the same
# component as non-test-only code. In the static build, this code should
# hopefully be dead-stripped.
"test_embedder.cc",
"test_embedder.h",
]
deps = [ "//base", ]

defines = [
"MOJO_SYSTEM_IMPL_IMPLEMENTATION",
Expand All @@ -31,23 +16,12 @@ source_set("embedder") {

configs += [ "//mojo/edk/system:system_config" ]

public_deps = [
":platform",
"//mojo/public/cpp/system",
]

deps = [ "//base" ]
}

source_set("platform") {
# This isn't really a standalone target; it must be linked into the
# mojo_system_impl component.
visibility = [
":embedder",
"//mojo/edk/system",
]

sources = [
"channel_info_forward.h",
"channel_init.cc",
"channel_init.h",
"embedder.cc",
"embedder.h",
"platform_channel_pair.cc",
"platform_channel_pair.h",
"platform_channel_pair_posix.cc",
Expand All @@ -69,30 +43,30 @@ source_set("platform") {
"simple_platform_shared_buffer_win.cc",
"simple_platform_support.cc",
"simple_platform_support.h",
# Test-only code:
# TODO(vtl): It's a little unfortunate that these end up in the same
# component as non-test-only code. In the static build, this code should
# hopefully be dead-stripped.
"test_embedder.cc",
"test_embedder.h",
]

defines = [ "MOJO_SYSTEM_IMPL_IMPLEMENTATION" ]

configs += [ "//mojo/edk/system:system_config" ]

deps = [ "//base" ]
}

source_set("embedder_unittests") {
testonly = true
visibility = [ "//mojo/edk/system:mojo_system_unittests" ]

sources = [
"embedder_unittest.cc",
"platform_channel_pair_posix_unittest.cc",
"simple_platform_shared_buffer_unittest.cc",
]
testonly = true

deps = [
"//base",
"//base/test:test_support",
"//mojo/edk/test:test_support",
"//mojo/edk/system",
"//testing/gtest",
]

sources = [
"embedder_unittest.cc",
"platform_channel_pair_posix_unittest.cc",
"simple_platform_shared_buffer_unittest.cc",
]
}
11 changes: 6 additions & 5 deletions mojo/edk/embedder/channel_init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,12 @@ ScopedMessagePipeHandle ChannelInit::Init(
DCHECK(!io_thread_task_runner_.get()); // Should only init once.
io_thread_task_runner_ = io_thread_task_runner;
ScopedMessagePipeHandle message_pipe =
CreateChannel(
ScopedPlatformHandle(PlatformHandle(file)), io_thread_task_runner,
base::Bind(&ChannelInit::OnCreatedChannel, weak_factory_.GetWeakPtr(),
io_thread_task_runner),
base::MessageLoop::current()->message_loop_proxy()).Pass();
CreateChannel(ScopedPlatformHandle(PlatformHandle(file)),
io_thread_task_runner,
base::Bind(&ChannelInit::OnCreatedChannel,
weak_factory_.GetWeakPtr(),
io_thread_task_runner),
base::MessageLoop::current()->message_loop_proxy()).Pass();
return message_pipe.Pass();
}

Expand Down
2 changes: 1 addition & 1 deletion mojo/edk/embedder/channel_init.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#include "base/memory/weak_ptr.h"
#include "mojo/edk/embedder/channel_info_forward.h"
#include "mojo/edk/system/system_impl_export.h"
#include "mojo/public/cpp/system/message_pipe.h"
#include "mojo/public/cpp/system/core.h"

namespace base {
class MessageLoopProxy;
Expand Down
68 changes: 0 additions & 68 deletions mojo/edk/embedder/configuration.h

This file was deleted.

Loading

0 comments on commit 671db43

Please sign in to comment.