Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright (c) 2012 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 "ppapi/proxy/broker_resource.h" | |
| 6 | |
| 7 #include "ppapi/c/pp_bool.h" | |
| 8 #include "ppapi/proxy/ppapi_messages.h" | |
| 9 #include "ppapi/thunk/enter.h" | |
|
yzshen1
2012/12/06 19:59:46
I don't think you need these two includes?
raymes
2012/12/07 21:32:19
Done.
| |
| 10 #include "ppapi/thunk/ppb_instance_api.h" | |
| 11 | |
| 12 namespace ppapi { | |
| 13 namespace proxy { | |
| 14 | |
| 15 BrokerResource::BrokerResource(Connection connection, PP_Instance instance) | |
| 16 : PluginResource(connection, instance) { | |
| 17 SendCreate(BROWSER, PpapiHostMsg_Broker_Create()); | |
| 18 } | |
| 19 | |
| 20 BrokerResource::~BrokerResource() { | |
| 21 } | |
| 22 | |
| 23 thunk::PPB_Broker_Instance_API* BrokerResource::AsPPB_Broker_Instance_API() { | |
| 24 return this; | |
| 25 } | |
| 26 | |
| 27 PP_Bool BrokerResource::IsAllowed() { | |
| 28 int32_t result = | |
| 29 SyncCall<IPC::Message>(BROWSER, PpapiHostMsg_Broker_IsAllowed()); | |
| 30 return PP_FromBool(result == PP_OK); | |
| 31 } | |
| 32 | |
| 33 } // namespace proxy | |
| 34 } // namespace ppapi | |
| OLD | NEW |