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

Side by Side Diff: content/browser/renderer_host/render_widget_host_view_guest.cc

Issue 103403006: Implement Input Method related WebPlugin interface for browser plugin (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fsamuel's review fix 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 "base/bind_helpers.h" 5 #include "base/bind_helpers.h"
6 #include "base/command_line.h" 6 #include "base/command_line.h"
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "content/browser/browser_plugin/browser_plugin_guest.h" 9 #include "content/browser/browser_plugin/browser_plugin_guest.h"
10 #include "content/browser/renderer_host/render_view_host_impl.h" 10 #include "content/browser/renderer_host/render_view_host_impl.h"
(...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after
294 } 294 }
295 295
296 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) { 296 void RenderWidgetHostViewGuest::SetIsLoading(bool is_loading) {
297 platform_view_->SetIsLoading(is_loading); 297 platform_view_->SetIsLoading(is_loading);
298 } 298 }
299 299
300 void RenderWidgetHostViewGuest::TextInputTypeChanged( 300 void RenderWidgetHostViewGuest::TextInputTypeChanged(
301 ui::TextInputType type, 301 ui::TextInputType type,
302 ui::TextInputMode input_mode, 302 ui::TextInputMode input_mode,
303 bool can_compose_inline) { 303 bool can_compose_inline) {
304 // Forward the information to embedding RWHV.
304 RenderWidgetHostViewPort::FromRWHV( 305 RenderWidgetHostViewPort::FromRWHV(
305 guest_->GetEmbedderRenderWidgetHostView())-> 306 guest_->GetEmbedderRenderWidgetHostView())->
306 TextInputTypeChanged(type, input_mode, can_compose_inline); 307 TextInputTypeChanged(type, input_mode, can_compose_inline);
307 } 308 }
308 309
309 void RenderWidgetHostViewGuest::ImeCancelComposition() { 310 void RenderWidgetHostViewGuest::ImeCancelComposition() {
310 platform_view_->ImeCancelComposition(); 311 platform_view_->ImeCancelComposition();
311 } 312 }
312 313
313 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA) 314 #if defined(OS_MACOSX) || defined(OS_WIN) || defined(USE_AURA)
(...skipping 12 matching lines...) Expand all
326 } 327 }
327 328
328 void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text, 329 void RenderWidgetHostViewGuest::SelectionChanged(const base::string16& text,
329 size_t offset, 330 size_t offset,
330 const gfx::Range& range) { 331 const gfx::Range& range) {
331 platform_view_->SelectionChanged(text, offset, range); 332 platform_view_->SelectionChanged(text, offset, range);
332 } 333 }
333 334
334 void RenderWidgetHostViewGuest::SelectionBoundsChanged( 335 void RenderWidgetHostViewGuest::SelectionBoundsChanged(
335 const ViewHostMsg_SelectionBounds_Params& params) { 336 const ViewHostMsg_SelectionBounds_Params& params) {
336 platform_view_->SelectionBoundsChanged(params); 337 RenderWidgetHostViewPort* rwhv = static_cast<RenderWidgetHostViewPort*>(
338 guest_->GetEmbedderRenderWidgetHostView());
339 if (rwhv) {
Fady Samuel 2013/12/11 01:38:06 Early exit preferred: if (!rwhv) return;
kochi 2013/12/11 04:05:07 Done.
340 ViewHostMsg_SelectionBounds_Params guest_params(params);
341 guest_params.anchor_rect = guest_->ToGuestRect(params.anchor_rect);
342 guest_params.focus_rect = guest_->ToGuestRect(params.focus_rect);
343 rwhv->SelectionBoundsChanged(guest_params);
344 }
337 } 345 }
338 346
339 void RenderWidgetHostViewGuest::ScrollOffsetChanged() { 347 void RenderWidgetHostViewGuest::ScrollOffsetChanged() {
340 } 348 }
341 349
342 BackingStore* RenderWidgetHostViewGuest::AllocBackingStore( 350 BackingStore* RenderWidgetHostViewGuest::AllocBackingStore(
343 const gfx::Size& size) { 351 const gfx::Size& size) {
344 NOTREACHED(); 352 NOTREACHED();
345 return NULL; 353 return NULL;
346 } 354 }
(...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after
589 return; 597 return;
590 for (ui::GestureRecognizer::Gestures::iterator g_it = gestures->begin(); 598 for (ui::GestureRecognizer::Gestures::iterator g_it = gestures->begin();
591 g_it != gestures->end(); 599 g_it != gestures->end();
592 ++g_it) { 600 ++g_it) {
593 ForwardGestureEventToRenderer(*g_it); 601 ForwardGestureEventToRenderer(*g_it);
594 } 602 }
595 } 603 }
596 604
597 605
598 } // namespace content 606 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_impl.cc ('k') | content/common/browser_plugin/browser_plugin_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698