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

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

Issue 13513004: content: Move more constants into content namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 8 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | content/browser/gpu/gpu_internals_ui.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) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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_ui.h" 5 #include "content/browser/accessibility/accessibility_ui.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/json/json_writer.h" 9 #include "base/json/json_writer.h"
10 #include "base/strings/string_number_conversions.h" 10 #include "base/strings/string_number_conversions.h"
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after
139 SendTargetsData(callback); 139 SendTargetsData(callback);
140 return true; 140 return true;
141 } 141 }
142 142
143 } // namespace 143 } // namespace
144 144
145 AccessibilityUI::AccessibilityUI(WebUI* web_ui) 145 AccessibilityUI::AccessibilityUI(WebUI* web_ui)
146 : WebUIController(web_ui) { 146 : WebUIController(web_ui) {
147 // Set up the chrome://accessibility source. 147 // Set up the chrome://accessibility source.
148 WebUIDataSource* html_source = 148 WebUIDataSource* html_source =
149 WebUIDataSource::Create(chrome::kChromeUIAccessibilityHost); 149 WebUIDataSource::Create(kChromeUIAccessibilityHost);
150 html_source->SetUseJsonJSFormatV2(); 150 html_source->SetUseJsonJSFormatV2();
151 151
152 web_ui->RegisterMessageCallback( 152 web_ui->RegisterMessageCallback(
153 "toggleAccessibility", 153 "toggleAccessibility",
154 base::Bind(&AccessibilityUI::ToggleAccessibility, 154 base::Bind(&AccessibilityUI::ToggleAccessibility,
155 base::Unretained(this))); 155 base::Unretained(this)));
156 web_ui->RegisterMessageCallback( 156 web_ui->RegisterMessageCallback(
157 "toggleGlobalAccessibility", 157 "toggleGlobalAccessibility",
158 base::Bind(&AccessibilityUI::ToggleGlobalAccessibility, 158 base::Bind(&AccessibilityUI::ToggleGlobalAccessibility,
159 base::Unretained(this))); 159 base::Unretained(this)));
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
278 AccessibilityTreeFormatter::Filter::ALLOW)); 278 AccessibilityTreeFormatter::Filter::ALLOW));
279 formatter->SetFilters(filters); 279 formatter->SetFilters(filters);
280 formatter->FormatAccessibilityTree(&accessibility_contents_utf16); 280 formatter->FormatAccessibilityTree(&accessibility_contents_utf16);
281 281
282 result->Set("tree", 282 result->Set("tree",
283 new StringValue(UTF16ToUTF8(accessibility_contents_utf16))); 283 new StringValue(UTF16ToUTF8(accessibility_contents_utf16)));
284 web_ui()->CallJavascriptFunction("accessibility.showTree", *(result.get())); 284 web_ui()->CallJavascriptFunction("accessibility.showTree", *(result.get()));
285 } 285 }
286 286
287 } // namespace content 287 } // namespace content
OLDNEW
« no previous file with comments | « chrome/browser/policy/policy_browsertest.cc ('k') | content/browser/gpu/gpu_internals_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698