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

Side by Side Diff: chrome/browser/accessibility/accessibility_extension_api.cc

Issue 399493002: Remove many instances of CreateBooleanValue. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 5 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 | « no previous file | chrome/browser/chromeos/extensions/file_manager/private_api_file_system.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 "chrome/browser/accessibility/accessibility_extension_api.h" 5 #include "chrome/browser/accessibility/accessibility_extension_api.h"
6 6
7 #include "base/json/json_writer.h" 7 #include "base/json/json_writer.h"
8 #include "base/strings/string_number_conversions.h" 8 #include "base/strings/string_number_conversions.h"
9 #include "base/values.h" 9 #include "base/values.h"
10 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h" 10 #include "chrome/browser/accessibility/accessibility_extension_api_constants.h"
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 DispatchEvent(info->profile(), 187 DispatchEvent(info->profile(),
188 accessibility_private::OnMenuClosed::kEventName, 188 accessibility_private::OnMenuClosed::kEventName,
189 args.Pass()); 189 args.Pass());
190 } 190 }
191 191
192 void ExtensionAccessibilityEventRouter::OnChromeVoxLoadStateChanged( 192 void ExtensionAccessibilityEventRouter::OnChromeVoxLoadStateChanged(
193 Profile* profile, 193 Profile* profile,
194 bool loading, 194 bool loading,
195 bool make_announcements) { 195 bool make_announcements) {
196 scoped_ptr<base::ListValue> event_args(new base::ListValue()); 196 scoped_ptr<base::ListValue> event_args(new base::ListValue());
197 event_args->Append(base::Value::CreateBooleanValue(loading)); 197 event_args->AppendBoolean(loading);
198 event_args->Append(base::Value::CreateBooleanValue(make_announcements)); 198 event_args->AppendBoolean(make_announcements);
199 ExtensionAccessibilityEventRouter::DispatchEventToChromeVox( 199 ExtensionAccessibilityEventRouter::DispatchEventToChromeVox(
200 profile, 200 profile,
201 accessibility_private::OnChromeVoxLoadStateChanged::kEventName, 201 accessibility_private::OnChromeVoxLoadStateChanged::kEventName,
202 event_args.Pass()); 202 event_args.Pass());
203 } 203 }
204 204
205 // Static. 205 // Static.
206 void ExtensionAccessibilityEventRouter::DispatchEventToChromeVox( 206 void ExtensionAccessibilityEventRouter::DispatchEventToChromeVox(
207 Profile* profile, 207 Profile* profile,
208 const char* event_name, 208 const char* event_name,
(...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 const base::string16 message_text = 301 const base::string16 message_text =
302 confirm_infobar_delegate->GetMessageText(); 302 confirm_infobar_delegate->GetMessageText();
303 alert_value->SetString(keys::kMessageKey, message_text); 303 alert_value->SetString(keys::kMessageKey, message_text);
304 alerts_value->Append(alert_value); 304 alerts_value->Append(alert_value);
305 } 305 }
306 } 306 }
307 307
308 SetResult(alerts_value); 308 SetResult(alerts_value);
309 return true; 309 return true;
310 } 310 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/chromeos/extensions/file_manager/private_api_file_system.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698