OLD | NEW |
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 | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 17 matching lines...) Expand all Loading... |
28 #include "web/ExternalDateTimeChooser.h" | 28 #include "web/ExternalDateTimeChooser.h" |
29 | 29 |
30 #include "core/InputTypeNames.h" | 30 #include "core/InputTypeNames.h" |
31 #include "platform/DateTimeChooserClient.h" | 31 #include "platform/DateTimeChooserClient.h" |
32 #include "public/web/WebDateTimeChooserCompletion.h" | 32 #include "public/web/WebDateTimeChooserCompletion.h" |
33 #include "public/web/WebDateTimeChooserParams.h" | 33 #include "public/web/WebDateTimeChooserParams.h" |
34 #include "public/web/WebViewClient.h" | 34 #include "public/web/WebViewClient.h" |
35 #include "web/ChromeClientImpl.h" | 35 #include "web/ChromeClientImpl.h" |
36 #include "wtf/text/AtomicString.h" | 36 #include "wtf/text/AtomicString.h" |
37 | 37 |
38 using namespace WebCore; | 38 using namespace blink; |
39 | 39 |
40 namespace blink { | 40 namespace blink { |
41 | 41 |
42 class WebDateTimeChooserCompletionImpl : public WebDateTimeChooserCompletion { | 42 class WebDateTimeChooserCompletionImpl : public WebDateTimeChooserCompletion { |
43 public: | 43 public: |
44 WebDateTimeChooserCompletionImpl(ExternalDateTimeChooser* chooser) | 44 WebDateTimeChooserCompletionImpl(ExternalDateTimeChooser* chooser) |
45 : m_chooser(chooser) | 45 : m_chooser(chooser) |
46 { | 46 { |
47 } | 47 } |
48 | 48 |
(...skipping 16 matching lines...) Expand all Loading... |
65 delete this; | 65 delete this; |
66 } | 66 } |
67 | 67 |
68 RefPtrWillBePersistent<ExternalDateTimeChooser> m_chooser; | 68 RefPtrWillBePersistent<ExternalDateTimeChooser> m_chooser; |
69 }; | 69 }; |
70 | 70 |
71 ExternalDateTimeChooser::~ExternalDateTimeChooser() | 71 ExternalDateTimeChooser::~ExternalDateTimeChooser() |
72 { | 72 { |
73 } | 73 } |
74 | 74 |
75 ExternalDateTimeChooser::ExternalDateTimeChooser(WebCore::DateTimeChooserClient*
client) | 75 ExternalDateTimeChooser::ExternalDateTimeChooser(blink::DateTimeChooserClient* c
lient) |
76 : m_client(client) | 76 : m_client(client) |
77 { | 77 { |
78 ASSERT(client); | 78 ASSERT(client); |
79 } | 79 } |
80 | 80 |
81 PassRefPtrWillBeRawPtr<ExternalDateTimeChooser> ExternalDateTimeChooser::create(
ChromeClientImpl* chromeClient, WebViewClient* webViewClient, WebCore::DateTimeC
hooserClient* client, const WebCore::DateTimeChooserParameters& parameters) | 81 PassRefPtrWillBeRawPtr<ExternalDateTimeChooser> ExternalDateTimeChooser::create(
ChromeClientImpl* chromeClient, WebViewClient* webViewClient, blink::DateTimeCho
oserClient* client, const blink::DateTimeChooserParameters& parameters) |
82 { | 82 { |
83 ASSERT(chromeClient); | 83 ASSERT(chromeClient); |
84 RefPtrWillBeRawPtr<ExternalDateTimeChooser> chooser = adoptRefWillBeNoop(new
ExternalDateTimeChooser(client)); | 84 RefPtrWillBeRawPtr<ExternalDateTimeChooser> chooser = adoptRefWillBeNoop(new
ExternalDateTimeChooser(client)); |
85 if (!chooser->openDateTimeChooser(chromeClient, webViewClient, parameters)) | 85 if (!chooser->openDateTimeChooser(chromeClient, webViewClient, parameters)) |
86 chooser.clear(); | 86 chooser.clear(); |
87 return chooser.release(); | 87 return chooser.release(); |
88 } | 88 } |
89 | 89 |
90 | 90 |
91 static WebDateTimeInputType toWebDateTimeInputType(const AtomicString& source) | 91 static WebDateTimeInputType toWebDateTimeInputType(const AtomicString& source) |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 void ExternalDateTimeChooser::endChooser() | 164 void ExternalDateTimeChooser::endChooser() |
165 { | 165 { |
166 DateTimeChooserClient* client = m_client; | 166 DateTimeChooserClient* client = m_client; |
167 m_client = 0; | 167 m_client = 0; |
168 client->didEndChooser(); | 168 client->didEndChooser(); |
169 } | 169 } |
170 | 170 |
171 } | 171 } |
172 | 172 |
173 #endif | 173 #endif |
OLD | NEW |