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/browser/renderer_host/render_widget_host.h" | 5 #include "chrome/browser/renderer_host/render_widget_host.h" |
6 | 6 |
7 #include "base/gfx/native_widget_types.h" | 7 #include "base/gfx/native_widget_types.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "chrome/browser/renderer_host/backing_store.h" | 9 #include "chrome/browser/renderer_host/backing_store.h" |
10 #include "chrome/browser/renderer_host/render_process_host.h" | 10 #include "chrome/browser/renderer_host/render_process_host.h" |
11 #include "chrome/browser/renderer_host/render_widget_helper.h" | 11 #include "chrome/browser/renderer_host/render_widget_helper.h" |
12 #include "chrome/browser/renderer_host/render_widget_host_view.h" | 12 #include "chrome/browser/renderer_host/render_widget_host_view.h" |
13 #include "chrome/common/notification_service.h" | 13 #include "chrome/common/notification_service.h" |
| 14 #include "chrome/common/render_messages.h" |
14 #include "chrome/views/view.h" | 15 #include "chrome/views/view.h" |
15 #include "webkit/glue/webcursor.h" | 16 #include "webkit/glue/webcursor.h" |
16 #include "webkit/glue/webinputevent.h" | 17 #include "webkit/glue/webinputevent.h" |
17 | 18 |
18 #if defined(OS_WIN) | 19 #if defined(OS_WIN) |
19 #include "base/gfx/gdi_util.h" | 20 #include "base/gfx/gdi_util.h" |
20 #include "chrome/app/chrome_dll_resource.h" | 21 #include "chrome/app/chrome_dll_resource.h" |
21 #include "chrome/common/win_util.h" | 22 #include "chrome/common/win_util.h" |
22 #endif // defined(OS_WIN) | 23 #endif // defined(OS_WIN) |
23 | 24 |
(...skipping 518 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 } | 543 } |
543 } | 544 } |
544 | 545 |
545 void RenderWidgetHost::OnMsgSetCursor(const WebCursor& cursor) { | 546 void RenderWidgetHost::OnMsgSetCursor(const WebCursor& cursor) { |
546 if (!view_) { | 547 if (!view_) { |
547 return; | 548 return; |
548 } | 549 } |
549 view_->UpdateCursor(cursor); | 550 view_->UpdateCursor(cursor); |
550 } | 551 } |
551 | 552 |
552 void RenderWidgetHost::OnMsgImeUpdateStatus(ViewHostMsg_ImeControl control, | 553 void RenderWidgetHost::OnMsgImeUpdateStatus(int control, |
553 const gfx::Rect& caret_rect) { | 554 const gfx::Rect& caret_rect) { |
554 if (view_) { | 555 if (view_) { |
555 view_->IMEUpdateStatus(control, caret_rect); | 556 view_->IMEUpdateStatus(control, caret_rect); |
556 } | 557 } |
557 } | 558 } |
558 | 559 |
559 void RenderWidgetHost::PaintBackingStoreRect(BitmapWireData bitmap, | 560 void RenderWidgetHost::PaintBackingStoreRect(BitmapWireData bitmap, |
560 const gfx::Rect& bitmap_rect, | 561 const gfx::Rect& bitmap_rect, |
561 const gfx::Size& view_size) { | 562 const gfx::Size& view_size) { |
562 if (is_hidden_) { | 563 if (is_hidden_) { |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
600 | 601 |
601 // TODO(darin): do we need to do something else if our backing store is not | 602 // TODO(darin): do we need to do something else if our backing store is not |
602 // the same size as the advertised view? maybe we just assume there is a | 603 // the same size as the advertised view? maybe we just assume there is a |
603 // full paint on its way? | 604 // full paint on its way? |
604 BackingStore* backing_store = BackingStoreManager::Lookup(this); | 605 BackingStore* backing_store = BackingStoreManager::Lookup(this); |
605 if (!backing_store || (backing_store->size() != view_size)) | 606 if (!backing_store || (backing_store->size() != view_size)) |
606 return; | 607 return; |
607 backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect, | 608 backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect, |
608 dx, dy, clip_rect, view_size); | 609 dx, dy, clip_rect, view_size); |
609 } | 610 } |
OLD | NEW |