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

Side by Side Diff: content/browser/renderer_host/media/midi_dispatcher_host.h

Issue 335993002: Convert MIDI permission requests to use WebContents in preparation for switching the code to using … (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright 2013 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 CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_DISPATCHER_HOST_H_
6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_DISPATCHER_HOST_H_
7
8 #include "content/public/browser/browser_message_filter.h"
9
10 class GURL;
11
12 namespace content {
13
14 class BrowserContext;
15
16 // MidiDispatcherHost handles permissions for using system exclusive messages.
17 // It works as BrowserMessageFilter to handle IPC messages between
18 // MidiDispatcher running as a RenderViewObserver.
19 class MidiDispatcherHost : public BrowserMessageFilter {
20 public:
21 MidiDispatcherHost(int render_process_id, BrowserContext* browser_context);
22
23 // BrowserMessageFilter implementation.
24 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
25 virtual void OverrideThreadForMessage(
26 const IPC::Message& message, BrowserThread::ID* thread) OVERRIDE;
27
28 protected:
29 virtual ~MidiDispatcherHost();
30
31 private:
32 void OnRequestSysExPermission(int render_view_id,
33 int bridge_id,
34 const GURL& origin,
35 bool user_gesture);
36 void OnCancelSysExPermissionRequest(int render_view_id,
37 int bridge_id,
38 const GURL& requesting_frame);
39 void WasSysExPermissionGranted(int render_view_id,
40 int bridge_id,
41 bool is_allowed);
42
43 int render_process_id_;
44 BrowserContext* browser_context_;
45
46 DISALLOW_COPY_AND_ASSIGN(MidiDispatcherHost);
47 };
48
49 } // namespace content
50
51 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_MIDI_DISPATCHER_HOST_H_
OLDNEW
« no previous file with comments | « content/browser/media/midi_host_unittest.cc ('k') | content/browser/renderer_host/media/midi_dispatcher_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698