blob: 84f79557c1eb51134afe3d0e9ab06dea7a790261 [file] [log] [blame]
[email protected]a65175d2010-08-17 04:00:571// Copyright (c) 2010 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;
13class MessageBoxView;
14class TabContents;
15
16// An external protocol dialog for ChromeOS. Unlike other platforms,
17// ChromeOS does not support launching external program, therefore,
18// this dialog simply says it is not supported.
19class ExternalProtocolDialog : public views::DialogDelegate {
20 public:
21 // RunExternalProtocolDialog calls this private constructor.
22 ExternalProtocolDialog(TabContents* tab_contents, const GURL& url);
23
24 virtual ~ExternalProtocolDialog();
25
26 // views::DialogDelegate Methods:
27 virtual int GetDialogButtons() const;
28 virtual std::wstring GetDialogButtonLabel(
29 MessageBoxFlags::DialogButton button) const;
30 virtual std::wstring GetWindowTitle() const;
31 virtual void DeleteDelegate();
32 virtual bool Accept();
33 virtual views::View* GetContentsView();
34
35 // views::WindowDelegate Methods:
36 virtual bool IsAlwaysOnTop() const { return false; }
37 virtual bool IsModal() const { return false; }
38
39 private:
40 // The message box view whose commands we handle.
41 MessageBoxView* message_box_view_;
42
43 // The time at which this dialog was created.
[email protected]f691f0e2010-05-12 16:43:1644 base::TimeTicks creation_time_;
[email protected]733d0c42009-10-30 17:58:2445
46 // The scheme of the url.
[email protected]a65175d2010-08-17 04:00:5747 std::string scheme_;
[email protected]733d0c42009-10-30 17:58:2448
49 DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialog);
50};
51
52#endif // CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_