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

Side by Side Diff: remoting/host/it2me/it2me_confirmation_dialog.h

Issue 2650443002: Webapp share dialog is not closed when client end of the connection is closed (Closed)
Patch Set: Merging changes from dependent CL Created 3 years, 9 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
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_ 5 #ifndef REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_
6 #define REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_ 6 #define REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 10
11 #include "base/callback_forward.h" 11 #include "base/callback_forward.h"
12 #include "base/macros.h" 12 #include "base/macros.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 15
16 // Interface for a dialog to confirm an It2Me session with the user. 16 // Interface for a dialog to confirm an It2Me session with the user.
17 // All methods, with the exception of the constructor, are guaranteed to be 17 // All methods, with the exception of the constructor, are guaranteed to be
18 // called on the UI thread. 18 // called on the UI thread.
19 class It2MeConfirmationDialog { 19 class It2MeConfirmationDialog {
20 public: 20 public:
21 enum class Result { 21 enum class Result {
22 OK, 22 OK,
23 CANCEL 23 CANCEL
24 }; 24 };
25 25
26 typedef base::Callback<void(Result)> ResultCallback; 26 typedef base::Callback<void(Result)> ResultCallback;
27 27
28 static std::unique_ptr<It2MeConfirmationDialog> Create();
29
30 virtual ~It2MeConfirmationDialog() {} 28 virtual ~It2MeConfirmationDialog() {}
31 29
32 // Shows the dialog. |callback| will be called with the user's selection. 30 // Shows the dialog. |callback| will be called with the user's selection.
33 // |callback| will not be called if the dialog is destroyed. 31 // |callback| will not be called if the dialog is destroyed.
34 virtual void Show(const std::string& remote_user_email, 32 virtual void Show(const std::string& remote_user_email,
35 const ResultCallback& callback) = 0; 33 const ResultCallback& callback) = 0;
36 }; 34 };
37 35
36 class It2MeConfirmationDialogFactory {
37 public:
38 It2MeConfirmationDialogFactory() {}
39 virtual ~It2MeConfirmationDialogFactory() {}
40
41 virtual std::unique_ptr<It2MeConfirmationDialog> Create();
42
43 private:
44 DISALLOW_COPY_AND_ASSIGN(It2MeConfirmationDialogFactory);
45 };
46
38 } // namespace remoting 47 } // namespace remoting
39 48
40 #endif // REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_ 49 #endif // REMOTING_HOST_IT2ME_IT2ME_CONFIRMATION_DIALOG_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/it2me/it2me_confirmation_dialog_chromeos.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698