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

Side by Side Diff: chrome/renderer/render_widget.cc

Issue 39252: A tricky fix for Issue 1845.... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 11 years, 9 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
« no previous file with comments | « chrome/renderer/render_widget.h ('k') | webkit/glue/webtextdirection.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 "chrome/renderer/render_widget.h" 5 #include "chrome/renderer/render_widget.h"
6 6
7 #include "base/gfx/point.h" 7 #include "base/gfx/point.h"
8 #include "base/gfx/size.h" 8 #include "base/gfx/size.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden) 112 IPC_MESSAGE_HANDLER(ViewMsg_WasHidden, OnWasHidden)
113 IPC_MESSAGE_HANDLER(ViewMsg_WasRestored, OnWasRestored) 113 IPC_MESSAGE_HANDLER(ViewMsg_WasRestored, OnWasRestored)
114 IPC_MESSAGE_HANDLER(ViewMsg_PaintRect_ACK, OnPaintRectAck) 114 IPC_MESSAGE_HANDLER(ViewMsg_PaintRect_ACK, OnPaintRectAck)
115 IPC_MESSAGE_HANDLER(ViewMsg_ScrollRect_ACK, OnScrollRectAck) 115 IPC_MESSAGE_HANDLER(ViewMsg_ScrollRect_ACK, OnScrollRectAck)
116 IPC_MESSAGE_HANDLER(ViewMsg_HandleInputEvent, OnHandleInputEvent) 116 IPC_MESSAGE_HANDLER(ViewMsg_HandleInputEvent, OnHandleInputEvent)
117 IPC_MESSAGE_HANDLER(ViewMsg_MouseCaptureLost, OnMouseCaptureLost) 117 IPC_MESSAGE_HANDLER(ViewMsg_MouseCaptureLost, OnMouseCaptureLost)
118 IPC_MESSAGE_HANDLER(ViewMsg_SetFocus, OnSetFocus) 118 IPC_MESSAGE_HANDLER(ViewMsg_SetFocus, OnSetFocus)
119 IPC_MESSAGE_HANDLER(ViewMsg_ImeSetInputMode, OnImeSetInputMode) 119 IPC_MESSAGE_HANDLER(ViewMsg_ImeSetInputMode, OnImeSetInputMode)
120 IPC_MESSAGE_HANDLER(ViewMsg_ImeSetComposition, OnImeSetComposition) 120 IPC_MESSAGE_HANDLER(ViewMsg_ImeSetComposition, OnImeSetComposition)
121 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnMsgRepaint) 121 IPC_MESSAGE_HANDLER(ViewMsg_Repaint, OnMsgRepaint)
122 IPC_MESSAGE_HANDLER(ViewMsg_SetTextDirection, OnSetTextDirection)
122 IPC_MESSAGE_UNHANDLED_ERROR() 123 IPC_MESSAGE_UNHANDLED_ERROR()
123 IPC_END_MESSAGE_MAP() 124 IPC_END_MESSAGE_MAP()
124 125
125 bool RenderWidget::Send(IPC::Message* message) { 126 bool RenderWidget::Send(IPC::Message* message) {
126 // Don't send any messages after the browser has told us to close. 127 // Don't send any messages after the browser has told us to close.
127 if (closing_) { 128 if (closing_) {
128 delete message; 129 delete message;
129 return false; 130 return false;
130 } 131 }
131 132
(...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after
628 void RenderWidget::OnMsgRepaint(const gfx::Size& size_to_paint) { 629 void RenderWidget::OnMsgRepaint(const gfx::Size& size_to_paint) {
629 // During shutdown we can just ignore this message. 630 // During shutdown we can just ignore this message.
630 if (!webwidget_) 631 if (!webwidget_)
631 return; 632 return;
632 633
633 set_next_paint_is_repaint_ack(); 634 set_next_paint_is_repaint_ack();
634 gfx::Rect repaint_rect(size_to_paint.width(), size_to_paint.height()); 635 gfx::Rect repaint_rect(size_to_paint.width(), size_to_paint.height());
635 DidInvalidateRect(webwidget_, repaint_rect); 636 DidInvalidateRect(webwidget_, repaint_rect);
636 } 637 }
637 638
639 void RenderWidget::OnSetTextDirection(WebTextDirection direction) {
640 if (!webwidget_)
641 return;
642
643 webwidget_->SetTextDirection(direction);
644 }
645
638 bool RenderWidget::next_paint_is_resize_ack() const { 646 bool RenderWidget::next_paint_is_resize_ack() const {
639 return ViewHostMsg_PaintRect_Flags::is_resize_ack(next_paint_flags_); 647 return ViewHostMsg_PaintRect_Flags::is_resize_ack(next_paint_flags_);
640 } 648 }
641 649
642 bool RenderWidget::next_paint_is_restore_ack() const { 650 bool RenderWidget::next_paint_is_restore_ack() const {
643 return ViewHostMsg_PaintRect_Flags::is_restore_ack(next_paint_flags_); 651 return ViewHostMsg_PaintRect_Flags::is_restore_ack(next_paint_flags_);
644 } 652 }
645 653
646 void RenderWidget::set_next_paint_is_resize_ack() { 654 void RenderWidget::set_next_paint_is_resize_ack() {
647 next_paint_flags_ |= ViewHostMsg_PaintRect_Flags::IS_RESIZE_ACK; 655 next_paint_flags_ |= ViewHostMsg_PaintRect_Flags::IS_RESIZE_ACK;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
732 for (; i < plugin_window_moves_.size(); ++i) { 740 for (; i < plugin_window_moves_.size(); ++i) {
733 if (plugin_window_moves_[i].window == move.window) { 741 if (plugin_window_moves_[i].window == move.window) {
734 plugin_window_moves_[i] = move; 742 plugin_window_moves_[i] = move;
735 break; 743 break;
736 } 744 }
737 } 745 }
738 746
739 if (i == plugin_window_moves_.size()) 747 if (i == plugin_window_moves_.size())
740 plugin_window_moves_.push_back(move); 748 plugin_window_moves_.push_back(move);
741 } 749 }
OLDNEW
« no previous file with comments | « chrome/renderer/render_widget.h ('k') | webkit/glue/webtextdirection.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698