| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 "app/surface/transport_dib.h" | 7 #include "app/surface/transport_dib.h" |
| 8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
| 9 #include "base/logging.h" | 9 #include "base/logging.h" |
| 10 #include "base/message_loop.h" | 10 #include "base/message_loop.h" |
| (...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 578 params.scroll_rect = gfx::Rect(); | 578 params.scroll_rect = gfx::Rect(); |
| 579 params.copy_rects.clear(); | 579 params.copy_rects.clear(); |
| 580 } else { | 580 } else { |
| 581 params.scroll_rect = update.scroll_rect; | 581 params.scroll_rect = update.scroll_rect; |
| 582 params.copy_rects.swap(copy_rects); // TODO(darin): clip to bounds? | 582 params.copy_rects.swap(copy_rects); // TODO(darin): clip to bounds? |
| 583 } | 583 } |
| 584 params.view_size = size_; | 584 params.view_size = size_; |
| 585 params.resizer_rect = resizer_rect_; | 585 params.resizer_rect = resizer_rect_; |
| 586 params.plugin_window_moves.swap(plugin_window_moves_); | 586 params.plugin_window_moves.swap(plugin_window_moves_); |
| 587 params.flags = next_paint_flags_; | 587 params.flags = next_paint_flags_; |
| 588 params.scroll_offset = GetScrollOffset(); |
| 588 | 589 |
| 589 update_reply_pending_ = true; | 590 update_reply_pending_ = true; |
| 590 Send(new ViewHostMsg_UpdateRect(routing_id_, params)); | 591 Send(new ViewHostMsg_UpdateRect(routing_id_, params)); |
| 591 next_paint_flags_ = 0; | 592 next_paint_flags_ = 0; |
| 592 | 593 |
| 593 UpdateInputMethod(); | 594 UpdateInputMethod(); |
| 594 | 595 |
| 595 // Let derived classes know we've painted. | 596 // Let derived classes know we've painted. |
| 596 DidInitiatePaint(); | 597 DidInitiatePaint(); |
| 597 } | 598 } |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 913 | 914 |
| 914 webkit::ppapi::PluginInstance* RenderWidget::GetBitmapForOptimizedPluginPaint( | 915 webkit::ppapi::PluginInstance* RenderWidget::GetBitmapForOptimizedPluginPaint( |
| 915 const gfx::Rect& paint_bounds, | 916 const gfx::Rect& paint_bounds, |
| 916 TransportDIB** dib, | 917 TransportDIB** dib, |
| 917 gfx::Rect* location, | 918 gfx::Rect* location, |
| 918 gfx::Rect* clip) { | 919 gfx::Rect* clip) { |
| 919 // Bare RenderWidgets don't support optimized plugin painting. | 920 // Bare RenderWidgets don't support optimized plugin painting. |
| 920 return NULL; | 921 return NULL; |
| 921 } | 922 } |
| 922 | 923 |
| 924 gfx::Size RenderWidget::GetScrollOffset() { |
| 925 // Bare RenderWidgets don't support scroll offset. |
| 926 return gfx::Size(0, 0); |
| 927 } |
| 928 |
| 923 void RenderWidget::SetHidden(bool hidden) { | 929 void RenderWidget::SetHidden(bool hidden) { |
| 924 if (is_hidden_ == hidden) | 930 if (is_hidden_ == hidden) |
| 925 return; | 931 return; |
| 926 | 932 |
| 927 // The status has changed. Tell the RenderThread about it. | 933 // The status has changed. Tell the RenderThread about it. |
| 928 is_hidden_ = hidden; | 934 is_hidden_ = hidden; |
| 929 if (is_hidden_) | 935 if (is_hidden_) |
| 930 render_thread_->WidgetHidden(); | 936 render_thread_->WidgetHidden(); |
| 931 else | 937 else |
| 932 render_thread_->WidgetRestored(); | 938 render_thread_->WidgetRestored(); |
| (...skipping 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1021 | 1027 |
| 1022 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { | 1028 void RenderWidget::CleanupWindowInPluginMoves(gfx::PluginWindowHandle window) { |
| 1023 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); | 1029 for (WebPluginGeometryVector::iterator i = plugin_window_moves_.begin(); |
| 1024 i != plugin_window_moves_.end(); ++i) { | 1030 i != plugin_window_moves_.end(); ++i) { |
| 1025 if (i->window == window) { | 1031 if (i->window == window) { |
| 1026 plugin_window_moves_.erase(i); | 1032 plugin_window_moves_.erase(i); |
| 1027 break; | 1033 break; |
| 1028 } | 1034 } |
| 1029 } | 1035 } |
| 1030 } | 1036 } |
| OLD | NEW |