1 // Copyright (c) 2013 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.
5 #include "ppapi/cpp/extensions/event_base.h"
7 #include "ppapi/cpp/extensions/dev/events_dev.h"
13 GenericEventBase::GenericEventBase(
14 const InstanceHandle
& instance
,
15 const PP_Ext_EventListener
& pp_listener
)
16 : instance_(instance
),
18 pp_listener_(pp_listener
) {
21 GenericEventBase::~GenericEventBase() {
25 bool GenericEventBase::StartListening() {
29 listener_id_
= events::Events_Dev::AddListener(instance_
.pp_instance(),
34 void GenericEventBase::StopListening() {
38 events::Events_Dev::RemoveListener(instance_
.pp_instance(), listener_id_
);
42 } // namespace internal