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

Unified Diff: content/renderer/renderer_date_time_picker.h

Issue 11418295: Use WebCore:DateTimeChooser for date/time form types instead of considering them text fields. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 8 years 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 side-by-side diff with in-line comments
Download patch
Index: content/renderer/renderer_date_time_picker.h
diff --git a/content/renderer/renderer_date_time_picker.h b/content/renderer/renderer_date_time_picker.h
new file mode 100644
index 0000000000000000000000000000000000000000..f5c5d5382218b32dfd735dc08bd8c2e8c10d052c
--- /dev/null
+++ b/content/renderer/renderer_date_time_picker.h
@@ -0,0 +1,45 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_IMPL_H_
+#define CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_IMPL_H_
+
+#include "base/basictypes.h"
+#include "content/public/renderer/render_view_observer.h"
+#include "ui/base/ime/text_input_type.h"
+
+namespace WebKit {
+class WebDateTimeChooserCompletion;
+class WebDateTimeChooserParams;
+} // namespace WebKit
+
+namespace content {
+class RenderViewImpl;
+
+class RendererDateTimePicker : public RenderViewObserver {
+ public:
+ RendererDateTimePicker(
+ RenderViewImpl* sender,
+ const WebKit::WebDateTimeChooserParams&,
+ WebKit::WebDateTimeChooserCompletion*);
+ virtual ~RendererDateTimePicker();
+
+ bool Open();
+
+ private:
+ void OnReplaceDateTime(const string16& new_date);
+ void OnCancel();
+
+ // RenderViewObserver
+ virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE;
+
+ const WebKit::WebDateTimeChooserParams& chooser_params_;
+ WebKit::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us
+
+ DISALLOW_COPY_AND_ASSIGN(RendererDateTimePicker);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698