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

Unified Diff: remoting/host/basic_desktop_environment.h

Issue 13212009: Made DesktopEnvironment responsible for creation of the disconnect window. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix Mac Created 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | remoting/host/basic_desktop_environment.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/basic_desktop_environment.h
diff --git a/remoting/host/basic_desktop_environment.h b/remoting/host/basic_desktop_environment.h
index dcd5f8fc3b5757ee0f57c9ddc4332dd5fd21abd2..f5de55b907b2e2b773bce0108096a39493e545d8 100644
--- a/remoting/host/basic_desktop_environment.h
+++ b/remoting/host/basic_desktop_environment.h
@@ -9,9 +9,11 @@
#include "base/compiler_specific.h"
#include "base/memory/ref_counted.h"
#include "remoting/host/desktop_environment.h"
+#include "remoting/host/ui_strings.h"
namespace remoting {
+class HostWindow;
class LocalInputMonitor;
// Used to create audio/video capturers and event executor that work with
@@ -28,11 +30,15 @@ class BasicDesktopEnvironment : public DesktopEnvironment {
protected:
friend class BasicDesktopEnvironmentFactory;
+
+ // |ui_strings| are hosted by the BasicDesktopEnvironmentFactory instance that
+ // created |this|. |ui_strings| must outlive this object.
BasicDesktopEnvironment(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
- base::WeakPtr<ClientSessionControl> client_session_control);
+ base::WeakPtr<ClientSessionControl> client_session_control,
+ const UiStrings* ui_strings);
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner() const {
return caller_task_runner_;
@@ -46,6 +52,8 @@ class BasicDesktopEnvironment : public DesktopEnvironment {
return ui_task_runner_;
}
+ const UiStrings* ui_strings() const { return ui_strings_; }
+
private:
// Task runner on which methods of DesktopEnvironment interface should be
// called.
@@ -57,9 +65,15 @@ class BasicDesktopEnvironment : public DesktopEnvironment {
// Used to run UI code.
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
+ // Presents the disconnect window to the local user.
+ scoped_ptr<HostWindow> disconnect_window_;
+
// Notifies the client session about the local mouse movements.
scoped_ptr<LocalInputMonitor> local_input_monitor_;
+ // Points to the localized UI strings.
+ const UiStrings* ui_strings_;
+
DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironment);
};
@@ -69,7 +83,8 @@ class BasicDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
BasicDesktopEnvironmentFactory(
scoped_refptr<base::SingleThreadTaskRunner> caller_task_runner,
scoped_refptr<base::SingleThreadTaskRunner> input_task_runner,
- scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner);
+ scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner,
+ const UiStrings& ui_strings);
virtual ~BasicDesktopEnvironmentFactory();
// DesktopEnvironmentFactory implementation.
@@ -90,6 +105,8 @@ class BasicDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
return ui_task_runner_;
}
+ const UiStrings& ui_strings() const { return ui_strings_; }
+
private:
// Task runner on which methods of DesktopEnvironmentFactory interface should
// be called.
@@ -101,6 +118,9 @@ class BasicDesktopEnvironmentFactory : public DesktopEnvironmentFactory {
// Used to run UI code.
scoped_refptr<base::SingleThreadTaskRunner> ui_task_runner_;
+ // Contains a copy of the localized UI strings.
+ const UiStrings ui_strings_;
+
DISALLOW_COPY_AND_ASSIGN(BasicDesktopEnvironmentFactory);
};
« no previous file with comments | « no previous file | remoting/host/basic_desktop_environment.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698