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

Side by Side Diff: ui/base/ime/win/tsf_input_scope.cc

Issue 2230183002: ui: Use stl utilities from the base namespace (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 4 years, 4 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 | « ui/base/clipboard/clipboard_android.cc ('k') | ui/base/l10n/l10n_util_unittest.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) 2012 The Chromium Authors. All rights reserved. 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 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/win/tsf_input_scope.h" 5 #include "ui/base/ime/win/tsf_input_scope.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "base/message_loop/message_loop.h" 12 #include "base/message_loop/message_loop.h"
13 #include "base/stl_util.h" 13 #include "base/stl_util.h"
14 #include "base/win/windows_version.h" 14 #include "base/win/windows_version.h"
15 15
16 namespace ui { 16 namespace ui {
17 namespace tsf_inputscope { 17 namespace tsf_inputscope {
18 namespace { 18 namespace {
19 19
20 void AppendNonTrivialInputScope(std::vector<InputScope>* input_scopes, 20 void AppendNonTrivialInputScope(std::vector<InputScope>* input_scopes,
21 InputScope input_scope) { 21 InputScope input_scope) {
22 DCHECK(input_scopes); 22 DCHECK(input_scopes);
23 23
24 if (input_scope == IS_DEFAULT) 24 if (input_scope == IS_DEFAULT)
25 return; 25 return;
26 26
27 if (ContainsValue(*input_scopes, input_scope)) 27 if (base::ContainsValue(*input_scopes, input_scope))
28 return; 28 return;
29 29
30 input_scopes->push_back(input_scope); 30 input_scopes->push_back(input_scope);
31 } 31 }
32 32
33 class TSFInputScope final : public ITfInputScope { 33 class TSFInputScope final : public ITfInputScope {
34 public: 34 public:
35 explicit TSFInputScope(const std::vector<InputScope>& input_scopes) 35 explicit TSFInputScope(const std::vector<InputScope>& input_scopes)
36 : input_scopes_(input_scopes), 36 : input_scopes_(input_scopes),
37 ref_count_(0) {} 37 ref_count_(0) {}
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
205 return; 205 return;
206 206
207 std::vector<InputScope> input_scopes = GetInputScopes(text_input_type, 207 std::vector<InputScope> input_scopes = GetInputScopes(text_input_type,
208 text_input_mode); 208 text_input_mode);
209 g_set_input_scopes(window_handle, &input_scopes[0], input_scopes.size(), 209 g_set_input_scopes(window_handle, &input_scopes[0], input_scopes.size(),
210 NULL, 0, NULL, NULL); 210 NULL, 0, NULL, NULL);
211 } 211 }
212 212
213 } // namespace tsf_inputscope 213 } // namespace tsf_inputscope
214 } // namespace ui 214 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/clipboard/clipboard_android.cc ('k') | ui/base/l10n/l10n_util_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698