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 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
44 ack_pending_count_(0), | 44 ack_pending_count_(0), |
45 frame_connector_(nullptr), | 45 frame_connector_(nullptr), |
46 begin_frame_source_(nullptr), | 46 begin_frame_source_(nullptr), |
47 observing_begin_frame_source_(false), | 47 observing_begin_frame_source_(false), |
48 parent_surface_id_namespace_(0), | 48 parent_surface_id_namespace_(0), |
49 weak_factory_(this) { | 49 weak_factory_(this) { |
50 id_allocator_ = CreateSurfaceIdAllocator(); | 50 id_allocator_ = CreateSurfaceIdAllocator(); |
51 RegisterSurfaceNamespaceId(); | 51 RegisterSurfaceNamespaceId(); |
52 | 52 |
53 host_->SetView(this); | 53 host_->SetView(this); |
54 | |
55 // This is necessary when this view is the top-level view, which is the case | |
56 // for inner WebContents. | |
57 text_input_manager_ = GetTextInputManager(); | |
EhsanK
2016/05/13 16:00:56
Actually, I am not sure if this is really necessar
| |
54 } | 58 } |
55 | 59 |
56 RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() { | 60 RenderWidgetHostViewChildFrame::~RenderWidgetHostViewChildFrame() { |
57 if (!surface_id_.is_null()) | 61 if (!surface_id_.is_null()) |
58 surface_factory_->Destroy(surface_id_); | 62 surface_factory_->Destroy(surface_id_); |
59 } | 63 } |
60 | 64 |
61 void RenderWidgetHostViewChildFrame::SetCrossProcessFrameConnector( | 65 void RenderWidgetHostViewChildFrame::SetCrossProcessFrameConnector( |
62 CrossProcessFrameConnector* frame_connector) { | 66 CrossProcessFrameConnector* frame_connector) { |
63 if (frame_connector_ == frame_connector) | 67 if (frame_connector_ == frame_connector) |
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
253 // RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call. | 257 // RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call. |
254 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() && | 258 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() && |
255 BrowserPluginGuest::IsGuest( | 259 BrowserPluginGuest::IsGuest( |
256 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) { | 260 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) { |
257 return; | 261 return; |
258 } | 262 } |
259 | 263 |
260 NOTREACHED(); | 264 NOTREACHED(); |
261 } | 265 } |
262 | 266 |
263 void RenderWidgetHostViewChildFrame::TextInputStateChanged( | |
264 const TextInputState& params) { | |
265 // TODO(kenrb): Implement. | |
266 } | |
267 | |
268 void RenderWidgetHostViewChildFrame::RenderProcessGone( | 267 void RenderWidgetHostViewChildFrame::RenderProcessGone( |
269 base::TerminationStatus status, | 268 base::TerminationStatus status, |
270 int error_code) { | 269 int error_code) { |
271 if (frame_connector_) | 270 if (frame_connector_) |
272 frame_connector_->RenderProcessGone(); | 271 frame_connector_->RenderProcessGone(); |
273 Destroy(); | 272 Destroy(); |
274 } | 273 } |
275 | 274 |
276 void RenderWidgetHostViewChildFrame::Destroy() { | 275 void RenderWidgetHostViewChildFrame::Destroy() { |
277 // SurfaceIdNamespaces registered with RenderWidgetHostInputEventRouter | 276 // SurfaceIdNamespaces registered with RenderWidgetHostInputEventRouter |
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
664 | 663 |
665 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { | 664 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { |
666 return true; | 665 return true; |
667 } | 666 } |
668 | 667 |
669 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { | 668 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { |
670 return surface_id_; | 669 return surface_id_; |
671 }; | 670 }; |
672 | 671 |
673 } // namespace content | 672 } // namespace content |
OLD | NEW |