Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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/command_line.h" | 7 #include "base/command_line.h" |
| 8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
| 9 #include "base/strings/string_number_conversions.h" | 9 #include "base/strings/string_number_conversions.h" |
| 10 #include "base/strings/utf_string_conversions.h" | 10 #include "base/strings/utf_string_conversions.h" |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 463 } | 463 } |
| 464 | 464 |
| 465 BrowserPluginHostMsg_ResizeGuest_Params params; | 465 BrowserPluginHostMsg_ResizeGuest_Params params; |
| 466 PopulateResizeGuestParameters(plugin_size(), ¶ms); | 466 PopulateResizeGuestParameters(plugin_size(), ¶ms); |
| 467 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ResizeGuest( | 467 BrowserPluginManager::Get()->Send(new BrowserPluginHostMsg_ResizeGuest( |
| 468 render_view_routing_id_, | 468 render_view_routing_id_, |
| 469 browser_plugin_instance_id_, | 469 browser_plugin_instance_id_, |
| 470 params)); | 470 params)); |
| 471 | 471 |
| 472 if (delegate_) { | 472 if (delegate_) { |
| 473 delegate_->DidResizeElement( | 473 delegate_->DidResizeElement(gfx::Size(old_width, old_height), |
|
Fady Samuel
2015/01/22 20:42:33
Is this change necessary?
paulmeyer
2015/01/23 16:14:30
It was done by 'git cl format'. I'll change it bac
| |
| 474 gfx::Size(old_width, old_height), plugin_size()); | 474 plugin_size()); |
| 475 } | 475 } |
| 476 } | 476 } |
| 477 | 477 |
| 478 void BrowserPlugin::PopulateResizeGuestParameters( | 478 void BrowserPlugin::PopulateResizeGuestParameters( |
| 479 const gfx::Size& view_size, | 479 const gfx::Size& view_size, |
| 480 BrowserPluginHostMsg_ResizeGuest_Params* params) { | 480 BrowserPluginHostMsg_ResizeGuest_Params* params) { |
| 481 params->view_size = view_size; | 481 params->view_size = view_size; |
| 482 params->scale_factor = GetDeviceScaleFactor(); | 482 params->scale_factor = GetDeviceScaleFactor(); |
| 483 if (last_device_scale_factor_ != params->scale_factor) { | 483 if (last_device_scale_factor_ != params->scale_factor) { |
| 484 last_device_scale_factor_ = params->scale_factor; | 484 last_device_scale_factor_ = params->scale_factor; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 669 const blink::WebMouseEvent& event) { | 669 const blink::WebMouseEvent& event) { |
| 670 BrowserPluginManager::Get()->Send( | 670 BrowserPluginManager::Get()->Send( |
| 671 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, | 671 new BrowserPluginHostMsg_HandleInputEvent(render_view_routing_id_, |
| 672 browser_plugin_instance_id_, | 672 browser_plugin_instance_id_, |
| 673 plugin_rect_, | 673 plugin_rect_, |
| 674 &event)); | 674 &event)); |
| 675 return true; | 675 return true; |
| 676 } | 676 } |
| 677 | 677 |
| 678 } // namespace content | 678 } // namespace content |
| OLD | NEW |