Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(336)

Side by Side Diff: blimp/engine/mojo/blob_channel_service.h

Issue 1859753002: Blimp: create Mojo component for renderer/browser communication. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: yzshen and nyquist feedback Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « blimp/engine/mojo/blob_channel.mojom ('k') | blimp/engine/mojo/blob_channel_service.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_
6 #define BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_
7
8 #include "blimp/engine/mojo/blob_channel.mojom.h"
9 #include "mojo/public/cpp/bindings/strong_binding.h"
10
11 namespace blimp {
12 namespace engine {
13
14 // Service for processing BlobChannel requests from the renderer.
15 // Runs on the browser process.
16 class BlobChannelService : public mojom::BlobChannel {
17 public:
18 // Creates a BlobChannel bound to the connection specified by |request|.
19 explicit BlobChannelService(mojom::BlobChannelRequest request);
20 ~BlobChannelService() override;
21
22 // Factory method called by Mojo.
23 static void Create(mojo::InterfaceRequest<mojom::BlobChannel> request);
24
25 private:
26 // BlobChannel implementation.
27 void Put(const mojo::String& id, mojo::Array<uint8_t> data) override;
28 void Push(const mojo::String& id) override;
29
30 // Binds |this| and its object lifetime to a Mojo connection.
31 mojo::StrongBinding<mojom::BlobChannel> binding_;
32
33 DISALLOW_COPY_AND_ASSIGN(BlobChannelService);
34 };
35
36 } // namespace engine
37 } // namespace blimp
38
39 #endif // BLIMP_ENGINE_MOJO_BLOB_CHANNEL_SERVICE_H_
OLDNEW
« no previous file with comments | « blimp/engine/mojo/blob_channel.mojom ('k') | blimp/engine/mojo/blob_channel_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698