| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "chrome/browser/extensions/extension_tabs_module.h" | 5 #include "chrome/browser/extensions/extension_tabs_module.h" |
| 6 | 6 |
| 7 #include "base/json/json_writer.h" | 7 #include "base/json/json_writer.h" |
| 8 #include "base/stl_util-inl.h" | 8 #include "base/stl_util-inl.h" |
| 9 #include "base/string_util.h" | 9 #include "base/string_util.h" |
| 10 #include "base/values.h" | 10 #include "base/values.h" |
| 11 #include "chrome/browser/browser_list.h" | 11 #include "chrome/browser/browser_list.h" |
| 12 #include "chrome/browser/browser_window.h" | 12 #include "chrome/browser/browser_window.h" |
| 13 #include "chrome/browser/extensions/extension_accessibility_api.h" | 13 #include "chrome/browser/extensions/extension_accessibility_api.h" |
| 14 #include "chrome/browser/extensions/extension_accessibility_api_constants.h" | 14 #include "chrome/browser/extensions/extension_accessibility_api_constants.h" |
| 15 #include "chrome/browser/extensions/extension_event_router.h" | 15 #include "chrome/browser/extensions/extension_event_router.h" |
| 16 #include "chrome/browser/extensions/extension_function_dispatcher.h" | 16 #include "chrome/browser/extensions/extension_function_dispatcher.h" |
| 17 #include "chrome/browser/extensions/extensions_service.h" | 17 #include "chrome/browser/extensions/extensions_service.h" |
| 18 #include "chrome/browser/profile.h" | 18 #include "chrome/browser/profiles/profile.h" |
| 19 #include "chrome/browser/ui/browser.h" | 19 #include "chrome/browser/ui/browser.h" |
| 20 #include "chrome/common/extensions/extension.h" | 20 #include "chrome/common/extensions/extension.h" |
| 21 #include "chrome/common/notification_service.h" | 21 #include "chrome/common/notification_service.h" |
| 22 | 22 |
| 23 namespace keys = extension_accessibility_api_constants; | 23 namespace keys = extension_accessibility_api_constants; |
| 24 | 24 |
| 25 // Returns the AccessibilityControlInfo serialized into a JSON string, | 25 // Returns the AccessibilityControlInfo serialized into a JSON string, |
| 26 // consisting of an array of a single object of type AccessibilityObject, | 26 // consisting of an array of a single object of type AccessibilityObject, |
| 27 // as defined in the accessibility extension api's json schema. | 27 // as defined in the accessibility extension api's json schema. |
| 28 std::string ControlInfoToJsonString(const AccessibilityControlInfo* info) { | 28 std::string ControlInfoToJsonString(const AccessibilityControlInfo* info) { |
| (...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 ExtensionAccessibilityEventRouter::GetInstance(); | 206 ExtensionAccessibilityEventRouter::GetInstance(); |
| 207 DictionaryValue *last_focused_control_dict = | 207 DictionaryValue *last_focused_control_dict = |
| 208 accessibility_event_router->last_focused_control_dict(); | 208 accessibility_event_router->last_focused_control_dict(); |
| 209 if (last_focused_control_dict->size()) { | 209 if (last_focused_control_dict->size()) { |
| 210 result_.reset(last_focused_control_dict->DeepCopyWithoutEmptyChildren()); | 210 result_.reset(last_focused_control_dict->DeepCopyWithoutEmptyChildren()); |
| 211 } else { | 211 } else { |
| 212 result_.reset(Value::CreateNullValue()); | 212 result_.reset(Value::CreateNullValue()); |
| 213 } | 213 } |
| 214 return true; | 214 return true; |
| 215 } | 215 } |
| OLD | NEW |