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

Side by Side Diff: content/renderer/media/midi_dispatcher.h

Issue 323083002: [WebMIDI] Fix a WebMIDIPermissionRequest leak. (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
« no previous file with comments | « no previous file | content/renderer/media/midi_dispatcher.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_
6 #define CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_ 6 #define CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_
7 7
8 #include "base/id_map.h" 8 #include "base/id_map.h"
9 #include "content/public/renderer/render_view_observer.h" 9 #include "content/public/renderer/render_view_observer.h"
10 #include "third_party/WebKit/public/web/WebMIDIClient.h" 10 #include "third_party/WebKit/public/web/WebMIDIClient.h"
(...skipping 26 matching lines...) Expand all
37 const blink::WebMIDIPermissionRequest& request); 37 const blink::WebMIDIPermissionRequest& request);
38 virtual void cancelSysexPermissionRequest( 38 virtual void cancelSysexPermissionRequest(
39 const blink::WebMIDIPermissionRequest& request); 39 const blink::WebMIDIPermissionRequest& request);
40 40
41 // Permission for using system exclusive messages has been set. 41 // Permission for using system exclusive messages has been set.
42 void OnSysExPermissionApproved(int client_id, bool is_allowed); 42 void OnSysExPermissionApproved(int client_id, bool is_allowed);
43 43
44 // Each WebMIDIPermissionRequest object is valid until 44 // Each WebMIDIPermissionRequest object is valid until
45 // cancelSysexPermissionRequest() is called with the object, or used to call 45 // cancelSysexPermissionRequest() is called with the object, or used to call
46 // WebMIDIPermissionRequest::setIsAllowed(). 46 // WebMIDIPermissionRequest::setIsAllowed().
47 IDMap<blink::WebMIDIPermissionRequest> requests_; 47 typedef IDMap<blink::WebMIDIPermissionRequest, IDMapOwnPointer> Requests;
48 Requests requests_;
48 49
49 DISALLOW_COPY_AND_ASSIGN(MidiDispatcher); 50 DISALLOW_COPY_AND_ASSIGN(MidiDispatcher);
50 }; 51 };
51 52
52 } // namespace content 53 } // namespace content
53 54
54 #endif // CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_ 55 #endif // CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_
OLDNEW
« no previous file with comments | « no previous file | content/renderer/media/midi_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698