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

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

Issue 97963002: events: Remove KeyEvent::Copy(). (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix-win Created 7 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 | Annotate | Revision Log
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/input_method_ibus.h" 5 #include "ui/base/ime/input_method_ibus.h"
6 6
7 #include <X11/X.h> 7 #include <X11/X.h>
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 #include <X11/Xutil.h> 9 #include <X11/Xutil.h>
10 #undef FocusIn 10 #undef FocusIn
(...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after
168 } 168 }
169 ProcessUnfilteredKeyPressEvent(event); 169 ProcessUnfilteredKeyPressEvent(event);
170 } else { 170 } else {
171 DispatchKeyEventPostIME(event); 171 DispatchKeyEventPostIME(event);
172 } 172 }
173 return true; 173 return true;
174 } 174 }
175 175
176 pending_key_events_.insert(current_keyevent_id_); 176 pending_key_events_.insert(current_keyevent_id_);
177 177
178 ui::KeyEvent* copied_event = event.Copy(); 178 ui::KeyEvent* copied_event = new ui::KeyEvent(event);
179 GetEngine()->ProcessKeyEvent( 179 GetEngine()->ProcessKeyEvent(
180 event, 180 event,
181 base::Bind(&InputMethodIBus::ProcessKeyEventDone, 181 base::Bind(&InputMethodIBus::ProcessKeyEventDone,
182 weak_ptr_factory_.GetWeakPtr(), 182 weak_ptr_factory_.GetWeakPtr(),
183 current_keyevent_id_, 183 current_keyevent_id_,
184 // Pass the ownership of |copied_event|. 184 // Pass the ownership of |copied_event|.
185 base::Owned(copied_event), 185 base::Owned(copied_event),
186 ibus_keyval, 186 ibus_keyval,
187 ibus_keycode, 187 ibus_keycode,
188 ibus_state)); 188 ibus_state));
(...skipping 582 matching lines...) Expand 10 before | Expand all | Expand 10 after
771 } 771 }
772 772
773 // Use a black thin underline by default. 773 // Use a black thin underline by default.
774 if (out_composition->underlines.empty()) { 774 if (out_composition->underlines.empty()) {
775 out_composition->underlines.push_back(CompositionUnderline( 775 out_composition->underlines.push_back(CompositionUnderline(
776 0, length, SK_ColorBLACK, false /* thick */)); 776 0, length, SK_ColorBLACK, false /* thick */));
777 } 777 }
778 } 778 }
779 779
780 } // namespace ui 780 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698