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

Unified Diff: content/renderer/media/midi_dispatcher.h

Issue 2116763002: Reland: Web MIDI: use mojom::blink::PermissionService directly to ask permission (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: for second attempt Created 4 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/media/midi_dispatcher.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/media/midi_dispatcher.h
diff --git a/content/renderer/media/midi_dispatcher.h b/content/renderer/media/midi_dispatcher.h
deleted file mode 100644
index 2d98117d092771a4742b5fcdaa2912c9fb7be455..0000000000000000000000000000000000000000
--- a/content/renderer/media/midi_dispatcher.h
+++ /dev/null
@@ -1,56 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_
-#define CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_
-
-#include "base/id_map.h"
-#include "base/macros.h"
-#include "content/public/renderer/render_frame_observer.h"
-#include "third_party/WebKit/public/platform/modules/permissions/permission.mojom.h"
-#include "third_party/WebKit/public/web/modules/webmidi/WebMIDIClient.h"
-
-namespace blink {
-class WebMIDIPermissionRequest;
-}
-
-namespace content {
-
-// MidiDispatcher implements WebMIDIClient to handle permissions for using
-// system exclusive messages.
-// It works as RenderFrameObserver to keep a 1:1 relationship with a RenderFrame
-// and make sure it has the same life cycle.
-class MidiDispatcher : public RenderFrameObserver,
- public blink::WebMIDIClient {
- public:
- explicit MidiDispatcher(RenderFrame* render_frame);
- ~MidiDispatcher() override;
-
- private:
- // RenderFrameObserver implementation.
- void OnDestruct() override;
-
- // blink::WebMIDIClient implementation.
- void requestPermission(const blink::WebMIDIPermissionRequest& request,
- const blink::WebMIDIOptions& options) override;
- void cancelPermissionRequest(
- const blink::WebMIDIPermissionRequest& request) override;
-
- // Permission for using MIDI system has been set.
- void OnPermissionSet(int request_id, blink::mojom::PermissionStatus status);
-
- // Each WebMIDIPermissionRequest object is valid until
- // cancelSysexPermissionRequest() is called with the object, or used to call
- // WebMIDIPermissionRequest::setIsAllowed().
- typedef IDMap<blink::WebMIDIPermissionRequest, IDMapOwnPointer> Requests;
- Requests requests_;
-
- blink::mojom::PermissionServicePtr permission_service_;
-
- DISALLOW_COPY_AND_ASSIGN(MidiDispatcher);
-};
-
-} // namespace content
-
-#endif // CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_
« no previous file with comments | « content/content_renderer.gypi ('k') | content/renderer/media/midi_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698