| 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 <set> | 8 #include <set> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 610 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 621 last_requested_size_ = new_size; | 621 last_requested_size_ = new_size; |
| 622 } | 622 } |
| 623 } | 623 } |
| 624 | 624 |
| 625 void RenderWidgetHostImpl::ResizeRectChanged(const gfx::Rect& new_rect) { | 625 void RenderWidgetHostImpl::ResizeRectChanged(const gfx::Rect& new_rect) { |
| 626 Send(new ViewMsg_ChangeResizeRect(routing_id_, new_rect)); | 626 Send(new ViewMsg_ChangeResizeRect(routing_id_, new_rect)); |
| 627 } | 627 } |
| 628 | 628 |
| 629 void RenderWidgetHostImpl::GotFocus() { | 629 void RenderWidgetHostImpl::GotFocus() { |
| 630 Focus(); | 630 Focus(); |
| 631 if (delegate_) |
| 632 delegate_->RenderWidgetGotFocus(this); |
| 631 } | 633 } |
| 632 | 634 |
| 633 void RenderWidgetHostImpl::Focus() { | 635 void RenderWidgetHostImpl::Focus() { |
| 634 Send(new InputMsg_SetFocus(routing_id_, true)); | 636 Send(new InputMsg_SetFocus(routing_id_, true)); |
| 635 } | 637 } |
| 636 | 638 |
| 637 void RenderWidgetHostImpl::Blur() { | 639 void RenderWidgetHostImpl::Blur() { |
| 638 // If there is a pending mouse lock request, we don't want to reject it at | 640 // If there is a pending mouse lock request, we don't want to reject it at |
| 639 // this point. The user can switch focus back to this view and approve the | 641 // this point. The user can switch focus back to this view and approve the |
| 640 // request later. | 642 // request later. |
| (...skipping 1756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2397 } | 2399 } |
| 2398 #endif | 2400 #endif |
| 2399 | 2401 |
| 2400 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { | 2402 SkColorType RenderWidgetHostImpl::PreferredReadbackFormat() { |
| 2401 if (view_) | 2403 if (view_) |
| 2402 return view_->PreferredReadbackFormat(); | 2404 return view_->PreferredReadbackFormat(); |
| 2403 return kN32_SkColorType; | 2405 return kN32_SkColorType; |
| 2404 } | 2406 } |
| 2405 | 2407 |
| 2406 } // namespace content | 2408 } // namespace content |
| OLD | NEW |