OLD | NEW |
---|---|
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/browser/renderer_host/render_widget_host_impl.h" | 5 #include "content/browser/renderer_host/render_widget_host_impl.h" |
6 | 6 |
7 #include <math.h> | 7 #include <math.h> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
(...skipping 493 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
504 was_fullscreen != is_fullscreen_ || | 504 was_fullscreen != is_fullscreen_ || |
505 old_overdraw_bottom_height != overdraw_bottom_height_; | 505 old_overdraw_bottom_height != overdraw_bottom_height_; |
506 | 506 |
507 if (!size_changed && !side_payload_changed) | 507 if (!size_changed && !side_payload_changed) |
508 return; | 508 return; |
509 | 509 |
510 if (in_flight_size_ != gfx::Size() && new_size == in_flight_size_ && | 510 if (in_flight_size_ != gfx::Size() && new_size == in_flight_size_ && |
511 !side_payload_changed) | 511 !side_payload_changed) |
512 return; | 512 return; |
513 | 513 |
514 // We don't expect to receive an ACK when the requested size is empty or when | 514 // We don't expect to receive an ACK when the requested size or the physical |
515 // the main viewport size didn't change. | 515 // backing size is empty or when the main viewport size didn't change. |
516 if (!new_size.IsEmpty() && size_changed) | 516 if (!new_size.IsEmpty() && !physical_backing_size_.IsEmpty() && size_changed) |
piman
2013/05/10 20:12:06
I don't see a corresponding test in RenderWidget::
Xianzhu
2013/05/10 20:25:03
We have tested that the renderer doesn't send ack
| |
517 resize_ack_pending_ = true; | 517 resize_ack_pending_ = true; |
518 | 518 |
519 if (!Send(new ViewMsg_Resize(routing_id_, new_size, physical_backing_size_, | 519 if (!Send(new ViewMsg_Resize(routing_id_, new_size, physical_backing_size_, |
520 overdraw_bottom_height_, | 520 overdraw_bottom_height_, |
521 GetRootWindowResizerRect(), is_fullscreen_))) { | 521 GetRootWindowResizerRect(), is_fullscreen_))) { |
522 resize_ack_pending_ = false; | 522 resize_ack_pending_ = false; |
523 } else { | 523 } else { |
524 in_flight_size_ = new_size; | 524 in_flight_size_ = new_size; |
525 } | 525 } |
526 } | 526 } |
(...skipping 1872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2399 return; | 2399 return; |
2400 | 2400 |
2401 OnRenderAutoResized(new_size); | 2401 OnRenderAutoResized(new_size); |
2402 } | 2402 } |
2403 | 2403 |
2404 void RenderWidgetHostImpl::DetachDelegate() { | 2404 void RenderWidgetHostImpl::DetachDelegate() { |
2405 delegate_ = NULL; | 2405 delegate_ = NULL; |
2406 } | 2406 } |
2407 | 2407 |
2408 } // namespace content | 2408 } // namespace content |
OLD | NEW |