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

Side by Side Diff: third_party/WebKit/Source/web/DateTimeChooserImpl.cpp

Issue 1865813002: Remove RawPtr from Source/web/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebased Created 4 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
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2012 Google Inc. All rights reserved. 2 * Copyright (C) 2012 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
50 , m_client(client) 50 , m_client(client)
51 , m_popup(0) 51 , m_popup(0)
52 , m_parameters(parameters) 52 , m_parameters(parameters)
53 , m_locale(Locale::create(parameters.locale)) 53 , m_locale(Locale::create(parameters.locale))
54 { 54 {
55 DCHECK(m_chromeClient); 55 DCHECK(m_chromeClient);
56 DCHECK(m_client); 56 DCHECK(m_client);
57 m_popup = m_chromeClient->openPagePopup(this); 57 m_popup = m_chromeClient->openPagePopup(this);
58 } 58 }
59 59
60 RawPtr<DateTimeChooserImpl> DateTimeChooserImpl::create(ChromeClientImpl* chrome Client, DateTimeChooserClient* client, const DateTimeChooserParameters& paramete rs) 60 DateTimeChooserImpl* DateTimeChooserImpl::create(ChromeClientImpl* chromeClient, DateTimeChooserClient* client, const DateTimeChooserParameters& parameters)
61 { 61 {
62 return new DateTimeChooserImpl(chromeClient, client, parameters); 62 return new DateTimeChooserImpl(chromeClient, client, parameters);
63 } 63 }
64 64
65 DateTimeChooserImpl::~DateTimeChooserImpl() 65 DateTimeChooserImpl::~DateTimeChooserImpl()
66 { 66 {
67 } 67 }
68 68
69 DEFINE_TRACE(DateTimeChooserImpl) 69 DEFINE_TRACE(DateTimeChooserImpl)
70 { 70 {
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
180 return m_client->ownerElement(); 180 return m_client->ownerElement();
181 } 181 }
182 182
183 Locale& DateTimeChooserImpl::locale() 183 Locale& DateTimeChooserImpl::locale()
184 { 184 {
185 return *m_locale; 185 return *m_locale;
186 } 186 }
187 187
188 void DateTimeChooserImpl::setValueAndClosePopup(int numValue, const String& stri ngValue) 188 void DateTimeChooserImpl::setValueAndClosePopup(int numValue, const String& stri ngValue)
189 { 189 {
190 RawPtr<DateTimeChooserImpl> protector(this);
191 if (numValue >= 0) 190 if (numValue >= 0)
192 setValue(stringValue); 191 setValue(stringValue);
193 endChooser(); 192 endChooser();
194 } 193 }
195 194
196 void DateTimeChooserImpl::setValue(const String& value) 195 void DateTimeChooserImpl::setValue(const String& value)
197 { 196 {
198 m_client->didChooseValue(value); 197 m_client->didChooseValue(value);
199 } 198 }
200 199
201 void DateTimeChooserImpl::closePopup() 200 void DateTimeChooserImpl::closePopup()
202 { 201 {
203 endChooser(); 202 endChooser();
204 } 203 }
205 204
206 void DateTimeChooserImpl::didClosePopup() 205 void DateTimeChooserImpl::didClosePopup()
207 { 206 {
208 DCHECK(m_client); 207 DCHECK(m_client);
209 m_popup = nullptr; 208 m_popup = nullptr;
210 m_client->didEndChooser(); 209 m_client->didEndChooser();
211 } 210 }
212 211
213 } // namespace blink 212 } // namespace blink
214 213
215 #endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI) 214 #endif // ENABLE(INPUT_MULTIPLE_FIELDS_UI)
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/DateTimeChooserImpl.h ('k') | third_party/WebKit/Source/web/DevToolsEmulator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698