[email protected] | 2a906c0 | 2012-01-06 03:52:12 | [diff] [blame] | 1 | // Copyright (c) 2012 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_ | ||||
7 | |||||
[email protected] | 956b3d3 | 2011-09-28 09:38:48 | [diff] [blame] | 8 | #include <string> |
9 | |||||
avi | 8a07d5389 | 2015-12-24 22:13:53 | [diff] [blame] | 10 | #include "base/macros.h" |
[email protected] | 5c07332 | 2013-06-11 08:03:30 | [diff] [blame] | 11 | #include "base/strings/string16.h" |
[email protected] | f248ebe0 | 2013-06-28 00:58:28 | [diff] [blame] | 12 | #include "base/time/time.h" |
[email protected] | 4cce6c2 | 2011-11-14 15:32:44 | [diff] [blame] | 13 | #include "ui/views/window/dialog_delegate.h" |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 14 | |
15 | class GURL; | ||||
[email protected] | ef9572e | 2012-01-04 22:14:12 | [diff] [blame] | 16 | |
17 | namespace content { | ||||
18 | class WebContents; | ||||
19 | } | ||||
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 20 | |
[email protected] | 41e5a1d | 2011-03-22 17:26:00 | [diff] [blame] | 21 | namespace views { |
22 | class MessageBoxView; | ||||
23 | } | ||||
24 | |||||
Joel Hockey | 5ef5d58 | 2020-10-07 00:57:44 | [diff] [blame^] | 25 | // The external protocol dialog for Chrome OS shown when there are no handlers. |
26 | class ExternalProtocolNoHandlersDialog : public views::DialogDelegate { | ||||
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 27 | public: |
Joel Hockey | 5ef5d58 | 2020-10-07 00:57:44 | [diff] [blame^] | 28 | ExternalProtocolNoHandlersDialog(content::WebContents* web_contents, |
29 | const GURL& url); | ||||
30 | ~ExternalProtocolNoHandlersDialog() override; | ||||
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 31 | |
Peter Kasting | 9ffb58bc7 | 2020-01-13 17:28:05 | [diff] [blame] | 32 | // views::DialogDelegate: |
dcheng | c97a028 | 2015-01-15 23:04:24 | [diff] [blame] | 33 | base::string16 GetWindowTitle() const override; |
dcheng | c97a028 | 2015-01-15 23:04:24 | [diff] [blame] | 34 | views::View* GetContentsView() override; |
Allen Bauer | d66100e | 2020-02-10 18:11:43 | [diff] [blame] | 35 | const views::Widget* GetWidget() const override; |
36 | views::Widget* GetWidget() override; | ||||
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 37 | |
38 | private: | ||||
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 39 | // The message box view whose commands we handle. |
[email protected] | 41e5a1d | 2011-03-22 17:26:00 | [diff] [blame] | 40 | views::MessageBoxView* message_box_view_; |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 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. | ||||
[email protected] | a65175d | 2010-08-17 04:00:57 | [diff] [blame] | 46 | std::string scheme_; |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 47 | |
Joel Hockey | 5ef5d58 | 2020-10-07 00:57:44 | [diff] [blame^] | 48 | DISALLOW_COPY_AND_ASSIGN(ExternalProtocolNoHandlersDialog); |
[email protected] | 733d0c4 | 2009-10-30 17:58:24 | [diff] [blame] | 49 | }; |
50 | |||||
51 | #endif // CHROME_BROWSER_CHROMEOS_EXTERNAL_PROTOCOL_DIALOG_H_ |