| OLD | NEW | 
|---|
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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 #ifndef CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 5 #ifndef CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 
| 6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 6 #define CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 
| 7 | 7 | 
| 8 #include <atlbase.h> | 8 #include <atlbase.h> | 
| 9 #include <atlcom.h> | 9 #include <atlcom.h> | 
| 10 | 10 | 
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 119 | 119 | 
| 120   // Modify/retrieve the state (active/inactive) of this instance. | 120   // Modify/retrieve the state (active/inactive) of this instance. | 
| 121   void set_instance_active(bool instance_active) { | 121   void set_instance_active(bool instance_active) { | 
| 122     instance_active_ = instance_active; | 122     instance_active_ = instance_active; | 
| 123   } | 123   } | 
| 124   int instance_active() const { return instance_active_; } | 124   int instance_active() const { return instance_active_; } | 
| 125 | 125 | 
| 126   int routing_id() const { return routing_id_; } | 126   int routing_id() const { return routing_id_; } | 
| 127 | 127 | 
| 128  private: | 128  private: | 
| 129   // Creates an empty VARIANT. Used as the equivalent of a NULL (unused) input | 129   // Creates a VARIANT that will reference the current accessibility | 
| 130   // parameter. | 130   // object, not a child accessibility object. | 
| 131   VARIANT EmptyVariant() const { | 131   VARIANT ChildSelfVariant() const { | 
| 132     VARIANT empty; | 132     VARIANT var; | 
| 133     empty.vt = VT_EMPTY; | 133     V_VT(&var) = VT_I4; | 
| 134     return empty; | 134     V_I4(&var) = CHILDID_SELF; | 
|  | 135     return var; | 
| 135   } | 136   } | 
| 136 | 137 | 
| 137   // Wrapper functions, calling through to singleton instance of | 138   // Wrapper functions, calling through to singleton instance of | 
| 138   // BrowserAccessibilityManager. | 139   // BrowserAccessibilityManager. | 
| 139 | 140 | 
| 140   // Creates an instance of BrowserAccessibility, initializes it and sets the | 141   // Creates an instance of BrowserAccessibility, initializes it and sets the | 
| 141   // [iaccessible_id] and [parent_id]. | 142   // [iaccessible_id] and [parent_id]. | 
| 142   STDMETHODIMP CreateInstance(REFIID iid, | 143   STDMETHODIMP CreateInstance(REFIID iid, | 
| 143                               int iaccessible_id, | 144                               int iaccessible_id, | 
| 144                               void** interface_ptr); | 145                               void** interface_ptr); | 
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 176   // The instance should only be active if there is a non-terminated | 177   // The instance should only be active if there is a non-terminated | 
| 177   // RenderProcessHost associated with it. The BrowserAccessibilityManager keeps | 178   // RenderProcessHost associated with it. The BrowserAccessibilityManager keeps | 
| 178   // track of this state, and sets it to false to disable all calls into the | 179   // track of this state, and sets it to false to disable all calls into the | 
| 179   // renderer from this instance of BroweserAccessibility, and have all | 180   // renderer from this instance of BroweserAccessibility, and have all | 
| 180   // IAccessible functions return E_FAIL. | 181   // IAccessible functions return E_FAIL. | 
| 181   bool instance_active_; | 182   bool instance_active_; | 
| 182 | 183 | 
| 183   DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 184   DISALLOW_COPY_AND_ASSIGN(BrowserAccessibility); | 
| 184 }; | 185 }; | 
| 185 #endif  // CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 186 #endif  // CHROME_BROWSER_BROWSER_ACCESSIBILITY_H_ | 
| OLD | NEW | 
|---|