blob: 830b9e7ca486b82c543825bb8591285ff11bfeb6 [file] [log] [blame]
[email protected]2a906c02012-01-06 03:52:121// Copyright (c) 2012 The Chromium Authors. All rights reserved.
[email protected]733d0c42009-10-30 17:58:242// 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_EXTERNAL_PROTOCOL_DIALOG_H_
6#define CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_
7
[email protected]956b3d32011-09-28 09:38:488#include <string>
9
avi8a07d53892015-12-24 22:13:5310#include "base/macros.h"
[email protected]5c073322013-06-11 08:03:3011#include "base/strings/string16.h"
[email protected]f248ebe02013-06-28 00:58:2812#include "base/time/time.h"
[email protected]4cce6c22011-11-14 15:32:4413#include "ui/views/window/dialog_delegate.h"
[email protected]733d0c42009-10-30 17:58:2414
15class GURL;
[email protected]ef9572e2012-01-04 22:14:1216
17namespace content {
18class WebContents;
19}
[email protected]733d0c42009-10-30 17:58:2420
[email protected]41e5a1d2011-03-22 17:26:0021namespace views {
22class MessageBoxView;
23}
24
[email protected]733d0c42009-10-30 17:58:2425// An external protocol dialog for ChromeOS. Unlike other platforms,
26// ChromeOS does not support launching external program, therefore,
27// this dialog simply says it is not supported.
28class ExternalProtocolDialog : public views::DialogDelegate {
29 public:
30 // RunExternalProtocolDialog calls this private constructor.
[email protected]ef9572e2012-01-04 22:14:1231 ExternalProtocolDialog(content::WebContents* web_contents, const GURL& url);
[email protected]733d0c42009-10-30 17:58:2432
dchengc97a0282015-01-15 23:04:2433 ~ExternalProtocolDialog() override;
[email protected]733d0c42009-10-30 17:58:2434
35 // views::DialogDelegate Methods:
dchengc97a0282015-01-15 23:04:2436 int GetDialogButtons() const override;
37 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
38 base::string16 GetWindowTitle() const override;
39 void DeleteDelegate() override;
40 bool Accept() override;
41 views::View* GetContentsView() override;
[email protected]733d0c42009-10-30 17:58:2442
[email protected]2fdd00a2011-06-13 21:56:2643 // views::WidgetDelegate Methods:
dchengc97a0282015-01-15 23:04:2444 const views::Widget* GetWidget() const override;
45 views::Widget* GetWidget() override;
[email protected]733d0c42009-10-30 17:58:2446
47 private:
48 // The message box view whose commands we handle.
[email protected]41e5a1d2011-03-22 17:26:0049 views::MessageBoxView* message_box_view_;
[email protected]733d0c42009-10-30 17:58:2450
51 // The time at which this dialog was created.
[email protected]f691f0e2010-05-12 16:43:1652 base::TimeTicks creation_time_;
[email protected]733d0c42009-10-30 17:58:2453
54 // The scheme of the url.
[email protected]a65175d2010-08-17 04:00:5755 std::string scheme_;
[email protected]733d0c42009-10-30 17:58:2456
57 DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialog);
58};
59
60#endif // CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_