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/renderer/browser_plugin/browser_plugin.h" | 5 #include "content/renderer/browser_plugin/browser_plugin.h" |
6 | 6 |
7 #include "base/json/json_string_value_serializer.h" | 7 #include "base/json/json_string_value_serializer.h" |
8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
9 #include "base/string_number_conversions.h" | 9 #include "base/string_number_conversions.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
420 SwapDamageBuffers(); | 420 SwapDamageBuffers(); |
421 use_new_damage_buffer = true; | 421 use_new_damage_buffer = true; |
422 } | 422 } |
423 | 423 |
424 if (params.is_resize_ack || !UsesDamageBuffer(params)) | 424 if (params.is_resize_ack || !UsesDamageBuffer(params)) |
425 resize_ack_received_ = true; | 425 resize_ack_received_ = true; |
426 | 426 |
427 if ((!auto_size_ && | 427 if ((!auto_size_ && |
428 (width() != params.view_size.width() || | 428 (width() != params.view_size.width() || |
429 height() != params.view_size.height())) || | 429 height() != params.view_size.height())) || |
430 (auto_size_ && (!InAutoSizeBounds(params.view_size)))) { | 430 (auto_size_ && (!InAutoSizeBounds(params.view_size)))) { |
Cris Neckar
2013/01/08 23:22:35
Not part of your CL but it feels like InAutoSizeBo
| |
431 // We are HW accelerated, render widget does not expect an ack, | |
432 // but we still need to update the size. | |
433 if (!params.needs_ack) { | |
434 UpdateGuestAutoSizeState(); | |
435 return; | |
436 } | |
437 | |
431 if (!resize_ack_received_) { | 438 if (!resize_ack_received_) { |
432 // The guest has not yet responded to the last resize request, and | 439 // The guest has not yet responded to the last resize request, and |
433 // so we don't want to do anything at this point other than ACK the guest. | 440 // so we don't want to do anything at this point other than ACK the guest. |
434 PopulateAutoSizeParameters(&auto_size_params); | 441 PopulateAutoSizeParameters(&auto_size_params); |
435 } else { | 442 } else { |
436 // If we have no pending damage buffer, then the guest has not caught up | 443 // If we have no pending damage buffer, then the guest has not caught up |
437 // with the BrowserPlugin container. We now tell the guest about the new | 444 // with the BrowserPlugin container. We now tell the guest about the new |
438 // container size. | 445 // container size. |
439 GetDamageBufferWithSizeParams(&auto_size_params, | 446 GetDamageBufferWithSizeParams(&auto_size_params, |
440 &resize_guest_params); | 447 &resize_guest_params); |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1039 void* notify_data) { | 1046 void* notify_data) { |
1040 } | 1047 } |
1041 | 1048 |
1042 void BrowserPlugin::didFailLoadingFrameRequest( | 1049 void BrowserPlugin::didFailLoadingFrameRequest( |
1043 const WebKit::WebURL& url, | 1050 const WebKit::WebURL& url, |
1044 void* notify_data, | 1051 void* notify_data, |
1045 const WebKit::WebURLError& error) { | 1052 const WebKit::WebURLError& error) { |
1046 } | 1053 } |
1047 | 1054 |
1048 } // namespace content | 1055 } // namespace content |
OLD | NEW |