[email protected] | 41e5a1d | 2011-03-22 17:26:00 | [diff] [blame^] | 1 | // Copyright (c) 2011 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; | ||||
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 13 | class TabContents; |
14 | |||||
[email protected] | 41e5a1d | 2011-03-22 17:26:00 | [diff] [blame^] | 15 | namespace views { |
16 | class MessageBoxView; | ||||
17 | } | ||||
18 | |||||
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 19 | // 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. | ||||
22 | class 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] | 41e5a1d | 2011-03-22 17:26:00 | [diff] [blame^] | 44 | views::MessageBoxView* message_box_view_; |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 45 | |
46 | // The time at which this dialog was created. | ||||
[email protected] | f691f0e | 2010-05-12 16:43:16 | [diff] [blame] | 47 | base::TimeTicks creation_time_; |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 48 | |
49 | // The scheme of the url. | ||||
[email protected] | a65175d | 2010-08-17 04:00:57 | [diff] [blame] | 50 | std::string scheme_; |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 51 | |
52 | DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialog); | ||||
53 | }; | ||||
54 | |||||
55 | #endif // CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_ |