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

Side by Side Diff: chrome/test/chromedriver/test_util.cc

Issue 1548153002: Switch to standard integer types in chrome/. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « chrome/test/chromedriver/test_util.h ('k') | chrome/test/chromedriver/util.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 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 #include "chrome/test/chromedriver/test_util.h" 5 #include "chrome/test/chromedriver/test_util.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "build/build_config.h"
9 10
10 RestoreKeyboardLayoutOnDestruct::RestoreKeyboardLayoutOnDestruct() { 11 RestoreKeyboardLayoutOnDestruct::RestoreKeyboardLayoutOnDestruct() {
11 #if defined(OS_WIN) 12 #if defined(OS_WIN)
12 layout_ = GetKeyboardLayout(NULL); 13 layout_ = GetKeyboardLayout(NULL);
13 #elif defined(OS_MACOSX) 14 #elif defined(OS_MACOSX)
14 layout_.reset(TISCopyCurrentKeyboardInputSource()); 15 layout_.reset(TISCopyCurrentKeyboardInputSource());
15 #elif defined(OS_LINUX) 16 #elif defined(OS_LINUX)
16 NOTIMPLEMENTED(); 17 NOTIMPLEMENTED();
17 #endif 18 #endif
18 } 19 }
(...skipping 30 matching lines...) Expand all
49 CFDictionaryAddValue(filter_dict, kTISPropertyInputSourceID, id_ref); 50 CFDictionaryAddValue(filter_dict, kTISPropertyInputSourceID, id_ref);
50 base::ScopedCFTypeRef<CFArrayRef> sources( 51 base::ScopedCFTypeRef<CFArrayRef> sources(
51 TISCreateInputSourceList(filter_dict, true)); 52 TISCreateInputSourceList(filter_dict, true));
52 if (CFArrayGetCount(sources) != 1) 53 if (CFArrayGetCount(sources) != 1)
53 return false; 54 return false;
54 TISInputSourceRef source = (TISInputSourceRef)CFArrayGetValueAtIndex( 55 TISInputSourceRef source = (TISInputSourceRef)CFArrayGetValueAtIndex(
55 sources, 0); 56 sources, 0);
56 return TISSelectInputSource(source) == noErr; 57 return TISSelectInputSource(source) == noErr;
57 } 58 }
58 #endif // defined(OS_MACOSX) 59 #endif // defined(OS_MACOSX)
OLDNEW
« no previous file with comments | « chrome/test/chromedriver/test_util.h ('k') | chrome/test/chromedriver/util.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698