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

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

Issue 642313003: [C++11 Allowed Features] Declares a type-safe null pointer converting from NULL to nullptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Including id in the AUTHORS file. Created 6 years, 2 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/accessibility_tree_formatter.h" 5 #include "content/browser/accessibility/accessibility_tree_formatter.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "base/strings/string_number_conversions.h" 9 #include "base/strings/string_number_conversions.h"
10 #include "base/strings/string_util.h" 10 #include "base/strings/string_util.h"
(...skipping 17 matching lines...) Expand all
28 Initialize(); 28 Initialize();
29 } 29 }
30 30
31 // static 31 // static
32 AccessibilityTreeFormatter* AccessibilityTreeFormatter::Create( 32 AccessibilityTreeFormatter* AccessibilityTreeFormatter::Create(
33 WebContents* web_contents) { 33 WebContents* web_contents) {
34 BrowserAccessibilityManager* manager = 34 BrowserAccessibilityManager* manager =
35 static_cast<WebContentsImpl*>(web_contents)-> 35 static_cast<WebContentsImpl*>(web_contents)->
36 GetRootBrowserAccessibilityManager(); 36 GetRootBrowserAccessibilityManager();
37 if (!manager) 37 if (!manager)
38 return NULL; 38 return nullptr;
39 39
40 BrowserAccessibility* root = manager->GetRoot(); 40 BrowserAccessibility* root = manager->GetRoot();
41 return new AccessibilityTreeFormatter(root); 41 return new AccessibilityTreeFormatter(root);
42 } 42 }
43 43
44 44
45 AccessibilityTreeFormatter::~AccessibilityTreeFormatter() { 45 AccessibilityTreeFormatter::~AccessibilityTreeFormatter() {
46 } 46 }
47 47
48 scoped_ptr<base::DictionaryValue> 48 scoped_ptr<base::DictionaryValue>
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 if (attr.empty()) 178 if (attr.empty())
179 return; 179 return;
180 if (!MatchesFilters(attr, include_by_default)) 180 if (!MatchesFilters(attr, include_by_default))
181 return; 181 return;
182 if (!line->empty()) 182 if (!line->empty())
183 *line += base::ASCIIToUTF16(" "); 183 *line += base::ASCIIToUTF16(" ");
184 *line += attr; 184 *line += attr;
185 } 185 }
186 186
187 } // namespace content 187 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698