Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_IMPL_H_ | |
| 6 #define CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_IMPL_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "content/public/renderer/render_view_observer.h" | |
| 10 #include "ui/base/ime/text_input_type.h" | |
| 11 | |
| 12 namespace WebKit { | |
| 13 class WebDateTimeChooserCompletion; | |
| 14 class WebDateTimeChooserParams; | |
| 15 } // namespace WebKit | |
| 16 | |
| 17 namespace content { | |
| 18 class RenderViewImpl; | |
| 19 | |
| 20 class RendererDateTimePickerImpl : public RenderViewObserver { | |
|
Peter Beverloo
2012/12/05 11:57:03
I don't think this should be *Impl, as it doesn't
Miguel Garcia
2012/12/05 16:23:16
I wanted to ask Kent about that, this forces us to
| |
| 21 public: | |
| 22 RendererDateTimePickerImpl( | |
| 23 RenderViewImpl* sender, | |
| 24 const WebKit::WebDateTimeChooserParams&, | |
| 25 WebKit::WebDateTimeChooserCompletion*); | |
| 26 virtual ~RendererDateTimePickerImpl(); | |
| 27 | |
| 28 bool Open(); | |
| 29 | |
| 30 private: | |
| 31 void OnReplaceDateTime(const string16& new_date); | |
| 32 void OnClear(); | |
| 33 | |
| 34 // Extract the type of form from the chooser params | |
| 35 ui::TextInputType ExtractType(const WebKit::WebDateTimeChooserParams&); | |
|
Miguel Garcia
2012/12/05 16:23:16
this can actually be implemented as as static func
| |
| 36 | |
| 37 // RenderViewObserver | |
| 38 virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE; | |
| 39 | |
| 40 const WebKit::WebDateTimeChooserParams& chooser_params_; | |
| 41 WebKit::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us | |
| 42 | |
| 43 DISALLOW_COPY_AND_ASSIGN(RendererDateTimePickerImpl); | |
| 44 }; | |
| 45 | |
| 46 } // namespace content | |
| 47 | |
| 48 #endif // CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_IMPL_H_ | |
| OLD | NEW |