Chromium Code Reviews| 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..9496f36a1562d282998e16173edb0eb9593ba8f8 |
| --- /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_ |
|
bulach
2012/12/07 18:10:13
nit: s/_IMPL//
Miguel Garcia
2012/12/07 19:04:35
nice catch!
|
| +#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; |
| +struct WebDateTimeChooserParams; |
| +} // namespace WebKit |
| + |
| +namespace content { |
| +class RenderViewImpl; |
| + |
| +class RendererDateTimePicker : public RenderViewObserver { |
| + public: |
| + RendererDateTimePicker( |
| + RenderViewImpl* sender, |
| + const WebKit::WebDateTimeChooserParams&, |
|
bulach
2012/12/07 18:10:13
nit: in webkit params are unnamed, in chromium the
Miguel Garcia
2012/12/07 19:04:35
Done.
|
| + 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_; |
|
bulach
2012/12/07 18:10:13
is this expensive to copy? we either store pointer
Miguel Garcia
2012/12/07 19:04:35
It's not. It is just a struct with a few integers.
|
| + WebKit::WebDateTimeChooserCompletion* chooser_completion_; // Not owned by us |
|
bulach
2012/12/07 18:10:13
if it was, it'd probably be a scoped_ptr :) no nee
Miguel Garcia
2012/12/07 19:04:35
So if people see just a raw pointer with no commen
|
| + |
| + DISALLOW_COPY_AND_ASSIGN(RendererDateTimePicker); |
| +}; |
| + |
| +} // namespace content |
| + |
| +#endif // CONTENT_RENDERER_RENDERER_DATE_TIME_PICKER_IMPL_H_ |