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

Side by Side Diff: chrome/test/webdriver/webdriver_test_util.h

Issue 16917011: mac: Replace base::mac::ScopedCFTypeRef with base::ScopedCFTypeRef. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: with fixed off-by-1 in git-clang-format 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
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 CHROME_TEST_WEBDRIVER_WEBDRIVER_TEST_UTIL_H_ 5 #ifndef CHROME_TEST_WEBDRIVER_WEBDRIVER_TEST_UTIL_H_
6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_TEST_UTIL_H_ 6 #define CHROME_TEST_WEBDRIVER_WEBDRIVER_TEST_UTIL_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
(...skipping 11 matching lines...) Expand all
22 // when this object goes out of scope. 22 // when this object goes out of scope.
23 class RestoreKeyboardLayoutOnDestruct { 23 class RestoreKeyboardLayoutOnDestruct {
24 public: 24 public:
25 RestoreKeyboardLayoutOnDestruct(); 25 RestoreKeyboardLayoutOnDestruct();
26 ~RestoreKeyboardLayoutOnDestruct(); 26 ~RestoreKeyboardLayoutOnDestruct();
27 27
28 private: 28 private:
29 #if defined(OS_WIN) 29 #if defined(OS_WIN)
30 HKL layout_; 30 HKL layout_;
31 #elif defined(OS_MACOSX) 31 #elif defined(OS_MACOSX)
32 base::mac::ScopedCFTypeRef<TISInputSourceRef> layout_; 32 base::ScopedCFTypeRef<TISInputSourceRef> layout_;
33 #endif 33 #endif
34 34
35 DISALLOW_COPY_AND_ASSIGN(RestoreKeyboardLayoutOnDestruct); 35 DISALLOW_COPY_AND_ASSIGN(RestoreKeyboardLayoutOnDestruct);
36 }; 36 };
37 37
38 #if defined(OS_WIN) 38 #if defined(OS_WIN)
39 // Loads and activates the given keyboard layout. |input_locale_identifier| 39 // Loads and activates the given keyboard layout. |input_locale_identifier|
40 // is composed of a device and language ID. Returns true on success. 40 // is composed of a device and language ID. Returns true on success.
41 // See http://msdn.microsoft.com/en-us/library/dd318693(v=vs.85).aspx 41 // See http://msdn.microsoft.com/en-us/library/dd318693(v=vs.85).aspx
42 // Example: "00000409" is the default en-us keyboard layout. 42 // Example: "00000409" is the default en-us keyboard layout.
43 bool SwitchKeyboardLayout(const std::string& input_locale_identifier); 43 bool SwitchKeyboardLayout(const std::string& input_locale_identifier);
44 #endif // defined(OS_WIN) 44 #endif // defined(OS_WIN)
45 45
46 #if defined(OS_MACOSX) 46 #if defined(OS_MACOSX)
47 // Selects the input source for the given input source ID. Returns true on 47 // Selects the input source for the given input source ID. Returns true on
48 // success. 48 // success.
49 // Example: "com.apple.keyboardlayout.US" is the default en-us keyboard layout. 49 // Example: "com.apple.keyboardlayout.US" is the default en-us keyboard layout.
50 bool SwitchKeyboardLayout(const std::string& input_source_id); 50 bool SwitchKeyboardLayout(const std::string& input_source_id);
51 #endif // defined(OS_MACOSX) 51 #endif // defined(OS_MACOSX)
52 52
53 } // namespace webdriver 53 } // namespace webdriver
54 54
55 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_TEST_UTIL_H_ 55 #endif // CHROME_TEST_WEBDRIVER_WEBDRIVER_TEST_UTIL_H_
OLDNEW
« no previous file with comments | « chrome/test/webdriver/keycode_text_conversion_mac.mm ('k') | chrome/test/webdriver/webdriver_test_util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698