Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/frame_host/render_widget_host_view_child_frame.h" | 5 #include "content/browser/frame_host/render_widget_host_view_child_frame.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <utility> | 8 #include <utility> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 61 RenderWidgetHost* RenderWidgetHostViewChildFrame::GetRenderWidgetHost() const { | 61 RenderWidgetHost* RenderWidgetHostViewChildFrame::GetRenderWidgetHost() const { |
| 62 return host_; | 62 return host_; |
| 63 } | 63 } |
| 64 | 64 |
| 65 void RenderWidgetHostViewChildFrame::SetSize(const gfx::Size& size) { | 65 void RenderWidgetHostViewChildFrame::SetSize(const gfx::Size& size) { |
| 66 host_->WasResized(); | 66 host_->WasResized(); |
| 67 } | 67 } |
| 68 | 68 |
| 69 void RenderWidgetHostViewChildFrame::SetBounds(const gfx::Rect& rect) { | 69 void RenderWidgetHostViewChildFrame::SetBounds(const gfx::Rect& rect) { |
| 70 SetSize(rect.size()); | 70 SetSize(rect.size()); |
| 71 | |
| 72 if (rect != last_screen_rect_) { | |
| 73 last_screen_rect_ = rect; | |
| 74 host_->SendScreenRects(); | |
| 75 } | |
|
lfg
2016/03/18 15:46:00
I don't think this is enough, we need to send the
kenrb
2016/03/18 17:46:10
I don't think I understand this. This should be ca
lfg
2016/03/18 18:53:53
Let's say you have a FrameTree like:
A
|
B
|
C
kenrb
2016/03/18 20:03:19
This is a really good point, thanks for catching i
lfg
2016/03/18 20:06:20
Sounds good. lgtm.
| |
| 71 } | 76 } |
| 72 | 77 |
| 73 void RenderWidgetHostViewChildFrame::Focus() { | 78 void RenderWidgetHostViewChildFrame::Focus() { |
| 74 } | 79 } |
| 75 | 80 |
| 76 bool RenderWidgetHostViewChildFrame::HasFocus() const { | 81 bool RenderWidgetHostViewChildFrame::HasFocus() const { |
| 77 if (frame_connector_) | 82 if (frame_connector_) |
| 78 return frame_connector_->HasFocus(); | 83 return frame_connector_->HasFocus(); |
| 79 return false; | 84 return false; |
| 80 } | 85 } |
| (...skipping 496 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 577 if (surface_factory_ && !surface_id_.is_null()) | 582 if (surface_factory_ && !surface_id_.is_null()) |
| 578 surface_factory_->Destroy(surface_id_); | 583 surface_factory_->Destroy(surface_id_); |
| 579 surface_id_ = cc::SurfaceId(); | 584 surface_id_ = cc::SurfaceId(); |
| 580 } | 585 } |
| 581 | 586 |
| 582 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 587 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
| 583 return surface_id_; | 588 return surface_id_; |
| 584 }; | 589 }; |
| 585 | 590 |
| 586 } // namespace content | 591 } // namespace content |
| OLD | NEW |