[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 1 | // Copyright (c) 2009 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_EXTERNAL_PROTOCOL_DIALOG_H_ |
| 6 | #define CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_ |
| 7 | |
| 8 | #include "base/time.h" |
| 9 | #include "views/window/dialog_delegate.h" |
| 10 | |
| 11 | class GURL; |
| 12 | class MessageBoxView; |
| 13 | class TabContents; |
| 14 | |
| 15 | // An external protocol dialog for ChromeOS. Unlike other platforms, |
| 16 | // ChromeOS does not support launching external program, therefore, |
| 17 | // this dialog simply says it is not supported. |
| 18 | class ExternalProtocolDialog : public views::DialogDelegate { |
| 19 | public: |
| 20 | // RunExternalProtocolDialog calls this private constructor. |
| 21 | ExternalProtocolDialog(TabContents* tab_contents, const GURL& url); |
| 22 | |
| 23 | virtual ~ExternalProtocolDialog(); |
| 24 | |
| 25 | // views::DialogDelegate Methods: |
| 26 | virtual int GetDialogButtons() const; |
| 27 | virtual std::wstring GetDialogButtonLabel( |
| 28 | MessageBoxFlags::DialogButton button) const; |
| 29 | virtual std::wstring GetWindowTitle() const; |
| 30 | virtual void DeleteDelegate(); |
| 31 | virtual bool Accept(); |
| 32 | virtual views::View* GetContentsView(); |
| 33 | |
| 34 | // views::WindowDelegate Methods: |
| 35 | virtual bool IsAlwaysOnTop() const { return false; } |
| 36 | virtual bool IsModal() const { return false; } |
| 37 | |
| 38 | private: |
| 39 | // The message box view whose commands we handle. |
| 40 | MessageBoxView* message_box_view_; |
| 41 | |
| 42 | // The time at which this dialog was created. |
[email protected] | f691f0e | 2010-05-12 16:43:16 | [diff] [blame^] | 43 | base::TimeTicks creation_time_; |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 44 | |
| 45 | // The scheme of the url. |
| 46 | std::wstring scheme_; |
| 47 | |
| 48 | DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialog); |
| 49 | }; |
| 50 | |
| 51 | #endif // CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_ |