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

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

Issue 1545243002: Convert Pass()→std::move() in //content/browser (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 12 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
« no previous file with comments | « no previous file | content/browser/appcache/appcache_disk_cache.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/accessibility_tree_formatter.h" 5 #include "content/browser/accessibility/accessibility_tree_formatter.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
(...skipping 22 matching lines...) Expand all
33 33
34 AccessibilityTreeFormatter::~AccessibilityTreeFormatter() { 34 AccessibilityTreeFormatter::~AccessibilityTreeFormatter() {
35 } 35 }
36 36
37 scoped_ptr<base::DictionaryValue> 37 scoped_ptr<base::DictionaryValue>
38 AccessibilityTreeFormatter::BuildAccessibilityTree( 38 AccessibilityTreeFormatter::BuildAccessibilityTree(
39 BrowserAccessibility* root) { 39 BrowserAccessibility* root) {
40 CHECK(root); 40 CHECK(root);
41 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue); 41 scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
42 RecursiveBuildAccessibilityTree(*root, dict.get()); 42 RecursiveBuildAccessibilityTree(*root, dict.get());
43 return dict.Pass(); 43 return dict;
44 } 44 }
45 45
46 void AccessibilityTreeFormatter::FormatAccessibilityTree( 46 void AccessibilityTreeFormatter::FormatAccessibilityTree(
47 BrowserAccessibility* root, base::string16* contents) { 47 BrowserAccessibility* root, base::string16* contents) {
48 scoped_ptr<base::DictionaryValue> dict = BuildAccessibilityTree(root); 48 scoped_ptr<base::DictionaryValue> dict = BuildAccessibilityTree(root);
49 RecursiveFormatAccessibilityTree(*(dict.get()), contents); 49 RecursiveFormatAccessibilityTree(*(dict.get()), contents);
50 } 50 }
51 51
52 void AccessibilityTreeFormatter::RecursiveBuildAccessibilityTree( 52 void AccessibilityTreeFormatter::RecursiveBuildAccessibilityTree(
53 const BrowserAccessibility& node, base::DictionaryValue* dict) { 53 const BrowserAccessibility& node, base::DictionaryValue* dict) {
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 if (attr.empty()) 147 if (attr.empty())
148 return; 148 return;
149 if (!MatchesFilters(attr, include_by_default)) 149 if (!MatchesFilters(attr, include_by_default))
150 return; 150 return;
151 if (!line->empty()) 151 if (!line->empty())
152 *line += base::ASCIIToUTF16(" "); 152 *line += base::ASCIIToUTF16(" ");
153 *line += attr; 153 *line += attr;
154 } 154 }
155 155
156 } // namespace content 156 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | content/browser/appcache/appcache_disk_cache.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698