Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(922)

Side by Side Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 1652483002: Browser Side Text Input State Tracking for OOPIF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed a Compile Error Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
189 // RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call. 189 // RenderWidgetHostViewChildFrame which do not get a SetIsLoading() call.
190 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() && 190 if (BrowserPluginGuestMode::UseCrossProcessFramesForGuests() &&
191 BrowserPluginGuest::IsGuest( 191 BrowserPluginGuest::IsGuest(
192 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) { 192 static_cast<RenderViewHostImpl*>(RenderViewHost::From(host_)))) {
193 return; 193 return;
194 } 194 }
195 195
196 NOTREACHED(); 196 NOTREACHED();
197 } 197 }
198 198
199 void RenderWidgetHostViewChildFrame::TextInputStateChanged(
200 const ViewHostMsg_TextInputState_Params& params) {
201 // TODO(kenrb): Implement.
202 }
203
204 void RenderWidgetHostViewChildFrame::RenderProcessGone( 199 void RenderWidgetHostViewChildFrame::RenderProcessGone(
205 base::TerminationStatus status, 200 base::TerminationStatus status,
206 int error_code) { 201 int error_code) {
207 if (frame_connector_) 202 if (frame_connector_)
208 frame_connector_->RenderProcessGone(); 203 frame_connector_->RenderProcessGone();
209 Destroy(); 204 Destroy();
210 } 205 }
211 206
212 void RenderWidgetHostViewChildFrame::Destroy() { 207 void RenderWidgetHostViewChildFrame::Destroy() {
213 // SurfaceIdNamespaces registered with RenderWidgetHostInputEventRouter 208 // SurfaceIdNamespaces registered with RenderWidgetHostInputEventRouter
214 // have already been cleared when RenderWidgetHostViewBase notified its 209 // have already been cleared when RenderWidgetHostViewBase notified its
215 // observers of our impending destruction. 210 // observers of our impending destruction.
216 if (frame_connector_) { 211 if (frame_connector_) {
217 frame_connector_->set_view(NULL); 212 frame_connector_->set_view(NULL);
218 frame_connector_ = NULL; 213 frame_connector_ = NULL;
219 } 214 }
220 215
221 // We notify our observers about shutdown here since we are about to release 216 // We notify our observers about shutdown here since we are about to release
222 // host_ and do not want any event calls coming from 217 // host_ and do not want any event calls coming from
223 // RenderWidgetHostInputEventRouter afterwards. 218 // RenderWidgetHostInputEventRouter afterwards.
224 NotifyObserversAboutShutdown(); 219 NotifyObserversAboutShutdown();
225 220
221 // If this view has an active text input, the RenderWidgetHostDelegate should
222 // be notified.
223 if (text_input_state()->type != ui::TEXT_INPUT_TYPE_NONE)
224 TextInputStateChanged(TextInputState());
Charlie Reis 2016/03/15 18:32:00 Why are we passing in an empty one rather than tex
EhsanK 2016/03/15 23:51:17 This line will reset the WebContents knowledge of
Charlie Reis 2016/03/16 16:55:13 I see-- I didn't notice that this was during Destr
EhsanK 2016/03/30 20:46:03 Done.
225
226 host_->SetView(NULL); 226 host_->SetView(NULL);
227 host_ = NULL; 227 host_ = NULL;
228 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this); 228 base::MessageLoop::current()->DeleteSoon(FROM_HERE, this);
229 } 229 }
230 230
231 void RenderWidgetHostViewChildFrame::SetTooltipText( 231 void RenderWidgetHostViewChildFrame::SetTooltipText(
232 const base::string16& tooltip_text) { 232 const base::string16& tooltip_text) {
233 } 233 }
234 234
235 void RenderWidgetHostViewChildFrame::SelectionChanged( 235 void RenderWidgetHostViewChildFrame::SelectionChanged(
(...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after
579 if (surface_factory_ && !surface_id_.is_null()) 579 if (surface_factory_ && !surface_id_.is_null())
580 surface_factory_->Destroy(surface_id_); 580 surface_factory_->Destroy(surface_id_);
581 surface_id_ = cc::SurfaceId(); 581 surface_id_ = cc::SurfaceId();
582 } 582 }
583 583
584 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { 584 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const {
585 return surface_id_; 585 return surface_id_;
586 }; 586 };
587 587
588 } // namespace content 588 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698