[email protected] | a65175d | 2010-08-17 04:00:57 | [diff] [blame^] | 1 | // Copyright (c) 2010 The Chromium Authors. All rights reserved. |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 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_EXTERNAL_PROTOCOL_DIALOG_H_ |
| 6 | #define CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_ |
[email protected] | 32b76ef | 2010-07-26 23:08:24 | [diff] [blame] | 7 | #pragma once |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 8 | |
| 9 | #include "base/time.h" |
| 10 | #include "views/window/dialog_delegate.h" |
| 11 | |
| 12 | class GURL; |
| 13 | class MessageBoxView; |
| 14 | class 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. |
| 19 | class 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] | f691f0e | 2010-05-12 16:43:16 | [diff] [blame] | 44 | base::TimeTicks creation_time_; |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 45 | |
| 46 | // The scheme of the url. |
[email protected] | a65175d | 2010-08-17 04:00:57 | [diff] [blame^] | 47 | std::string scheme_; |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 48 | |
| 49 | DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialog); |
| 50 | }; |
| 51 | |
| 52 | #endif // CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_ |