Chromium Code Reviews| 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/public/web/WebDateTimeChooserParams.h" | 10 #include "third_party/WebKit/public/web/WebDateTimeChooserParams.h" |
| 11 #include "ui/base/ime/text_input_type.h" | |
|
Miguel Garcia
2013/11/20 23:05:53
why do you need this here?
keishi
2013/11/21 15:03:09
Removed. It was left over.
| |
| 11 | 12 |
| 12 struct ViewHostMsg_DateTimeDialogValue_Params; | 13 struct ViewHostMsg_DateTimeDialogValue_Params; |
| 13 | 14 |
| 14 namespace blink { | 15 namespace blink { |
| 15 class WebDateTimeChooserCompletion; | 16 class WebDateTimeChooserCompletion; |
| 16 } // namespace blink | 17 } // namespace blink |
| 17 | 18 |
| 18 namespace content { | 19 namespace content { |
| 19 class RenderViewImpl; | 20 class RenderViewImpl; |
| 20 | 21 |
| 21 class RendererDateTimePicker : public RenderViewObserver { | 22 class RendererDateTimePicker : public RenderViewObserver { |
| 22 public: | 23 public: |
| 23 RendererDateTimePicker( | 24 RendererDateTimePicker( |
| 24 RenderViewImpl* sender, | 25 RenderViewImpl* sender, |
| 25 const blink::WebDateTimeChooserParams& params, | 26 const blink::WebDateTimeChooserParams& params, |
| 26 blink::WebDateTimeChooserCompletion* completion); | 27 blink::WebDateTimeChooserCompletion* completion); |
| 27 virtual ~RendererDateTimePicker(); | 28 virtual ~RendererDateTimePicker(); |
| 28 | 29 |
| 29 bool Open(); | 30 bool Open(); |
| 30 | 31 |
| 31 private: | 32 private: |
| 32 void OnReplaceDateTime(const ViewHostMsg_DateTimeDialogValue_Params& value); | 33 void OnReplaceDateTime(int identifier, double value); |
| 33 void OnCancel(); | 34 void OnCancel(); |
| 34 | 35 |
| 35 // RenderViewObserver | 36 // RenderViewObserver |
| 36 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | 37 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; |
| 37 | 38 |
| 38 blink::WebDateTimeChooserParams chooser_params_; | 39 blink::WebDateTimeChooserParams chooser_params_; |
| 39 blink::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us | 40 blink::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us |
| 41 int identifier_; | |
| 40 | 42 |
| 41 DISALLOW_COPY_AND_ASSIGN(RendererDateTimePicker); | 43 DISALLOW_COPY_AND_ASSIGN(RendererDateTimePicker); |
| 42 }; | 44 }; |
| 43 | 45 |
| 44 } // namespace content | 46 } // namespace content |
| 45 | 47 |
| 46 #endif // CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_H_ | 48 #endif // CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_H_ |
| OLD | NEW |