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 "cc/surfaces/surface.h" | 7 #include "cc/surfaces/surface.h" |
8 #include "cc/surfaces/surface_factory.h" | 8 #include "cc/surfaces/surface_factory.h" |
9 #include "cc/surfaces/surface_manager.h" | 9 #include "cc/surfaces/surface_manager.h" |
10 #include "cc/surfaces/surface_sequence.h" | 10 #include "cc/surfaces/surface_sequence.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 } | 66 } |
67 | 67 |
68 void RenderWidgetHostViewChildFrame::SetBounds(const gfx::Rect& rect) { | 68 void RenderWidgetHostViewChildFrame::SetBounds(const gfx::Rect& rect) { |
69 SetSize(rect.size()); | 69 SetSize(rect.size()); |
70 } | 70 } |
71 | 71 |
72 void RenderWidgetHostViewChildFrame::Focus() { | 72 void RenderWidgetHostViewChildFrame::Focus() { |
73 } | 73 } |
74 | 74 |
75 bool RenderWidgetHostViewChildFrame::HasFocus() const { | 75 bool RenderWidgetHostViewChildFrame::HasFocus() const { |
| 76 if (frame_connector_) |
| 77 return frame_connector_->HasFocus(); |
76 return false; | 78 return false; |
77 } | 79 } |
78 | 80 |
79 bool RenderWidgetHostViewChildFrame::IsSurfaceAvailableForCopy() const { | 81 bool RenderWidgetHostViewChildFrame::IsSurfaceAvailableForCopy() const { |
80 NOTIMPLEMENTED(); | 82 NOTIMPLEMENTED(); |
81 return false; | 83 return false; |
82 } | 84 } |
83 | 85 |
84 void RenderWidgetHostViewChildFrame::Show() { | 86 void RenderWidgetHostViewChildFrame::Show() { |
85 if (!host_->is_hidden()) | 87 if (!host_->is_hidden()) |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
475 BrowserAccessibilityManager::GetEmptyDocument(), delegate); | 477 BrowserAccessibilityManager::GetEmptyDocument(), delegate); |
476 } | 478 } |
477 | 479 |
478 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { | 480 void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() { |
479 if (surface_factory_ && !surface_id_.is_null()) | 481 if (surface_factory_ && !surface_id_.is_null()) |
480 surface_factory_->Destroy(surface_id_); | 482 surface_factory_->Destroy(surface_id_); |
481 surface_id_ = cc::SurfaceId(); | 483 surface_id_ = cc::SurfaceId(); |
482 } | 484 } |
483 | 485 |
484 } // namespace content | 486 } // namespace content |
OLD | NEW |