Chromium Code Reviews| 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_view_host_impl.h" | 5 #include "content/browser/renderer_host/render_view_host_impl.h" |
| 6 | 6 |
| 7 #include <set> | 7 #include <set> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <utility> | 9 #include <utility> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 1451 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1462 | 1462 |
| 1463 void RenderViewHostImpl::EnableAutoResize(const gfx::Size& min_size, | 1463 void RenderViewHostImpl::EnableAutoResize(const gfx::Size& min_size, |
| 1464 const gfx::Size& max_size) { | 1464 const gfx::Size& max_size) { |
| 1465 SetShouldAutoResize(true); | 1465 SetShouldAutoResize(true); |
| 1466 Send(new ViewMsg_EnableAutoResize(GetRoutingID(), min_size, max_size)); | 1466 Send(new ViewMsg_EnableAutoResize(GetRoutingID(), min_size, max_size)); |
| 1467 } | 1467 } |
| 1468 | 1468 |
| 1469 void RenderViewHostImpl::DisableAutoResize(const gfx::Size& new_size) { | 1469 void RenderViewHostImpl::DisableAutoResize(const gfx::Size& new_size) { |
| 1470 SetShouldAutoResize(false); | 1470 SetShouldAutoResize(false); |
| 1471 Send(new ViewMsg_DisableAutoResize(GetRoutingID(), new_size)); | 1471 Send(new ViewMsg_DisableAutoResize(GetRoutingID(), new_size)); |
| 1472 if (!new_size.IsEmpty()) | |
| 1473 GetView()->SetSize(new_size); | |
|
Fady Samuel
2014/08/05 14:32:55
This ensures that the view is resized when autosiz
| |
| 1472 } | 1474 } |
| 1473 | 1475 |
| 1474 void RenderViewHostImpl::CopyImageAt(int x, int y) { | 1476 void RenderViewHostImpl::CopyImageAt(int x, int y) { |
| 1475 Send(new ViewMsg_CopyImageAt(GetRoutingID(), x, y)); | 1477 Send(new ViewMsg_CopyImageAt(GetRoutingID(), x, y)); |
| 1476 } | 1478 } |
| 1477 | 1479 |
| 1478 void RenderViewHostImpl::SaveImageAt(int x, int y) { | 1480 void RenderViewHostImpl::SaveImageAt(int x, int y) { |
| 1479 Send(new ViewMsg_SaveImageAt(GetRoutingID(), x, y)); | 1481 Send(new ViewMsg_SaveImageAt(GetRoutingID(), x, y)); |
| 1480 } | 1482 } |
| 1481 | 1483 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1580 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1582 FrameTree* frame_tree = delegate_->GetFrameTree(); |
| 1581 | 1583 |
| 1582 frame_tree->ResetForMainFrameSwap(); | 1584 frame_tree->ResetForMainFrameSwap(); |
| 1583 } | 1585 } |
| 1584 | 1586 |
| 1585 void RenderViewHostImpl::SelectWordAroundCaret() { | 1587 void RenderViewHostImpl::SelectWordAroundCaret() { |
| 1586 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); | 1588 Send(new ViewMsg_SelectWordAroundCaret(GetRoutingID())); |
| 1587 } | 1589 } |
| 1588 | 1590 |
| 1589 } // namespace content | 1591 } // namespace content |
| OLD | NEW |