blob: fcb8bea45a177b1d637b9bfd26125a5a235e07aa [file] [log] [blame]
[email protected]41e5a1d2011-03-22 17:26:001// Copyright (c) 2011 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_
[email protected]32b76ef2010-07-26 23:08:247#pragma once
[email protected]733d0c42009-10-30 17:58:248
9#include "base/time.h"
10#include "views/window/dialog_delegate.h"
11
12class GURL;
[email protected]733d0c42009-10-30 17:58:2413class TabContents;
14
[email protected]41e5a1d2011-03-22 17:26:0015namespace views {
16class MessageBoxView;
17}
18
[email protected]733d0c42009-10-30 17:58:2419// An external protocol dialog for ChromeOS. Unlike other platforms,
20// ChromeOS does not support launching external program, therefore,
21// this dialog simply says it is not supported.
22class ExternalProtocolDialog : public views::DialogDelegate {
23 public:
24 // RunExternalProtocolDialog calls this private constructor.
25 ExternalProtocolDialog(TabContents* tab_contents, const GURL& url);
26
27 virtual ~ExternalProtocolDialog();
28
29 // views::DialogDelegate Methods:
30 virtual int GetDialogButtons() const;
31 virtual std::wstring GetDialogButtonLabel(
32 MessageBoxFlags::DialogButton button) const;
33 virtual std::wstring GetWindowTitle() const;
34 virtual void DeleteDelegate();
35 virtual bool Accept();
36 virtual views::View* GetContentsView();
37
38 // views::WindowDelegate Methods:
39 virtual bool IsAlwaysOnTop() const { return false; }
40 virtual bool IsModal() const { return false; }
41
42 private:
43 // The message box view whose commands we handle.
[email protected]41e5a1d2011-03-22 17:26:0044 views::MessageBoxView* message_box_view_;
[email protected]733d0c42009-10-30 17:58:2445
46 // The time at which this dialog was created.
[email protected]f691f0e2010-05-12 16:43:1647 base::TimeTicks creation_time_;
[email protected]733d0c42009-10-30 17:58:2448
49 // The scheme of the url.
[email protected]a65175d2010-08-17 04:00:5750 std::string scheme_;
[email protected]733d0c42009-10-30 17:58:2451
52 DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialog);
53};
54
55#endif // CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_