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/gdi_util.h" | 7 #include "base/gfx/gdi_util.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "chrome/app/chrome_dll_resource.h" | 9 #include "chrome/app/chrome_dll_resource.h" |
10 #include "chrome/browser/renderer_host/backing_store.h" | 10 #include "chrome/browser/renderer_host/backing_store.h" |
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 BackingStoreManager::RemoveBackingStore(this); | 61 BackingStoreManager::RemoveBackingStore(this); |
62 | 62 |
63 process_->Release(routing_id_); | 63 process_->Release(routing_id_); |
64 } | 64 } |
65 | 65 |
66 void RenderWidgetHost::Init() { | 66 void RenderWidgetHost::Init() { |
67 DCHECK(process_->channel()); | 67 DCHECK(process_->channel()); |
68 | 68 |
69 // Send the ack along with the information on placement. | 69 // Send the ack along with the information on placement. |
70 HWND plugin_hwnd = view_->GetPluginHWND(); | 70 HWND plugin_hwnd = view_->GetPluginHWND(); |
71 Send(new ViewMsg_CreatingNew_ACK(routing_id_, plugin_hwnd)); | 71 Send(new ViewMsg_CreatingNew_ACK(routing_id_, |
| 72 gfx::IdFromNativeView(plugin_hwnd))); |
72 | 73 |
73 WasResized(); | 74 WasResized(); |
74 } | 75 } |
75 | 76 |
76 void RenderWidgetHost::Shutdown() { | 77 void RenderWidgetHost::Shutdown() { |
77 if (process_->channel()) { | 78 if (process_->channel()) { |
78 // Tell the renderer object to close. | 79 // Tell the renderer object to close. |
79 process_->ReportExpectingClose(routing_id_); | 80 process_->ReportExpectingClose(routing_id_); |
80 bool rv = Send(new ViewMsg_Close(routing_id_)); | 81 bool rv = Send(new ViewMsg_Close(routing_id_)); |
81 DCHECK(rv); | 82 DCHECK(rv); |
(...skipping 508 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 | 591 |
591 // TODO(darin): do we need to do something else if our backing store is not | 592 // TODO(darin): do we need to do something else if our backing store is not |
592 // the same size as the advertised view? maybe we just assume there is a | 593 // the same size as the advertised view? maybe we just assume there is a |
593 // full paint on its way? | 594 // full paint on its way? |
594 BackingStore* backing_store = BackingStoreManager::Lookup(this); | 595 BackingStore* backing_store = BackingStoreManager::Lookup(this); |
595 if (!backing_store || (backing_store->size() != view_size)) | 596 if (!backing_store || (backing_store->size() != view_size)) |
596 return; | 597 return; |
597 backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect, | 598 backing_store->ScrollRect(process_->process().handle(), bitmap, bitmap_rect, |
598 dx, dy, clip_rect, view_size); | 599 dx, dy, clip_rect, view_size); |
599 } | 600 } |
OLD | NEW |