OLD | NEW |
---|---|
(Empty) | |
1 // Copyright (c) 2011 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 #include "content/browser/renderer_host/media/media_log_host.h" | |
6 | |
7 #include "content/browser/renderer_host/media/media_observer.h" | |
8 #include "content/browser/resource_context.h" | |
9 #include "content/common/media/media_log_messages.h" | |
10 | |
11 MediaLogHost::MediaLogHost(const content::ResourceContext* resource_context) | |
12 : resource_context_(resource_context) {} | |
13 | |
14 MediaLogHost::~MediaLogHost() {} | |
15 | |
16 void MediaLogHost::OnChannelClosing() { | |
17 BrowserMessageFilter::OnChannelClosing(); | |
jam
2011/07/29 16:08:55
you don't need to override this
Scott Franklin
2011/07/29 22:30:25
This appeared to be standard practice in every oth
| |
18 } | |
19 | |
20 void MediaLogHost::OnDestruct() const { | |
21 BrowserThread::DeleteOnIOThread::Destruct(this); | |
jam
2011/07/29 16:08:55
ditto. there's no reason that I see that makes you
Scott Franklin
2011/07/29 22:30:25
Ditto.
| |
22 } | |
23 | |
24 bool MediaLogHost::OnMessageReceived(const IPC::Message& message, | |
25 bool* message_was_ok) { | |
26 bool handled = true; | |
27 IPC_BEGIN_MESSAGE_MAP_EX(MediaLogHost, message, *message_was_ok) | |
28 IPC_MESSAGE_HANDLER(MediaLogMsg_MediaEvent, OnMediaEvent) | |
jam
2011/07/29 16:08:55
given that you have just one message, it seems eas
Scott Franklin
2011/07/29 22:30:25
Yeah, I was expecting many messages, but then one
| |
29 IPC_MESSAGE_UNHANDLED(handled = false); | |
30 IPC_END_MESSAGE_MAP_EX() | |
31 | |
32 return handled; | |
33 } | |
34 | |
35 void MediaLogHost::OnMediaEvent(const media::MediaLog::Event& event) { | |
36 resource_context_->media_observer()->OnMediaEvent(event); | |
37 } | |
OLD | NEW |