diff options
Diffstat (limited to 'chrome/browser/renderer_host/render_widget_host.cc')
-rw-r--r-- | chrome/browser/renderer_host/render_widget_host.cc | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/chrome/browser/renderer_host/render_widget_host.cc b/chrome/browser/renderer_host/render_widget_host.cc index 83d7bcf..b761d42 100644 --- a/chrome/browser/renderer_host/render_widget_host.cc +++ b/chrome/browser/renderer_host/render_widget_host.cc @@ -17,6 +17,7 @@ #include "chrome/views/view.h" #include "webkit/glue/webcursor.h" #include "webkit/glue/webinputevent.h" +#include "webkit/glue/webtextdirection.h" #if defined(OS_WIN) #include "base/gfx/gdi_util.h" @@ -53,7 +54,9 @@ RenderWidgetHost::RenderWidgetHost(RenderProcessHost* process, mouse_move_pending_(false), needs_repainting_on_restore_(false), is_unresponsive_(false), - view_being_painted_(false) { + view_being_painted_(false), + text_direction_updated_(false), + text_direction_(WEB_TEXT_DIRECTION_LTR) { if (routing_id_ == MSG_ROUTING_NONE) routing_id_ = process_->GetNextRoutingID(); @@ -352,6 +355,19 @@ void RenderWidgetHost::RendererExited() { BackingStoreManager::RemoveBackingStore(this); } +void RenderWidgetHost::UpdateTextDirection(WebTextDirection direction) { + text_direction_updated_ = true; + text_direction_ = direction; +} + +void RenderWidgetHost::NotifyTextDirection() { + if (text_direction_updated_) { + text_direction_updated_ = false; + Send(new ViewMsg_SetTextDirection(routing_id(), + static_cast<int>(text_direction_))); + } +} + gfx::Rect RenderWidgetHost::GetRootWindowResizerRect() const { return gfx::Rect(); } |