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

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

Issue 10918224: Cross-platform plumbing for resize-to-client (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fixed typo. Created 8 years, 2 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
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/resizing_host_observer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
6 #define REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
7
8 #include <string>
9
10 #include "remoting/host/host_status_observer.h"
11 #include "remoting/host/chromoting_host.h"
12
13 #include "base/basictypes.h"
14 #include "base/compiler_specific.h"
15 #include "third_party/skia/include/core/SkSize.h"
16
17 namespace remoting {
18
19 class DesktopResizer;
20
21 // 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 // the original desktop size.
24 class ResizingHostObserver : public HostStatusObserver {
25 public:
26 explicit ResizingHostObserver(DesktopResizer* desktop_resizer,
27 ChromotingHost* host);
28 virtual ~ResizingHostObserver();
29
30 // HostStatusObserver interface
31 virtual void OnClientAuthenticated(const std::string& jid) OVERRIDE;
32 virtual void OnClientDisconnected(const std::string& jid) OVERRIDE;
33 virtual void OnClientDimensionsChanged(const std::string& jid,
34 const SkISize& size) OVERRIDE;
35
36 private:
37 DesktopResizer* desktop_resizer_;
38 scoped_refptr<ChromotingHost> host_;
39 SkISize original_size_;
40 SkISize previous_size_;
41 std::string client_jid_;
42
43 DISALLOW_COPY_AND_ASSIGN(ResizingHostObserver);
44 };
45
46 } // namespace remoting
47
48 #endif // REMOTING_HOST_RESIZING_HOST_OBSERVER_H_
OLDNEW
« no previous file with comments | « remoting/host/remoting_me2me_host.cc ('k') | remoting/host/resizing_host_observer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698