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

Unified Diff: content/renderer/renderer_date_time_picker_impl.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: Use new webKit enum instead of string comparissons 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_impl.h
diff --git a/content/renderer/renderer_date_time_picker_impl.h b/content/renderer/renderer_date_time_picker_impl.h
new file mode 100644
index 0000000000000000000000000000000000000000..667439e91844ba605809f225aae0b80b97d2cffa
--- /dev/null
+++ b/content/renderer/renderer_date_time_picker_impl.h
@@ -0,0 +1,48 @@
+// 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 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
+ public:
+ RendererDateTimePickerImpl(
+ RenderViewImpl* sender,
+ const WebKit::WebDateTimeChooserParams&,
+ WebKit::WebDateTimeChooserCompletion*);
+ virtual ~RendererDateTimePickerImpl();
+
+ bool Open();
+
+ private:
+ void OnReplaceDateTime(const string16& new_date);
+ void OnClear();
+
+ // Extract the type of form from the chooser params
+ ui::TextInputType ExtractType(const WebKit::WebDateTimeChooserParams&);
Miguel Garcia 2012/12/05 16:23:16 this can actually be implemented as as static func
+
+ // 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(RendererDateTimePickerImpl);
+};
+
+} // namespace content
+
+#endif // CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_IMPL_H_

Powered by Google App Engine
This is Rietveld 408576698