OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_EXTERNAL_PROTOCOL_DIALOG_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_UI_EXTERNAL_PROTOCOL_DIALOG_DELEGATE_H_ |
6 #define CHROME_BROWSER_UI_EXTERNAL_PROTOCOL_DIALOG_DELEGATE_H_ | 6 #define CHROME_BROWSER_UI_EXTERNAL_PROTOCOL_DIALOG_DELEGATE_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/time/time.h" | 10 #include "base/time/time.h" |
11 #include "chrome/browser/ui/protocol_dialog_delegate.h" | 11 #include "chrome/browser/ui/protocol_dialog_delegate.h" |
12 #include "url/gurl.h" | 12 #include "url/gurl.h" |
13 | 13 |
14 // Provides text for the external protocol handler dialog and handles whether | 14 // Provides text for the external protocol handler dialog and handles whether |
15 // or not to launch the application for the given protocol. | 15 // or not to launch the application for the given protocol. |
16 class ExternalProtocolDialogDelegate : public ProtocolDialogDelegate { | 16 class ExternalProtocolDialogDelegate : public ProtocolDialogDelegate { |
17 public: | 17 public: |
18 explicit ExternalProtocolDialogDelegate(const GURL& url, | 18 explicit ExternalProtocolDialogDelegate(const GURL& url, |
19 int render_process_host_id, | 19 int render_process_host_id, |
20 int tab_contents_id); | 20 int tab_contents_id); |
21 virtual ~ExternalProtocolDialogDelegate(); | 21 ~ExternalProtocolDialogDelegate() override; |
22 | 22 |
23 const base::string16& program_name() const { return program_name_; } | 23 const base::string16& program_name() const { return program_name_; } |
24 | 24 |
25 virtual void DoAccept(const GURL& url, bool dont_block) const override; | 25 void DoAccept(const GURL& url, bool dont_block) const override; |
26 virtual void DoCancel(const GURL& url, bool dont_block) const override; | 26 void DoCancel(const GURL& url, bool dont_block) const override; |
27 | 27 |
28 virtual base::string16 GetMessageText() const override; | 28 base::string16 GetMessageText() const override; |
29 virtual base::string16 GetCheckboxText() const override; | 29 base::string16 GetCheckboxText() const override; |
30 virtual base::string16 GetTitleText() const override; | 30 base::string16 GetTitleText() const override; |
31 | 31 |
32 private: | 32 private: |
33 int render_process_host_id_; | 33 int render_process_host_id_; |
34 int tab_contents_id_; | 34 int tab_contents_id_; |
35 const base::string16 program_name_; | 35 const base::string16 program_name_; |
36 | 36 |
37 DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialogDelegate); | 37 DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialogDelegate); |
38 }; | 38 }; |
39 | 39 |
40 #endif // CHROME_BROWSER_UI_EXTERNAL_PROTOCOL_DIALOG_DELEGATE_H_ | 40 #endif // CHROME_BROWSER_UI_EXTERNAL_PROTOCOL_DIALOG_DELEGATE_H_ |
OLD | NEW |