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

Unified Diff: remoting/host/disconnect_window_linux.cc

Issue 10384127: Chromoting: the Me2me host now presents a notification on the console allowing a user to disconnect… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Unix-line endings. The license text. Created 8 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « remoting/host/disconnect_window.h ('k') | remoting/host/disconnect_window_mac.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/disconnect_window_linux.cc
diff --git a/remoting/host/disconnect_window_linux.cc b/remoting/host/disconnect_window_linux.cc
index 5a1f0aa9d5638a036af76660ca86f1e046eef142..057986bf5ae9b9b75f0b3d4412d5734489354714 100644
--- a/remoting/host/disconnect_window_linux.cc
+++ b/remoting/host/disconnect_window_linux.cc
@@ -23,6 +23,7 @@ class DisconnectWindowLinux : public DisconnectWindow {
virtual ~DisconnectWindowLinux();
virtual void Show(ChromotingHost* host,
+ const DisconnectCallback& disconnect_callback,
const std::string& username) OVERRIDE;
virtual void Hide() OVERRIDE;
@@ -36,7 +37,7 @@ class DisconnectWindowLinux : public DisconnectWindow {
void CreateWindow(const UiStrings& ui_strings);
- ChromotingHost* host_;
+ DisconnectCallback disconnect_callback_;
GtkWidget* disconnect_window_;
GtkWidget* message_;
GtkWidget* button_;
@@ -50,8 +51,7 @@ class DisconnectWindowLinux : public DisconnectWindow {
};
DisconnectWindowLinux::DisconnectWindowLinux()
- : host_(NULL),
- disconnect_window_(NULL),
+ : disconnect_window_(NULL),
current_width_(0),
current_height_(0) {
}
@@ -130,8 +130,9 @@ void DisconnectWindowLinux::CreateWindow(const UiStrings& ui_strings) {
}
void DisconnectWindowLinux::Show(ChromotingHost* host,
+ const DisconnectCallback& disconnect_callback,
const std::string& username) {
- host_ = host;
+ disconnect_callback_ = disconnect_callback;
CreateWindow(host->ui_strings());
string16 text = ReplaceStringPlaceholders(
@@ -148,16 +149,16 @@ void DisconnectWindowLinux::Hide() {
}
void DisconnectWindowLinux::OnClicked(GtkWidget* button) {
- CHECK(host_);
+ CHECK(!disconnect_callback_.is_null());
- host_->Shutdown(base::Closure());
+ disconnect_callback_.Run();
Hide();
}
gboolean DisconnectWindowLinux::OnDelete(GtkWidget* window, GdkEvent* event) {
- CHECK(host_);
+ CHECK(!disconnect_callback_.is_null());
- host_->Shutdown(base::Closure());
+ disconnect_callback_.Run();
Hide();
return TRUE;
« no previous file with comments | « remoting/host/disconnect_window.h ('k') | remoting/host/disconnect_window_mac.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698