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

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

Issue 10917075: events: Move some files into ui/base/events/ (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 3 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
« no previous file with comments | « ui/base/gestures/gesture_types.h ('k') | ui/base/ime/character_composer_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/character_composer.h" 5 #include "ui/base/ime/character_composer.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <iterator> 8 #include <iterator>
9 9
10 #include "base/third_party/icu/icu_utf.h" 10 #include "base/third_party/icu/icu_utf.h"
11 #include "base/utf_string_conversions.h" 11 #include "base/utf_string_conversions.h"
12 // Note for Gtk removal: gdkkeysyms.h only contains a set of 12 // Note for Gtk removal: gdkkeysyms.h only contains a set of
13 // '#define GDK_KeyName 0xNNNN' macros and does not #include any Gtk headers. 13 // '#define GDK_KeyName 0xNNNN' macros and does not #include any Gtk headers.
14 #include "third_party/gtk+/gdk/gdkkeysyms.h" 14 #include "third_party/gtk+/gdk/gdkkeysyms.h"
15 #include "ui/base/events.h" 15 #include "ui/base/events/event_constants.h"
16 #include "ui/base/glib/glib_integers.h" 16 #include "ui/base/glib/glib_integers.h"
17 17
18 namespace { 18 namespace {
19 19
20 typedef std::vector<unsigned int> ComposeBufferType; 20 typedef std::vector<unsigned int> ComposeBufferType;
21 21
22 // An iterator class to apply std::lower_bound for composition table. 22 // An iterator class to apply std::lower_bound for composition table.
23 class SequenceIterator 23 class SequenceIterator
24 : public std::iterator<std::random_access_iterator_tag, const uint16*> { 24 : public std::iterator<std::random_access_iterator_tag, const uint16*> {
25 public: 25 public:
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after
492 std::string preedit_string_ascii("u"); 492 std::string preedit_string_ascii("u");
493 for (size_t i = 0; i != compose_buffer_.size(); ++i) { 493 for (size_t i = 0; i != compose_buffer_.size(); ++i) {
494 const int digit = compose_buffer_[i]; 494 const int digit = compose_buffer_[i];
495 DCHECK(0 <= digit && digit < 16); 495 DCHECK(0 <= digit && digit < 16);
496 preedit_string_ascii += digit <= 9 ? ('0' + digit) : ('a' + (digit - 10)); 496 preedit_string_ascii += digit <= 9 ? ('0' + digit) : ('a' + (digit - 10));
497 } 497 }
498 preedit_string_ = ASCIIToUTF16(preedit_string_ascii); 498 preedit_string_ = ASCIIToUTF16(preedit_string_ascii);
499 } 499 }
500 500
501 } // namespace ui 501 } // namespace ui
OLDNEW
« no previous file with comments | « ui/base/gestures/gesture_types.h ('k') | ui/base/ime/character_composer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698