Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(65)

Side by Side Diff: content/browser/accessibility/browser_accessibility.cc

Issue 2692173003: Implemented SetSelection for the Web content on Windows. (Closed)
Patch Set: Fixed another compilation error on Windows. Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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.h" 5 #include "content/browser/accessibility/browser_accessibility.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 1144 matching lines...) Expand 10 before | Expand all | Expand 10 after
1155 1155
1156 return name; 1156 return name;
1157 } 1157 }
1158 1158
1159 std::vector<int> BrowserAccessibility::GetLineStartOffsets() const { 1159 std::vector<int> BrowserAccessibility::GetLineStartOffsets() const {
1160 if (!instance_active()) 1160 if (!instance_active())
1161 return std::vector<int>(); 1161 return std::vector<int>();
1162 return node()->GetOrComputeLineStartOffsets(); 1162 return node()->GetOrComputeLineStartOffsets();
1163 } 1163 }
1164 1164
1165 BrowserAccessibility::AXPlatformPositionInstance
1166 BrowserAccessibility::CreatePositionAt(int offset) const {
1167 DCHECK(manager_);
1168 return AXPlatformPosition::CreateTextPosition(
1169 manager_->ax_tree_id(), GetId(), offset, ui::AX_TEXT_AFFINITY_DOWNSTREAM);
1170 }
1171
1165 base::string16 BrowserAccessibility::GetInnerText() const { 1172 base::string16 BrowserAccessibility::GetInnerText() const {
1166 if (IsTextOnlyObject()) 1173 if (IsTextOnlyObject())
1167 return GetString16Attribute(ui::AX_ATTR_NAME); 1174 return GetString16Attribute(ui::AX_ATTR_NAME);
1168 1175
1169 base::string16 text; 1176 base::string16 text;
1170 for (size_t i = 0; i < InternalChildCount(); ++i) 1177 for (size_t i = 0; i < InternalChildCount(); ++i)
1171 text += InternalGetChild(i)->GetInnerText(); 1178 text += InternalGetChild(i)->GetInnerText();
1172 return text; 1179 return text;
1173 } 1180 }
1174 1181
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
1231 } 1238 }
1232 } 1239 }
1233 1240
1234 node = container; 1241 node = container;
1235 } 1242 }
1236 1243
1237 return gfx::ToEnclosingRect(bounds); 1244 return gfx::ToEnclosingRect(bounds);
1238 } 1245 }
1239 1246
1240 } // namespace content 1247 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/accessibility/browser_accessibility.h ('k') | content/browser/accessibility/browser_accessibility_cocoa.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698