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

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

Issue 10832068: Moving Windows-only files: remoting/host -> remoting/host/win. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 | « no previous file | remoting/host/desktop_win.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_DESKTOP_WIN_H_
6 #define REMOTING_HOST_DESKTOP_WIN_H_
7
8 #include <windows.h>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "base/string16.h"
13
14 namespace remoting {
15
16 class DesktopWin {
17 public:
18 ~DesktopWin();
19
20 // Returns the name of the desktop represented by the object. Return false if
21 // quering the name failed for any reason.
22 bool GetName(string16* desktop_name_out) const;
23
24 // Returns true if |other| has the same name as this desktop. Returns false
25 // in any other case including failing Win32 APIs and uninitialized desktop
26 // handles.
27 bool IsSame(const DesktopWin& other) const;
28
29 // Assigns the desktop to the current thread. Returns false is the operation
30 // failed for any reason.
31 bool SetThreadDesktop() const;
32
33 // Returns the desktop by its name or NULL if an error occurs.
34 static scoped_ptr<DesktopWin> GetDesktop(const wchar_t* desktop_name);
35
36 // Returns the desktop currently receiving user input or NULL if an error
37 // occurs.
38 static scoped_ptr<DesktopWin> GetInputDesktop();
39
40 // Returns the desktop currently assigned to the calling thread or NULL if
41 // an error occurs.
42 static scoped_ptr<DesktopWin> GetThreadDesktop();
43
44 private:
45 DesktopWin(HDESK desktop, bool own);
46
47 // The desktop handle.
48 HDESK desktop_;
49
50 // True if |desktop_| must be closed on teardown.
51 bool own_;
52
53 DISALLOW_COPY_AND_ASSIGN(DesktopWin);
54 };
55
56 } // namespace remoting
57
58 #endif // REMOTING_HOST_DESKTOP_WIN_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/host/desktop_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698