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

Side by Side Diff: content/renderer/render_frame_impl.cc

Issue 2621303004: Keep track of coalesced events in main thread event queue (Closed)
Patch Set: Rebase Created 3 years, 11 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
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 "content/renderer/render_frame_impl.h" 5 #include "content/renderer/render_frame_impl.h"
6 6
7 #include <map> 7 #include <map>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 6634 matching lines...) Expand 10 before | Expand all | Expand 10 after
6645 char_event.windowsKeyCode = text[i]; 6645 char_event.windowsKeyCode = text[i];
6646 char_event.nativeKeyCode = text[i]; 6646 char_event.nativeKeyCode = text[i];
6647 6647
6648 const int32_t char_start = i; 6648 const int32_t char_start = i;
6649 for (; i < iterator.array_pos(); ++i) { 6649 for (; i < iterator.array_pos(); ++i) {
6650 char_event.text[i - char_start] = text[i]; 6650 char_event.text[i - char_start] = text[i];
6651 char_event.unmodifiedText[i - char_start] = text[i]; 6651 char_event.unmodifiedText[i - char_start] = text[i];
6652 } 6652 }
6653 6653
6654 if (GetRenderWidget()->GetWebWidget()) 6654 if (GetRenderWidget()->GetWebWidget())
6655 GetRenderWidget()->GetWebWidget()->handleInputEvent(char_event); 6655 GetRenderWidget()->GetWebWidget()->handleInputEvent(
6656 blink::WebCoalescedInputEvent(char_event));
6656 } 6657 }
6657 } else { 6658 } else {
6658 // Mimics the order of events sent by WebKit. 6659 // Mimics the order of events sent by WebKit.
6659 // See WebCore::Editor::setComposition() for the corresponding code. 6660 // See WebCore::Editor::setComposition() for the corresponding code.
6660 focused_pepper_plugin_->HandleCompositionEnd(text); 6661 focused_pepper_plugin_->HandleCompositionEnd(text);
6661 focused_pepper_plugin_->HandleTextInput(text); 6662 focused_pepper_plugin_->HandleTextInput(text);
6662 } 6663 }
6663 pepper_composition_text_.clear(); 6664 pepper_composition_text_.clear();
6664 } 6665 }
6665 #endif // ENABLE_PLUGINS 6666 #endif // ENABLE_PLUGINS
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
6879 // event target. Potentially a Pepper plugin will receive the event. 6880 // event target. Potentially a Pepper plugin will receive the event.
6880 // In order to tell whether a plugin gets the last mouse event and which it 6881 // In order to tell whether a plugin gets the last mouse event and which it
6881 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets 6882 // is, we set |pepper_last_mouse_event_target_| to null here. If a plugin gets
6882 // the event, it will notify us via DidReceiveMouseEvent() and set itself as 6883 // the event, it will notify us via DidReceiveMouseEvent() and set itself as
6883 // |pepper_last_mouse_event_target_|. 6884 // |pepper_last_mouse_event_target_|.
6884 pepper_last_mouse_event_target_ = nullptr; 6885 pepper_last_mouse_event_target_ = nullptr;
6885 #endif 6886 #endif
6886 } 6887 }
6887 6888
6888 } // namespace content 6889 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_instance_impl.cc ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698