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

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: . 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 <algorithm> 7 #include <algorithm>
8 #include <cstring> 8 #include <cstring>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 } 125 }
126 ProcessUnfilteredKeyPressEvent(event); 126 ProcessUnfilteredKeyPressEvent(event);
127 } else { 127 } else {
128 DispatchKeyEventPostIME(event); 128 DispatchKeyEventPostIME(event);
129 } 129 }
130 return true; 130 return true;
131 } 131 }
132 132
133 pending_key_events_.insert(current_keyevent_id_); 133 pending_key_events_.insert(current_keyevent_id_);
134 134
135 ui::KeyEvent* copied_event = event.Copy(); 135 ui::KeyEvent* copied_event = new ui::KeyEvent(event);
136 GetEngine()->ProcessKeyEvent( 136 GetEngine()->ProcessKeyEvent(
137 event, 137 event,
138 base::Bind(&InputMethodIBus::ProcessKeyEventDone, 138 base::Bind(&InputMethodIBus::ProcessKeyEventDone,
139 weak_ptr_factory_.GetWeakPtr(), 139 weak_ptr_factory_.GetWeakPtr(),
140 current_keyevent_id_, 140 current_keyevent_id_,
141 // Pass the ownership of |copied_event|. 141 // Pass the ownership of |copied_event|.
142 base::Owned(copied_event))); 142 base::Owned(copied_event)));
143 143
144 ++current_keyevent_id_; 144 ++current_keyevent_id_;
145 145
(...skipping 510 matching lines...) Expand 10 before | Expand all | Expand 10 after
656 } 656 }
657 657
658 // Use a black thin underline by default. 658 // Use a black thin underline by default.
659 if (out_composition->underlines.empty()) { 659 if (out_composition->underlines.empty()) {
660 out_composition->underlines.push_back(CompositionUnderline( 660 out_composition->underlines.push_back(CompositionUnderline(
661 0, length, SK_ColorBLACK, false /* thick */)); 661 0, length, SK_ColorBLACK, false /* thick */));
662 } 662 }
663 } 663 }
664 664
665 } // namespace ui 665 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698