OLD | NEW |
1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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 "app/keyboard_codes.h" | 5 #include "app/keyboard_codes.h" |
6 #include "base/basictypes.h" | 6 #include "base/basictypes.h" |
7 #include "base/scoped_ptr.h" | 7 #include "base/scoped_ptr.h" |
8 #include "base/shared_memory.h" | 8 #include "base/shared_memory.h" |
9 #include "base/timer.h" | 9 #include "base/timer.h" |
10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
77 }; | 77 }; |
78 | 78 |
79 void RenderWidgetHostProcess::InitUpdateRectParams( | 79 void RenderWidgetHostProcess::InitUpdateRectParams( |
80 ViewHostMsg_UpdateRect_Params* params) { | 80 ViewHostMsg_UpdateRect_Params* params) { |
81 // Create the shared backing store. | 81 // Create the shared backing store. |
82 const int w = 100, h = 100; | 82 const int w = 100, h = 100; |
83 const size_t pixel_size = w * h * 4; | 83 const size_t pixel_size = w * h * 4; |
84 | 84 |
85 if (!current_update_buf_) | 85 if (!current_update_buf_) |
86 current_update_buf_ = TransportDIB::Create(pixel_size, 0); | 86 current_update_buf_ = TransportDIB::Create(pixel_size, 0); |
87 params->bitmap = current_update_buf_->id(); | 87 params->dib_id = current_update_buf_->id(); |
| 88 params->dib_handle = current_update_buf_->handle(); |
88 params->bitmap_rect = gfx::Rect(0, 0, w, h); | 89 params->bitmap_rect = gfx::Rect(0, 0, w, h); |
89 params->dx = 0; | 90 params->dx = 0; |
90 params->dy = 0; | 91 params->dy = 0; |
91 params->copy_rects.push_back(params->bitmap_rect); | 92 params->copy_rects.push_back(params->bitmap_rect); |
92 params->view_size = gfx::Size(w, h); | 93 params->view_size = gfx::Size(w, h); |
93 params->flags = update_msg_reply_flags_; | 94 params->flags = update_msg_reply_flags_; |
94 } | 95 } |
95 | 96 |
96 bool RenderWidgetHostProcess::WaitForUpdateMsg(int render_widget_id, | 97 bool RenderWidgetHostProcess::WaitForUpdateMsg(int render_widget_id, |
97 const base::TimeDelta& max_delay, | 98 const base::TimeDelta& max_delay, |
(...skipping 601 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
699 // Start it again to ensure it still works. | 700 // Start it again to ensure it still works. |
700 EXPECT_FALSE(host_->unresponsive_timer_fired()); | 701 EXPECT_FALSE(host_->unresponsive_timer_fired()); |
701 host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); | 702 host_->StartHangMonitorTimeout(TimeDelta::FromMilliseconds(10)); |
702 | 703 |
703 // Wait long enough for first timeout and see if it fired. | 704 // Wait long enough for first timeout and see if it fired. |
704 MessageLoop::current()->PostDelayedTask(FROM_HERE, | 705 MessageLoop::current()->PostDelayedTask(FROM_HERE, |
705 new MessageLoop::QuitTask(), 10); | 706 new MessageLoop::QuitTask(), 10); |
706 MessageLoop::current()->Run(); | 707 MessageLoop::current()->Run(); |
707 EXPECT_TRUE(host_->unresponsive_timer_fired()); | 708 EXPECT_TRUE(host_->unresponsive_timer_fired()); |
708 } | 709 } |
OLD | NEW |