1// Copyright 2014 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 CHROME_BROWSER_CHROMEOS_SET_TIME_DIALOG_H_
6#define CHROME_BROWSER_CHROMEOS_SET_TIME_DIALOG_H_
7
8#include <string>
9
10#include "base/compiler_specific.h"
11#include "base/values.h"
12#include "ui/gfx/native_widget_types.h"
13#include "ui/web_dialogs/web_dialog_delegate.h"
14
15namespace chromeos {
16
17// Set Time dialog for setting the system time, date and time zone.
18class SetTimeDialog : public ui::WebDialogDelegate {
19 public:
20  SetTimeDialog();
21  virtual ~SetTimeDialog();
22
23  static void ShowDialog(gfx::NativeWindow owning_window);
24
25 private:
26  // ui::WebDialogDelegate:
27  virtual ui::ModalType GetDialogModalType() const OVERRIDE;
28  virtual base::string16 GetDialogTitle() const OVERRIDE;
29  virtual GURL GetDialogContentURL() const OVERRIDE;
30  virtual void GetWebUIMessageHandlers(
31      std::vector<content::WebUIMessageHandler*>* handlers) const OVERRIDE;
32  virtual void GetDialogSize(gfx::Size* size) const OVERRIDE;
33  virtual std::string GetDialogArgs() const OVERRIDE;
34  virtual void OnDialogClosed(const std::string& json_retval) OVERRIDE;
35  virtual void OnCloseContents(content::WebContents* source,
36                               bool* out_close_dialog) OVERRIDE;
37  virtual bool ShouldShowDialogTitle() const OVERRIDE;
38  virtual bool HandleContextMenu(
39      const content::ContextMenuParams& params) OVERRIDE;
40
41  DISALLOW_COPY_AND_ASSIGN(SetTimeDialog);
42};
43
44}  // namespace chromeos
45
46#endif  // CHROME_BROWSER_CHROMEOS_SET_TIME_DIALOG_H_
47