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

Side by Side Diff: ui/base/ime/remote_input_method_win.cc

Issue 1507413003: clang/win: Let some chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: content_browsertests Created 5 years 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 | « sandbox/win/src/win_utils_unittest.cc ('k') | ui/native_theme/native_theme_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
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 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 "ui/base/ime/remote_input_method_win.h" 5 #include "ui/base/ime/remote_input_method_win.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/observer_list.h" 8 #include "base/observer_list.h"
9 #include "base/strings/utf_string_conversions.h" 9 #include "base/strings/utf_string_conversions.h"
10 #include "base/win/metro.h" 10 #include "base/win/metro.h"
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
53 g_private_interface_ = NULL; 53 g_private_interface_ = NULL;
54 } 54 }
55 } 55 }
56 56
57 std::string GetLocaleString(LCID Locale_id, LCTYPE locale_type) { 57 std::string GetLocaleString(LCID Locale_id, LCTYPE locale_type) {
58 wchar_t buffer[16] = {}; 58 wchar_t buffer[16] = {};
59 59
60 //|chars_written| includes NUL terminator. 60 //|chars_written| includes NUL terminator.
61 const int chars_written = 61 const int chars_written =
62 GetLocaleInfo(Locale_id, locale_type, buffer, arraysize(buffer)); 62 GetLocaleInfo(Locale_id, locale_type, buffer, arraysize(buffer));
63 if (chars_written <= 1 || arraysize(buffer) < chars_written) 63 if (chars_written <= 1 || static_cast<int>(arraysize(buffer)) < chars_written)
64 return std::string(); 64 return std::string();
65 std::string result; 65 std::string result;
66 base::WideToUTF8(buffer, chars_written - 1, &result); 66 base::WideToUTF8(buffer, chars_written - 1, &result);
67 return result; 67 return result;
68 } 68 }
69 69
70 std::vector<int32> GetInputScopesAsInt(TextInputType text_input_type, 70 std::vector<int32> GetInputScopesAsInt(TextInputType text_input_type,
71 TextInputMode text_input_mode) { 71 TextInputMode text_input_mode) {
72 std::vector<int32> result; 72 std::vector<int32> result;
73 // An empty vector represents |text_input_type| is TEXT_INPUT_TYPE_NONE. 73 // An empty vector represents |text_input_type| is TEXT_INPUT_TYPE_NONE.
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after
374 return make_scoped_ptr(new RemoteInputMethodWin(delegate)); 374 return make_scoped_ptr(new RemoteInputMethodWin(delegate));
375 } 375 }
376 376
377 // static 377 // static
378 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get( 378 RemoteInputMethodPrivateWin* RemoteInputMethodPrivateWin::Get(
379 InputMethod* input_method) { 379 InputMethod* input_method) {
380 return GetPrivate(input_method); 380 return GetPrivate(input_method);
381 } 381 }
382 382
383 } // namespace ui 383 } // namespace ui
OLDNEW
« no previous file with comments | « sandbox/win/src/win_utils_unittest.cc ('k') | ui/native_theme/native_theme_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698