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

Side by Side Diff: webrtc/base/windowpickerfactory.h

Issue 2511103002: Delete WindowPicker class and subclasses. (Closed)
Patch Set: Drop win32windowpicker_unittest.cc from build. Created 4 years, 1 month 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
« no previous file with comments | « webrtc/base/windowpicker_unittest.cc ('k') | webrtc/base/x11windowpicker.h » ('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 /*
2 * Copyright 2010 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_BASE_WINDOWPICKERFACTORY_H_
12 #define WEBRTC_BASE_WINDOWPICKERFACTORY_H_
13
14 #if defined(WEBRTC_WIN)
15 #include "webrtc/base/win32windowpicker.h"
16 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
17 #include "webrtc/base/macutils.h"
18 #include "webrtc/base/macwindowpicker.h"
19 #elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && defined(HAVE_X11)
20 #include "webrtc/base/x11windowpicker.h"
21 #endif
22
23 #include "webrtc/base/windowpicker.h"
24
25 namespace rtc {
26
27 class WindowPickerFactory {
28 public:
29 virtual ~WindowPickerFactory() {}
30
31 // Instance method for dependency injection.
32 virtual WindowPicker* Create() {
33 return CreateWindowPicker();
34 }
35
36 static WindowPicker* CreateWindowPicker() {
37 #if defined(WEBRTC_WIN)
38 return new Win32WindowPicker();
39 #elif defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
40 return new MacWindowPicker();
41 #elif defined(WEBRTC_LINUX) && !defined(WEBRTC_ANDROID) && defined(HAVE_X11)
42 return new X11WindowPicker();
43 #else
44 return NULL;
45 #endif
46 }
47
48 static bool IsSupported() {
49 #if defined(WEBRTC_MAC) && !defined(WEBRTC_IOS)
50 return GetOSVersionName() >= kMacOSLeopard;
51 #else
52 return true;
53 #endif
54 }
55 };
56
57 } // namespace rtc
58
59 #endif // WEBRTC_BASE_WINDOWPICKERFACTORY_H_
OLDNEW
« no previous file with comments | « webrtc/base/windowpicker_unittest.cc ('k') | webrtc/base/x11windowpicker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698