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.
6 var content_handler_event
;
8 function setListeners(body_element
) {
9 var eventListener = function(e
) {
10 var target_element
= e
.target
;
11 if (target_element
.className
!= 'naclModule')
14 var element_id
= target_element
.id
;
15 if (element_id
== 'embedded')
16 embedded_event
= e
.type
;
17 else if (element_id
== 'content_handler')
18 content_handler_event
= e
.type
;
20 body_element
.addEventListener('loadstart', eventListener
, true);
21 body_element
.addEventListener('error', eventListener
, true);
24 function EmbeddedPluginCreated() {
25 return embedded_event
!= undefined;
28 function ContentHandlerPluginCreated() {
29 return content_handler_event
!= undefined;