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

Side by Side Diff: Source/web/WebSelectElement.cpp

Issue 843683005: Fix a bit of C++11 in web/ (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 5 years, 11 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 /* 1 /*
2 * Copyright (C) 2010 Google Inc. All rights reserved. 2 * Copyright (C) 2010 Google Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions are 5 * modification, are permitted provided that the following conditions are
6 * met: 6 * met:
7 * 7 *
8 * * Redistributions of source code must retain the above copyright 8 * * Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer. 9 * notice, this list of conditions and the following disclaimer.
10 * * Redistributions in binary form must reproduce the above 10 * * Redistributions in binary form must reproduce the above
(...skipping 23 matching lines...) Expand all
34 #include "core/HTMLNames.h" 34 #include "core/HTMLNames.h"
35 #include "core/html/HTMLOptionElement.h" 35 #include "core/html/HTMLOptionElement.h"
36 #include "core/html/HTMLSelectElement.h" 36 #include "core/html/HTMLSelectElement.h"
37 #include "public/platform/WebString.h" 37 #include "public/platform/WebString.h"
38 #include "wtf/PassRefPtr.h" 38 #include "wtf/PassRefPtr.h"
39 39
40 namespace blink { 40 namespace blink {
41 41
42 WebVector<WebElement> WebSelectElement::listItems() const 42 WebVector<WebElement> WebSelectElement::listItems() const
43 { 43 {
44 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement> >& sourceItems = cons tUnwrap<HTMLSelectElement>()->listItems(); 44 const WillBeHeapVector<RawPtrWillBeMember<HTMLElement>>& sourceItems = const Unwrap<HTMLSelectElement>()->listItems();
45 WebVector<WebElement> items(sourceItems.size()); 45 WebVector<WebElement> items(sourceItems.size());
46 for (size_t i = 0; i < sourceItems.size(); ++i) 46 for (size_t i = 0; i < sourceItems.size(); ++i)
47 items[i] = WebElement(sourceItems[i].get()); 47 items[i] = WebElement(sourceItems[i].get());
48 48
49 return items; 49 return items;
50 } 50 }
51 51
52 WebSelectElement::WebSelectElement(const PassRefPtrWillBeRawPtr<HTMLSelectElemen t>& element) 52 WebSelectElement::WebSelectElement(const PassRefPtrWillBeRawPtr<HTMLSelectElemen t>& element)
53 : WebFormControlElement(element) 53 : WebFormControlElement(element)
54 { 54 {
55 } 55 }
56 56
57 WebSelectElement& WebSelectElement::operator=(const PassRefPtrWillBeRawPtr<HTMLS electElement>& element) 57 WebSelectElement& WebSelectElement::operator=(const PassRefPtrWillBeRawPtr<HTMLS electElement>& element)
58 { 58 {
59 m_private = element; 59 m_private = element;
60 return *this; 60 return *this;
61 } 61 }
62 62
63 WebSelectElement::operator PassRefPtrWillBeRawPtr<HTMLSelectElement>() const 63 WebSelectElement::operator PassRefPtrWillBeRawPtr<HTMLSelectElement>() const
64 { 64 {
65 return toHTMLSelectElement(m_private.get()); 65 return toHTMLSelectElement(m_private.get());
66 } 66 }
67 67
68 } // namespace blink 68 } // namespace blink
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698