OLD | NEW |
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 <windows.h> | 7 #include <windows.h> |
8 | 8 |
9 #include "base/gfx/point.h" | 9 #include "base/gfx/point.h" |
10 #include "base/gfx/size.h" | 10 #include "base/gfx/size.h" |
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
497 scroll_rect_ = gfx::Rect(); | 497 scroll_rect_ = gfx::Rect(); |
498 | 498 |
499 PaintRect(damaged_rect, current_scroll_buf_); | 499 PaintRect(damaged_rect, current_scroll_buf_); |
500 Send(new ViewHostMsg_ScrollRect(routing_id_, params)); | 500 Send(new ViewHostMsg_ScrollRect(routing_id_, params)); |
501 UpdateIME(); | 501 UpdateIME(); |
502 } | 502 } |
503 | 503 |
504 /////////////////////////////////////////////////////////////////////////////// | 504 /////////////////////////////////////////////////////////////////////////////// |
505 // WebWidgetDelegate | 505 // WebWidgetDelegate |
506 | 506 |
507 HWND RenderWidget::GetContainingWindow(WebWidget* webwidget) { | 507 gfx::NativeView RenderWidget::GetContainingView(WebWidget* webwidget) { |
508 return host_window_; | 508 return host_window_; |
509 } | 509 } |
510 | 510 |
511 void RenderWidget::DidInvalidateRect(WebWidget* webwidget, | 511 void RenderWidget::DidInvalidateRect(WebWidget* webwidget, |
512 const gfx::Rect& rect) { | 512 const gfx::Rect& rect) { |
513 // We only want one pending DoDeferredPaint call at any time... | 513 // We only want one pending DoDeferredPaint call at any time... |
514 bool paint_pending = !paint_rect_.IsEmpty(); | 514 bool paint_pending = !paint_rect_.IsEmpty(); |
515 | 515 |
516 // If this invalidate overlaps with a pending scroll, then we have to | 516 // If this invalidate overlaps with a pending scroll, then we have to |
517 // downgrade to invalidating the scroll rect. | 517 // downgrade to invalidating the scroll rect. |
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
770 for (; i < plugin_window_moves_.size(); ++i) { | 770 for (; i < plugin_window_moves_.size(); ++i) { |
771 if (plugin_window_moves_[i].window == move.window) { | 771 if (plugin_window_moves_[i].window == move.window) { |
772 plugin_window_moves_[i] = move; | 772 plugin_window_moves_[i] = move; |
773 break; | 773 break; |
774 } | 774 } |
775 } | 775 } |
776 | 776 |
777 if (i == plugin_window_moves_.size()) | 777 if (i == plugin_window_moves_.size()) |
778 plugin_window_moves_.push_back(move); | 778 plugin_window_moves_.push_back(move); |
779 } | 779 } |
OLD | NEW |