IPC plumbing for TraceWriter and service-side Consumer port.

This CL fixes most of the IPC plumbing after TraceWriter and
related methods are landed. This mainly reduces the need of
keeping .proto and core objects in sync. Also exposes the
service-side implementation of the Consumer port.
Finally gets rid of the ObserverForTesting, which at the end
turned out to be unneeded.

Bug: 70284518
Bug: 68854243
Change-Id: I5e9156fee2945dc8bd42d7016046afb7da643411
diff --git a/src/tracing/core/service_impl.h b/src/tracing/core/service_impl.h
index 24a39bb..91db0fb 100644
--- a/src/tracing/core/service_impl.h
+++ b/src/tracing/core/service_impl.h
@@ -57,10 +57,9 @@
     void RegisterDataSource(const DataSourceDescriptor&,
                             RegisterDataSourceCallback) override;
     void UnregisterDataSource(DataSourceID) override;
-
     void NotifySharedMemoryUpdate(
         const std::vector<uint32_t>& changed_pages) override;
-
+    std::unique_ptr<TraceWriter> CreateTraceWriter(BufferID) override;
     SharedMemory* shared_memory() const override;
 
    private:
@@ -121,8 +120,6 @@
   std::unique_ptr<Service::ConsumerEndpoint> ConnectConsumer(
       Consumer*) override;
 
-  void set_observer_for_testing(ObserverForTesting*) override;
-
   // Exposed mainly for testing.
   size_t num_producers() const { return producers_.size(); }
   ProducerEndpointImpl* GetProducer(ProducerID) const;
@@ -136,7 +133,6 @@
   ProducerID last_producer_id_ = 0;
   std::map<ProducerID, ProducerEndpointImpl*> producers_;
   std::set<ConsumerEndpointImpl*> consumers_;
-  ObserverForTesting* observer_ = nullptr;
 };
 
 }  // namespace perfetto