OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_H_ | 5 #ifndef CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_H_ |
6 #define CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_H_ | 6 #define CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/public/renderer/render_view_observer.h" | 9 #include "content/public/renderer/render_view_observer.h" |
10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDateTimeChooserPar
ams.h" | 10 #include "third_party/WebKit/Source/WebKit/chromium/public/WebDateTimeChooserPar
ams.h" |
11 #include "ui/base/ime/text_input_type.h" | 11 |
| 12 struct ViewHostMsg_DateTimeDialogValue_Params; |
12 | 13 |
13 namespace WebKit { | 14 namespace WebKit { |
14 class WebDateTimeChooserCompletion; | 15 class WebDateTimeChooserCompletion; |
15 } // namespace WebKit | 16 } // namespace WebKit |
16 | 17 |
17 namespace content { | 18 namespace content { |
18 class RenderViewImpl; | 19 class RenderViewImpl; |
19 | 20 |
20 class RendererDateTimePicker : public RenderViewObserver { | 21 class RendererDateTimePicker : public RenderViewObserver { |
21 public: | 22 public: |
22 RendererDateTimePicker( | 23 RendererDateTimePicker( |
23 RenderViewImpl* sender, | 24 RenderViewImpl* sender, |
24 const WebKit::WebDateTimeChooserParams& params, | 25 const WebKit::WebDateTimeChooserParams& params, |
25 WebKit::WebDateTimeChooserCompletion* completion); | 26 WebKit::WebDateTimeChooserCompletion* completion); |
26 virtual ~RendererDateTimePicker(); | 27 virtual ~RendererDateTimePicker(); |
27 | 28 |
28 bool Open(); | 29 bool Open(); |
29 | 30 |
30 private: | 31 private: |
31 void OnReplaceDateTime(const string16& new_date); | 32 void OnReplaceDateTime(const ViewHostMsg_DateTimeDialogValue_Params& value); |
32 void OnCancel(); | 33 void OnCancel(); |
33 | 34 |
34 // RenderViewObserver | 35 // RenderViewObserver |
35 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
36 | 37 |
37 WebKit::WebDateTimeChooserParams chooser_params_; | 38 WebKit::WebDateTimeChooserParams chooser_params_; |
38 WebKit::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us | 39 WebKit::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us |
39 | 40 |
40 DISALLOW_COPY_AND_ASSIGN(RendererDateTimePicker); | 41 DISALLOW_COPY_AND_ASSIGN(RendererDateTimePicker); |
41 }; | 42 }; |
42 | 43 |
43 } // namespace content | 44 } // namespace content |
44 | 45 |
45 #endif // CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_H_ | 46 #endif // CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_H_ |
OLD | NEW |