diff options
Diffstat (limited to 'chromium/content/renderer/media/midi_dispatcher.h')
-rw-r--r-- | chromium/content/renderer/media/midi_dispatcher.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/chromium/content/renderer/media/midi_dispatcher.h b/chromium/content/renderer/media/midi_dispatcher.h index 70f8125bdd2..0d40f46d26e 100644 --- a/chromium/content/renderer/media/midi_dispatcher.h +++ b/chromium/content/renderer/media/midi_dispatcher.h @@ -6,7 +6,7 @@ #define CONTENT_RENDERER_MEDIA_MIDI_DISPATCHER_H_ #include "base/id_map.h" -#include "content/public/renderer/render_view_observer.h" +#include "content/public/renderer/render_frame_observer.h" #include "third_party/WebKit/public/web/WebMIDIClient.h" namespace blink { @@ -15,38 +15,37 @@ class WebMIDIPermissionRequest; namespace content { -class RenderViewImpl; - -// MIDIDispatcher implements WebMIDIClient to handle permissions for using +// MidiDispatcher implements WebMIDIClient to handle permissions for using // system exclusive messages. -// It works as RenderViewObserver to handle IPC messages between -// MIDIDispatcherHost owned by RenderViewHost since permissions are managed in +// It works as RenderFrameObserver to handle IPC messages between +// MidiDispatcherHost owned by WebContents since permissions are managed in // the browser process. -class MIDIDispatcher : public RenderViewObserver, +class MidiDispatcher : public RenderFrameObserver, public blink::WebMIDIClient { public: - explicit MIDIDispatcher(RenderViewImpl* render_view); - virtual ~MIDIDispatcher(); + explicit MidiDispatcher(RenderFrame* render_frame); + virtual ~MidiDispatcher(); private: - // RenderView::Observer implementation. + // RenderFrameObserver implementation. virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; // blink::WebMIDIClient implementation. - virtual void requestSysExPermission( - const blink::WebMIDIPermissionRequest& request) OVERRIDE; - virtual void cancelSysExPermissionRequest( - const blink::WebMIDIPermissionRequest& request) OVERRIDE; + virtual void requestSysexPermission( + const blink::WebMIDIPermissionRequest& request); + virtual void cancelSysexPermissionRequest( + const blink::WebMIDIPermissionRequest& request); // Permission for using system exclusive messages has been set. void OnSysExPermissionApproved(int client_id, bool is_allowed); // Each WebMIDIPermissionRequest object is valid until - // cancelSysExPermissionRequest() is called with the object, or used to call + // cancelSysexPermissionRequest() is called with the object, or used to call // WebMIDIPermissionRequest::setIsAllowed(). - IDMap<blink::WebMIDIPermissionRequest> requests_; + typedef IDMap<blink::WebMIDIPermissionRequest, IDMapOwnPointer> Requests; + Requests requests_; - DISALLOW_COPY_AND_ASSIGN(MIDIDispatcher); + DISALLOW_COPY_AND_ASSIGN(MidiDispatcher); }; } // namespace content |