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