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

Side by Side Diff: content/renderer/pepper/pepper_plugin_delegate_impl.cc

Issue 10391101: Test for Pepper IME events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 8 years, 7 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
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 "content/renderer/pepper/pepper_plugin_delegate_impl.h" 5 #include "content/renderer/pepper/pepper_plugin_delegate_impl.h"
6 6
7 #include <cmath> 7 #include <cmath>
8 #include <cstddef> 8 #include <cstddef>
9 #include <map> 9 #include <map>
10 #include <queue> 10 #include <queue>
(...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after
421 if (focused_plugin_ == instance && render_view_) 421 if (focused_plugin_ == instance && render_view_)
422 render_view_->PpapiPluginCancelComposition(); 422 render_view_->PpapiPluginCancelComposition();
423 } 423 }
424 424
425 void PepperPluginDelegateImpl::PluginSelectionChanged( 425 void PepperPluginDelegateImpl::PluginSelectionChanged(
426 webkit::ppapi::PluginInstance* instance) { 426 webkit::ppapi::PluginInstance* instance) {
427 if (focused_plugin_ == instance && render_view_) 427 if (focused_plugin_ == instance && render_view_)
428 render_view_->PpapiPluginSelectionChanged(); 428 render_view_->PpapiPluginSelectionChanged();
429 } 429 }
430 430
431 void PepperPluginDelegateImpl::SimulateImeSetComposition(
432 const string16& text,
433 const std::vector<WebKit::WebCompositionUnderline>& underlines,
434 int selection_start,
435 int selection_end) {
436 if (render_view_)
yzshen1 2012/05/15 18:03:48 nit: {} for multiple-line body.
kinaba 2012/05/16 10:13:57 Done.
437 render_view_->SimulateImeSetComposition(
438 text, underlines, selection_start, selection_end);
439 }
440
441 void PepperPluginDelegateImpl::SimulateImeConfirmComposition(
442 const string16& text) {
443 if (render_view_)
444 render_view_->SimulateImeConfirmComposition(text, ui::Range());
445 }
446
431 void PepperPluginDelegateImpl::OnImeSetComposition( 447 void PepperPluginDelegateImpl::OnImeSetComposition(
432 const string16& text, 448 const string16& text,
433 const std::vector<WebKit::WebCompositionUnderline>& underlines, 449 const std::vector<WebKit::WebCompositionUnderline>& underlines,
434 int selection_start, 450 int selection_start,
435 int selection_end) { 451 int selection_end) {
436 if (!IsPluginAcceptingCompositionEvents()) { 452 if (!IsPluginAcceptingCompositionEvents()) {
437 composition_text_ = text; 453 composition_text_ = text;
438 } else { 454 } else {
439 // TODO(kinaba) currently all composition events are sent directly to 455 // TODO(kinaba) currently all composition events are sent directly to
440 // plugins. Use DOM event mechanism after WebKit is made aware about 456 // plugins. Use DOM event mechanism after WebKit is made aware about
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1623 mouse_lock_instances_.erase(it); 1639 mouse_lock_instances_.erase(it);
1624 } 1640 }
1625 } 1641 }
1626 1642
1627 webkit_glue::ClipboardClient* 1643 webkit_glue::ClipboardClient*
1628 PepperPluginDelegateImpl::CreateClipboardClient() const { 1644 PepperPluginDelegateImpl::CreateClipboardClient() const {
1629 return new RendererClipboardClient; 1645 return new RendererClipboardClient;
1630 } 1646 }
1631 1647
1632 } // namespace content 1648 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698