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

Unified Diff: remoting/host/continue_window_chromeos.cc

Issue 690183002: Remote assistance on Chrome OS Part V - It2MeHost Continue Window (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix views dependencies Created 6 years, 1 month 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/chromeos/message_box.cc ('k') | remoting/remoting_host.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/continue_window_chromeos.cc
diff --git a/remoting/host/continue_window_chromeos.cc b/remoting/host/continue_window_chromeos.cc
index 0fe427b792c9981ffc533407eb75e21813d71391..9c7e413ea97642a8eb989806d36af50f30cb689f 100644
--- a/remoting/host/continue_window_chromeos.cc
+++ b/remoting/host/continue_window_chromeos.cc
@@ -4,41 +4,59 @@
#include "remoting/host/continue_window.h"
+#include "remoting/base/string_resources.h"
+#include "remoting/host/chromeos/message_box.h"
+#include "ui/base/l10n/l10n_util.h"
+
namespace remoting {
namespace {
-// A place holder implementation for the ContinueWindow on
-// ChromeOS. Remote assistance on Chrome OS is currently under a flag so it is
-// secure to leave it unimplemented for now.
class ContinueWindowAura : public ContinueWindow {
public:
ContinueWindowAura();
~ContinueWindowAura() override;
+ void OnMessageBoxResult(MessageBox::Result result);
+
protected:
// ContinueWindow interface.
void ShowUi() override;
void HideUi() override;
private:
+ scoped_ptr<MessageBox> message_box_;
DISALLOW_COPY_AND_ASSIGN(ContinueWindowAura);
};
ContinueWindowAura::ContinueWindowAura() {
+ message_box_.reset(new MessageBox(
+ l10n_util::GetStringUTF16(IDS_MODE_IT2ME), // title
+ l10n_util::GetStringUTF16(IDS_CONTINUE_PROMPT), // dialog label
+ l10n_util::GetStringUTF16(IDS_CONTINUE_BUTTON), // ok label
+ l10n_util::GetStringUTF16(IDS_STOP_SHARING_BUTTON), // cancel label
+ base::Bind(&ContinueWindowAura::OnMessageBoxResult,
+ base::Unretained(this))));
}
ContinueWindowAura::~ContinueWindowAura() {
+ message_box_->Hide();
+}
+
+void ContinueWindowAura::OnMessageBoxResult(MessageBox::Result result) {
+ if (result == MessageBox::OK) {
+ ContinueSession();
+ } else {
+ DisconnectSession();
+ }
}
void ContinueWindowAura::ShowUi() {
- // TODO(kelvinp): Implement this on Chrome OS (See crbug.com/424908).
- NOTIMPLEMENTED();
+ message_box_->Show();
}
void ContinueWindowAura::HideUi() {
- // TODO(kelvinp): Implement this on Chrome OS (See crbug.com/424908).
- NOTIMPLEMENTED();
+ message_box_->Hide();
}
} // namespace
« no previous file with comments | « remoting/host/chromeos/message_box.cc ('k') | remoting/remoting_host.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698