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

Side by Side Diff: media/video/capture/screen/win/scoped_thread_desktop.h

Issue 15692018: Remove screen capturers from media/video/capture/screen. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 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
(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 MEDIA_VIDEO_CAPTURE_SCREEN_WIN_SCOPED_THREAD_DESKTOP_H_
6 #define MEDIA_VIDEO_CAPTURE_SCREEN_WIN_SCOPED_THREAD_DESKTOP_H_
7
8 #include <windows.h>
9
10 #include "base/basictypes.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "media/base/media_export.h"
13
14 namespace media {
15
16 class Desktop;
17
18 class MEDIA_EXPORT ScopedThreadDesktop {
19 public:
20 ScopedThreadDesktop();
21 ~ScopedThreadDesktop();
22
23 // Returns true if |desktop| has the same desktop name as the currently
24 // assigned desktop (if assigned) or as the initial desktop (if not assigned).
25 // Returns false in any other case including failing Win32 APIs and
26 // uninitialized desktop handles.
27 bool IsSame(const Desktop& desktop);
28
29 // Reverts the calling thread to use the initial desktop.
30 void Revert();
31
32 // Assigns |desktop| to be the calling thread. Returns true if the thread has
33 // been switched to |desktop| successfully.
34 bool SetThreadDesktop(scoped_ptr<Desktop> desktop);
35
36 private:
37 // The desktop handle assigned to the calling thread by Set
38 scoped_ptr<Desktop> assigned_;
39
40 // The desktop handle assigned to the calling thread at creation.
41 scoped_ptr<Desktop> initial_;
42
43 DISALLOW_COPY_AND_ASSIGN(ScopedThreadDesktop);
44 };
45
46 } // namespace media
47
48 #endif // MEDIA_VIDEO_CAPTURE_SCREEN_WIN_SCOPED_THREAD_DESKTOP_H_
OLDNEW
« no previous file with comments | « media/video/capture/screen/win/desktop.cc ('k') | media/video/capture/screen/win/scoped_thread_desktop.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698