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

Side by Side Diff: webkit/tools/test_shell/accessibility_ui_element.cc

Issue 6602049: Pure pedantry: Replace all ".size() == 0" with ".empty()". (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 9 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
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 "base/logging.h" 5 #include "base/logging.h"
6 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h" 6 #include "third_party/WebKit/Source/WebKit/chromium/public/WebAccessibilityObjec t.h"
7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h" 7 #include "third_party/WebKit/Source/WebKit/chromium/public/WebCString.h"
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h" 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebString.h"
9 #include "webkit/tools/test_shell/accessibility_ui_element.h" 9 #include "webkit/tools/test_shell/accessibility_ui_element.h"
10 10
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
355 result->SetNull(); 355 result->SetNull();
356 } 356 }
357 357
358 void AccessibilityUIElement::StringForRangeCallback( 358 void AccessibilityUIElement::StringForRangeCallback(
359 const CppArgumentList& args, CppVariant* result) { 359 const CppArgumentList& args, CppVariant* result) {
360 result->SetNull(); 360 result->SetNull();
361 } 361 }
362 362
363 void AccessibilityUIElement::ChildAtIndexCallback( 363 void AccessibilityUIElement::ChildAtIndexCallback(
364 const CppArgumentList& args, CppVariant* result) { 364 const CppArgumentList& args, CppVariant* result) {
365 if (args.size() == 0 || !args[0].isNumber()) { 365 if (args.empty() || !args[0].isNumber()) {
366 result->SetNull(); 366 result->SetNull();
367 return; 367 return;
368 } 368 }
369 369
370 AccessibilityUIElement* child = GetChildAtIndex(args[0].ToInt32()); 370 AccessibilityUIElement* child = GetChildAtIndex(args[0].ToInt32());
371 if (!child) { 371 if (!child) {
372 result->SetNull(); 372 result->SetNull();
373 return; 373 return;
374 } 374 }
375 375
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
557 return element; 557 return element;
558 } 558 }
559 559
560 AccessibilityUIElement* AccessibilityUIElementList::CreateRoot( 560 AccessibilityUIElement* AccessibilityUIElementList::CreateRoot(
561 const WebAccessibilityObject& object) { 561 const WebAccessibilityObject& object) {
562 AccessibilityUIElement* element = 562 AccessibilityUIElement* element =
563 new RootAccessibilityUIElement(object, this); 563 new RootAccessibilityUIElement(object, this);
564 elements_.push_back(element); 564 elements_.push_back(element);
565 return element; 565 return element;
566 } 566 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698