OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 #include "ppapi/proxy/ppb_fullscreen_proxy.h" | 5 #include "ppapi/proxy/ppb_fullscreen_proxy.h" |
6 | 6 |
7 #include "ppapi/c/dev/ppb_fullscreen_dev.h" | 7 #include "ppapi/c/dev/ppb_fullscreen_dev.h" |
8 #include "ppapi/proxy/plugin_dispatcher.h" | 8 #include "ppapi/proxy/plugin_dispatcher.h" |
9 #include "ppapi/proxy/ppapi_messages.h" | 9 #include "ppapi/proxy/ppapi_messages.h" |
10 | 10 |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 } | 43 } |
44 | 44 |
45 const void* PPB_Fullscreen_Proxy::GetSourceInterface() const { | 45 const void* PPB_Fullscreen_Proxy::GetSourceInterface() const { |
46 return &ppb_fullscreen; | 46 return &ppb_fullscreen; |
47 } | 47 } |
48 | 48 |
49 InterfaceID PPB_Fullscreen_Proxy::GetInterfaceId() const { | 49 InterfaceID PPB_Fullscreen_Proxy::GetInterfaceId() const { |
50 return INTERFACE_ID_PPB_FULLSCREEN; | 50 return INTERFACE_ID_PPB_FULLSCREEN; |
51 } | 51 } |
52 | 52 |
53 void PPB_Fullscreen_Proxy::OnMessageReceived(const IPC::Message& msg) { | 53 bool PPB_Fullscreen_Proxy::OnMessageReceived(const IPC::Message& msg) { |
| 54 bool handled = true; |
54 IPC_BEGIN_MESSAGE_MAP(PPB_Fullscreen_Proxy, msg) | 55 IPC_BEGIN_MESSAGE_MAP(PPB_Fullscreen_Proxy, msg) |
55 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFullscreen_IsFullscreen, | 56 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFullscreen_IsFullscreen, |
56 OnMsgIsFullscreen) | 57 OnMsgIsFullscreen) |
57 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFullscreen_SetFullscreen, | 58 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBFullscreen_SetFullscreen, |
58 OnMsgSetFullscreen) | 59 OnMsgSetFullscreen) |
| 60 IPC_MESSAGE_UNHANDLED(handled = false) |
59 IPC_END_MESSAGE_MAP() | 61 IPC_END_MESSAGE_MAP() |
60 // TODO(brettw): handle bad messages! | 62 // TODO(brettw): handle bad messages! |
| 63 return handled; |
61 } | 64 } |
62 | 65 |
63 void PPB_Fullscreen_Proxy::OnMsgIsFullscreen(PP_Instance instance, | 66 void PPB_Fullscreen_Proxy::OnMsgIsFullscreen(PP_Instance instance, |
64 PP_Bool* result) { | 67 PP_Bool* result) { |
65 *result = ppb_fullscreen_target()->IsFullscreen(instance); | 68 *result = ppb_fullscreen_target()->IsFullscreen(instance); |
66 } | 69 } |
67 | 70 |
68 void PPB_Fullscreen_Proxy::OnMsgSetFullscreen(PP_Instance instance, | 71 void PPB_Fullscreen_Proxy::OnMsgSetFullscreen(PP_Instance instance, |
69 PP_Bool fullscreen, | 72 PP_Bool fullscreen, |
70 PP_Bool* result) { | 73 PP_Bool* result) { |
71 *result = ppb_fullscreen_target()->SetFullscreen(instance, fullscreen); | 74 *result = ppb_fullscreen_target()->SetFullscreen(instance, fullscreen); |
72 } | 75 } |
73 | 76 |
74 } // namespace proxy | 77 } // namespace proxy |
75 } // namespace pp | 78 } // namespace pp |
OLD | NEW |