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

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

Issue 2882923002: Remove dependency of DateTimeChooserImpl on ChromeClientImpl (Closed)
Patch Set: Review feedback Created 3 years, 7 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
« no previous file with comments | « third_party/WebKit/Source/web/DateTimeChooserImpl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 16 matching lines...) Expand all
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31 #include "web/DateTimeChooserImpl.h" 31 #include "web/DateTimeChooserImpl.h"
32 32
33 #include "core/InputTypeNames.h" 33 #include "core/InputTypeNames.h"
34 #include "core/frame/FrameView.h" 34 #include "core/frame/FrameView.h"
35 #include "core/html/forms/DateTimeChooserClient.h" 35 #include "core/html/forms/DateTimeChooserClient.h"
36 #include "core/layout/LayoutTheme.h" 36 #include "core/layout/LayoutTheme.h"
37 #include "core/page/ChromeClient.h"
37 #include "core/page/PagePopup.h" 38 #include "core/page/PagePopup.h"
38 #include "platform/DateComponents.h" 39 #include "platform/DateComponents.h"
39 #include "platform/Language.h" 40 #include "platform/Language.h"
40 #include "platform/text/PlatformLocale.h" 41 #include "platform/text/PlatformLocale.h"
41 #include "public/platform/Platform.h" 42 #include "public/platform/Platform.h"
42 #include "web/ChromeClientImpl.h"
43 43
44 namespace blink { 44 namespace blink {
45 45
46 DateTimeChooserImpl::DateTimeChooserImpl( 46 DateTimeChooserImpl::DateTimeChooserImpl(
47 ChromeClientImpl* chrome_client, 47 ChromeClient* chrome_client,
48 DateTimeChooserClient* client, 48 DateTimeChooserClient* client,
49 const DateTimeChooserParameters& parameters) 49 const DateTimeChooserParameters& parameters)
50 : chrome_client_(chrome_client), 50 : chrome_client_(chrome_client),
51 client_(client), 51 client_(client),
52 popup_(0), 52 popup_(0),
53 parameters_(parameters), 53 parameters_(parameters),
54 locale_(Locale::Create(parameters.locale)) { 54 locale_(Locale::Create(parameters.locale)) {
55 DCHECK(RuntimeEnabledFeatures::inputMultipleFieldsUIEnabled()); 55 DCHECK(RuntimeEnabledFeatures::inputMultipleFieldsUIEnabled());
56 DCHECK(chrome_client_); 56 DCHECK(chrome_client_);
57 DCHECK(client_); 57 DCHECK(client_);
58 popup_ = chrome_client_->OpenPagePopup(this); 58 popup_ = chrome_client_->OpenPagePopup(this);
59 } 59 }
60 60
61 DateTimeChooserImpl* DateTimeChooserImpl::Create( 61 DateTimeChooserImpl* DateTimeChooserImpl::Create(
62 ChromeClientImpl* chrome_client, 62 ChromeClient* chrome_client,
63 DateTimeChooserClient* client, 63 DateTimeChooserClient* client,
64 const DateTimeChooserParameters& parameters) { 64 const DateTimeChooserParameters& parameters) {
65 return new DateTimeChooserImpl(chrome_client, client, parameters); 65 return new DateTimeChooserImpl(chrome_client, client, parameters);
66 } 66 }
67 67
68 DateTimeChooserImpl::~DateTimeChooserImpl() {} 68 DateTimeChooserImpl::~DateTimeChooserImpl() {}
69 69
70 DEFINE_TRACE(DateTimeChooserImpl) { 70 DEFINE_TRACE(DateTimeChooserImpl) {
71 visitor->Trace(chrome_client_); 71 visitor->Trace(chrome_client_);
72 visitor->Trace(client_); 72 visitor->Trace(client_);
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
237 EndChooser(); 237 EndChooser();
238 } 238 }
239 239
240 void DateTimeChooserImpl::DidClosePopup() { 240 void DateTimeChooserImpl::DidClosePopup() {
241 DCHECK(client_); 241 DCHECK(client_);
242 popup_ = nullptr; 242 popup_ = nullptr;
243 client_->DidEndChooser(); 243 client_->DidEndChooser();
244 } 244 }
245 245
246 } // namespace blink 246 } // namespace blink
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/web/DateTimeChooserImpl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698