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

Side by Side Diff: remoting/host/resizing_host_observer.h

Issue 12678008: Reworked the plumbing required to pass the client resolution to the desktop resizer. (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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_RESIZING_HOST_OBSERVER_H_ 5 #ifndef REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
6 #define REMOTING_HOST_RESIZING_HOST_OBSERVER_H_ 6 #define REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
7 7
8 #include "base/basictypes.h" 8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "remoting/host/session_controller.h" 11 #include "remoting/host/session_controller.h"
12 #include "third_party/skia/include/core/SkSize.h" 12 #include "third_party/skia/include/core/SkSize.h"
13 13
14 namespace remoting { 14 namespace remoting {
15 15
16 class DesktopResizer; 16 class DesktopResizer;
17 struct ScreenResolution;
17 18
18 // TODO(alexeypa): Rename this class to reflect that it is not 19 // TODO(alexeypa): Rename this class to reflect that it is not
19 // HostStatusObserver any more. 20 // HostStatusObserver any more.
20 21
21 // Use the specified DesktopResizer to match host desktop size to the client 22 // Use the specified DesktopResizer to match host desktop size to the client
22 // view size as closely as is possible. When the connection closes, restore 23 // view size as closely as is possible. When the connection closes, restore
23 // the original desktop size. 24 // the original desktop size.
24 class ResizingHostObserver : public SessionController { 25 class ResizingHostObserver : public SessionController {
25 public: 26 public:
26 explicit ResizingHostObserver(scoped_ptr<DesktopResizer> desktop_resizer); 27 explicit ResizingHostObserver(scoped_ptr<DesktopResizer> desktop_resizer);
27 virtual ~ResizingHostObserver(); 28 virtual ~ResizingHostObserver();
28 29
29 // SessionController interface. 30 // SessionController interface.
30 virtual void OnClientResolutionChanged(const SkIPoint& client_dpi, 31 virtual void SetScreenResolution(const ScreenResolution& resolution) OVERRIDE;
31 const SkISize& client_size) OVERRIDE;
32 32
33 private: 33 private:
34 scoped_ptr<DesktopResizer> desktop_resizer_; 34 scoped_ptr<DesktopResizer> desktop_resizer_;
35 SkISize original_size_; 35 SkISize original_size_;
36 36
37 DISALLOW_COPY_AND_ASSIGN(ResizingHostObserver); 37 DISALLOW_COPY_AND_ASSIGN(ResizingHostObserver);
38 }; 38 };
39 39
40 } // namespace remoting 40 } // namespace remoting
41 41
42 #endif // REMOTING_HOST_RESIZING_HOST_OBSERVER_H_ 42 #endif // REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698