OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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 #include "content/browser/accessibility/browser_accessibility_state_impl.h" | 5 #include "content/browser/accessibility/browser_accessibility_state_impl.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/metrics/histogram.h" | 8 #include "base/metrics/histogram.h" |
9 #include "content/browser/accessibility/accessibility_mode_helper.h" | 9 #include "content/browser/accessibility/accessibility_mode_helper.h" |
10 #include "content/browser/renderer_host/render_widget_host_impl.h" | 10 #include "content/browser/renderer_host/render_widget_host_impl.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 } | 24 } |
25 | 25 |
26 // static | 26 // static |
27 BrowserAccessibilityStateImpl* BrowserAccessibilityStateImpl::GetInstance() { | 27 BrowserAccessibilityStateImpl* BrowserAccessibilityStateImpl::GetInstance() { |
28 return Singleton<BrowserAccessibilityStateImpl, | 28 return Singleton<BrowserAccessibilityStateImpl, |
29 LeakySingletonTraits<BrowserAccessibilityStateImpl> >::get(); | 29 LeakySingletonTraits<BrowserAccessibilityStateImpl> >::get(); |
30 } | 30 } |
31 | 31 |
32 BrowserAccessibilityStateImpl::BrowserAccessibilityStateImpl() | 32 BrowserAccessibilityStateImpl::BrowserAccessibilityStateImpl() |
33 : BrowserAccessibilityState(), | 33 : BrowserAccessibilityState(), |
34 accessibility_mode_(AccessibilityModeOff) { | 34 accessibility_mode_(AccessibilityModeOff), |
| 35 disable_hot_tracking_(false) { |
35 ResetAccessibilityModeValue(); | 36 ResetAccessibilityModeValue(); |
36 #if defined(OS_WIN) | 37 #if defined(OS_WIN) |
37 // On Windows, UpdateHistograms calls some system functions with unknown | 38 // On Windows, UpdateHistograms calls some system functions with unknown |
38 // runtime, so call it on the file thread to ensure there's no jank. | 39 // runtime, so call it on the file thread to ensure there's no jank. |
39 // Everything in that method must be safe to call on another thread. | 40 // Everything in that method must be safe to call on another thread. |
40 BrowserThread::ID update_histogram_thread = BrowserThread::FILE; | 41 BrowserThread::ID update_histogram_thread = BrowserThread::FILE; |
41 #else | 42 #else |
42 // On all other platforms, UpdateHistograms should be called on the main | 43 // On all other platforms, UpdateHistograms should be called on the main |
43 // thread. | 44 // thread. |
44 BrowserThread::ID update_histogram_thread = BrowserThread::UI; | 45 BrowserThread::ID update_histogram_thread = BrowserThread::UI; |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
156 WebContentsImpl::GetAllWebContents(); | 157 WebContentsImpl::GetAllWebContents(); |
157 for (size_t i = 0; i < web_contents_vector.size(); ++i) { | 158 for (size_t i = 0; i < web_contents_vector.size(); ++i) { |
158 if (add) | 159 if (add) |
159 web_contents_vector[i]->AddAccessibilityMode(mode); | 160 web_contents_vector[i]->AddAccessibilityMode(mode); |
160 else | 161 else |
161 web_contents_vector[i]->RemoveAccessibilityMode(mode); | 162 web_contents_vector[i]->RemoveAccessibilityMode(mode); |
162 } | 163 } |
163 } | 164 } |
164 | 165 |
165 } // namespace content | 166 } // namespace content |
OLD | NEW |