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

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: Addressed comments from kochi & merge master. 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 411 matching lines...) Expand 10 before | Expand all | Expand 10 after
422 if (focused_plugin_ == instance && render_view_) 422 if (focused_plugin_ == instance && render_view_)
423 render_view_->PpapiPluginCancelComposition(); 423 render_view_->PpapiPluginCancelComposition();
424 } 424 }
425 425
426 void PepperPluginDelegateImpl::PluginSelectionChanged( 426 void PepperPluginDelegateImpl::PluginSelectionChanged(
427 webkit::ppapi::PluginInstance* instance) { 427 webkit::ppapi::PluginInstance* instance) {
428 if (focused_plugin_ == instance && render_view_) 428 if (focused_plugin_ == instance && render_view_)
429 render_view_->PpapiPluginSelectionChanged(); 429 render_view_->PpapiPluginSelectionChanged();
430 } 430 }
431 431
432 void PepperPluginDelegateImpl::SimulateImeSetComposition(
433 const string16& text,
434 const std::vector<WebKit::WebCompositionUnderline>& underlines,
435 int selection_start,
436 int selection_end) {
437 if (render_view_) {
438 render_view_->SimulateImeSetComposition(
439 text, underlines, selection_start, selection_end);
440 }
441 }
442
443 void PepperPluginDelegateImpl::SimulateImeConfirmComposition(
444 const string16& text) {
445 if (render_view_)
446 render_view_->SimulateImeConfirmComposition(text, ui::Range());
447 }
448
432 void PepperPluginDelegateImpl::OnImeSetComposition( 449 void PepperPluginDelegateImpl::OnImeSetComposition(
433 const string16& text, 450 const string16& text,
434 const std::vector<WebKit::WebCompositionUnderline>& underlines, 451 const std::vector<WebKit::WebCompositionUnderline>& underlines,
435 int selection_start, 452 int selection_start,
436 int selection_end) { 453 int selection_end) {
437 if (!IsPluginAcceptingCompositionEvents()) { 454 if (!IsPluginAcceptingCompositionEvents()) {
438 composition_text_ = text; 455 composition_text_ = text;
439 } else { 456 } else {
440 // TODO(kinaba) currently all composition events are sent directly to 457 // TODO(kinaba) currently all composition events are sent directly to
441 // plugins. Use DOM event mechanism after WebKit is made aware about 458 // plugins. Use DOM event mechanism after WebKit is made aware about
(...skipping 1185 matching lines...) Expand 10 before | Expand all | Expand 10 after
1627 mouse_lock_instances_.erase(it); 1644 mouse_lock_instances_.erase(it);
1628 } 1645 }
1629 } 1646 }
1630 1647
1631 webkit_glue::ClipboardClient* 1648 webkit_glue::ClipboardClient*
1632 PepperPluginDelegateImpl::CreateClipboardClient() const { 1649 PepperPluginDelegateImpl::CreateClipboardClient() const {
1633 return new RendererClipboardClient; 1650 return new RendererClipboardClient;
1634 } 1651 }
1635 1652
1636 } // namespace content 1653 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/pepper/pepper_plugin_delegate_impl.h ('k') | content/renderer/render_view_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698