Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(202)

Side by Side Diff: chrome/browser/ui/protocol_dialog_delegate.h

Issue 2076253002: Simplify the text in the external protocol confirmation dialog. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix ChromeOS compile Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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_PROTOCOL_DIALOG_DELEGATE_H_ 5 #ifndef CHROME_BROWSER_UI_PROTOCOL_DIALOG_DELEGATE_H_
6 #define CHROME_BROWSER_UI_PROTOCOL_DIALOG_DELEGATE_H_ 6 #define CHROME_BROWSER_UI_PROTOCOL_DIALOG_DELEGATE_H_
7 7
8 #include "ui/base/ui_base_types.h"
8 #include "url/gurl.h" 9 #include "url/gurl.h"
9 10
10 // Interface implemented by objects that wish to show a dialog box Window for 11 // Interface implemented by objects that wish to show a dialog box Window for
11 // handling special protocols. The window that is displayed uses this interface 12 // handling special protocols. The window that is displayed uses this interface
12 // to determine the text displayed and notify the delegate object of certain 13 // to determine the text displayed and notify the delegate object of certain
13 // events. 14 // events.
14 class ProtocolDialogDelegate { 15 class ProtocolDialogDelegate {
15 public: 16 public:
16 explicit ProtocolDialogDelegate(const GURL& url) : url_(url) {} 17 explicit ProtocolDialogDelegate(const GURL& url) : url_(url) {}
17 virtual ~ProtocolDialogDelegate() {} 18 virtual ~ProtocolDialogDelegate() {}
18 19
19 // Called if the user has chosen to launch the application for this protocol. 20 // Called if the user has chosen to launch the application for this protocol.
20 // |dont_block| is true if the checkbox to prevent future instances of this 21 // |dont_block| is true if the checkbox to prevent future instances of this
21 // dialog is checked. 22 // dialog is checked.
22 virtual void DoAccept(const GURL& url, bool dont_block) const = 0; 23 virtual void DoAccept(const GURL& url, bool dont_block) const = 0;
23 24
24 // Called if the user has chosen to do nothing for this protocol. 25 // Called if the user has chosen to do nothing for this protocol.
25 // |dont_block| is true if the checkbox to prevent future instances of this 26 // |dont_block| is true if the checkbox to prevent future instances of this
26 // dialog is checked. 27 // dialog is checked.
27 virtual void DoCancel(const GURL& url, bool dont_block) const = 0; 28 virtual void DoCancel(const GURL& url, bool dont_block) const = 0;
28 29
30 virtual base::string16 GetDialogButtonLabel(
31 ui::DialogButton button) const = 0;
29 virtual base::string16 GetMessageText() const = 0; 32 virtual base::string16 GetMessageText() const = 0;
30 virtual base::string16 GetCheckboxText() const = 0; 33 virtual base::string16 GetCheckboxText() const = 0;
31 virtual base::string16 GetTitleText() const = 0; 34 virtual base::string16 GetTitleText() const = 0;
32 35
33 const GURL& url() const { return url_; } 36 const GURL& url() const { return url_; }
34 37
35 private: 38 private:
36 const GURL url_; 39 const GURL url_;
37 }; 40 };
38 41
39 #endif // CHROME_BROWSER_UI_PROTOCOL_DIALOG_DELEGATE_H_ 42 #endif // CHROME_BROWSER_UI_PROTOCOL_DIALOG_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698