Revert of Add button to add new FSP services to Files app. (patchset #8 id:140001...
[chromium-blink-merge.git] / chrome / browser / ui / views / external_protocol_dialog.h
blobaa4bb9b043402602c65f5bfffba843af81700f80
1 // Copyright (c) 2012 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.
5 #ifndef CHROME_BROWSER_UI_VIEWS_EXTERNAL_PROTOCOL_DIALOG_H_
6 #define CHROME_BROWSER_UI_VIEWS_EXTERNAL_PROTOCOL_DIALOG_H_
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/time/time.h"
11 #include "ui/views/window/dialog_delegate.h"
12 #include "url/gurl.h"
14 class ProtocolDialogDelegate;
16 namespace views {
17 class MessageBoxView;
20 class ExternalProtocolDialog : public views::DialogDelegate {
21 public:
22 // RunExternalProtocolDialog calls this private constructor.
23 ExternalProtocolDialog(scoped_ptr<const ProtocolDialogDelegate> delegate,
24 int render_process_host_id,
25 int routing_id);
27 ~ExternalProtocolDialog() override;
29 // views::DialogDelegate methods:
30 int GetDefaultDialogButton() const override;
31 base::string16 GetDialogButtonLabel(ui::DialogButton button) const override;
32 base::string16 GetWindowTitle() const override;
33 void DeleteDelegate() override;
34 bool Cancel() override;
35 bool Accept() override;
36 views::View* GetContentsView() override;
37 views::Widget* GetWidget() override;
38 const views::Widget* GetWidget() const override;
40 private:
41 const scoped_ptr<const ProtocolDialogDelegate> delegate_;
43 // The message box view whose commands we handle.
44 views::MessageBoxView* message_box_view_;
46 // IDs of the associated WebContents.
47 int render_process_host_id_;
48 int routing_id_;
50 // The time at which this dialog was created.
51 base::TimeTicks creation_time_;
53 DISALLOW_COPY_AND_ASSIGN(ExternalProtocolDialog);
56 #endif // CHROME_BROWSER_UI_VIEWS_EXTERNAL_PROTOCOL_DIALOG_H_