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

Unified Diff: remoting/host/session_controller.h

Issue 12594009: Converted LocalInputMonitor into a SessionController instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: CR feedback. 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 | « remoting/host/mouse_move_observer.h ('k') | remoting/host/session_controller_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: remoting/host/session_controller.h
diff --git a/remoting/host/session_controller.h b/remoting/host/session_controller.h
index d4479afdbf2037d711af9b4410a97121a558eebc..30070b5c46bf9ca0e525582def2bb6c8f82b38b7 100644
--- a/remoting/host/session_controller.h
+++ b/remoting/host/session_controller.h
@@ -6,7 +6,6 @@
#define REMOTING_HOST_SESSION_CONTROLLER_H_
#include "base/basictypes.h"
-#include "remoting/host/mouse_move_observer.h"
#include "third_party/skia/include/core/SkPoint.h"
#include "third_party/skia/include/core/SkSize.h"
@@ -14,12 +13,23 @@ namespace remoting {
class ScreenResolution;
+// The SessionController interface should be implemented by objects
+// (representing some aspects of the desktop environment) that can control
Sergey Ulanov 2013/03/20 17:23:31 nit: drop the parentheses
alexeypa (please no reviews) 2013/03/20 17:34:31 Done.
+// the client session (disconnect, pause, or block the remote input).
+//
+// Objects implementing SessionController are created by
+// DektopEnvironment::CreateSessionController() method. They are created after
+// a client session has been authenticated and destroyed along with the session.
+//
+// The desired screen resolution of is also selected via SessionController.
+// Strictly speaking, it could be implemented via a separate interface. Adding
+// it here however saves us lots of hassle with adding another CreateXxx()
+// method to all implementations of DesktopEnvironment (eight at the moment of
Sergey Ulanov 2013/03/20 17:23:31 nit: no need to be so wordy about it - maybe remov
alexeypa (please no reviews) 2013/03/20 17:34:31 Done.
+// writing).
class SessionController {
public:
- // TODO(alexeypa): remove MouseMoveObserver entirely and move
- // OnLocalMouseMoved() method to SessionController::Delegate.
- // See http://crbug.com/104544.
- class Delegate : public MouseMoveObserver {
+ // Provides nobs for controlling the client session.
+ class Delegate {
public:
virtual ~Delegate() {}
@@ -29,12 +39,15 @@ class SessionController {
// Called when local mouse movement is detected.
virtual void OnLocalMouseMoved(const SkIPoint& position) = 0;
+
+ // Pauses or resumes the session.
+ virtual void PauseSession(bool pause) = 0;
};
virtual ~SessionController() {}
// Attempts to set new screen resolution in the session.
- virtual void SetScreenResolution(const ScreenResolution& resolution) = 0;
+ virtual void SetScreenResolution(const ScreenResolution& resolution) {}
};
} // namespace remoting
« no previous file with comments | « remoting/host/mouse_move_observer.h ('k') | remoting/host/session_controller_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698