Package appModules :: Module chrome
[hide private]
[frames] | no frames]

Source Code for Module appModules.chrome

 1  #appModules/chrome.py 
 2  #A part of NonVisual Desktop Access (NVDA) 
 3  #This file is covered by the GNU General Public License. 
 4  #See the file COPYING for more details. 
 5  # Copyright (C) 2010 James Teh <jamie@jantrid.net> 
 6   
 7  """App module for Google Chrome 
 8  """ 
 9   
10  import controlTypes 
11  import appModuleHandler 
12  from NVDAObjects.IAccessible import IAccessible, getNVDAObjectFromEvent 
13  from virtualBuffers.gecko_ia2 import Gecko_ia2 as GeckoVBuf 
14   
15 -class ChromeVBuf(GeckoVBuf):
16
17 - def __contains__(self, obj):
18 return obj.windowHandle == self.rootNVDAObject.windowHandle
19
20 -class Document(IAccessible):
21
23 states = self.states 24 if controlTypes.STATE_READONLY in states and controlTypes.STATE_BUSY not in states: 25 return ChromeVBuf 26 return super(Document, self).treeInterceptorClass
27
28 -class AppModule(appModuleHandler.AppModule):
29
30 - def chooseNVDAObjectOverlayClasses(self, obj, clsList):
31 if obj.windowClassName == "Chrome_RenderWidgetHostHWND" and obj.role == controlTypes.ROLE_DOCUMENT: 32 clsList.insert(0, Document) 33 return
34