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

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

Issue 2054163003: Fix SitePerProcessTextInputManagerTest.StopTrackingCrashedChildFrame on CFI Bots. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased + Remove internal observers from TextInputManager's observer list Created 4 years, 5 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 10 matching lines...) Expand all
21 #include "cc/surfaces/surface_sequence.h" 21 #include "cc/surfaces/surface_sequence.h"
22 #include "content/browser/accessibility/browser_accessibility_manager.h" 22 #include "content/browser/accessibility/browser_accessibility_manager.h"
23 #include "content/browser/browser_plugin/browser_plugin_guest.h" 23 #include "content/browser/browser_plugin/browser_plugin_guest.h"
24 #include "content/browser/compositor/surface_utils.h" 24 #include "content/browser/compositor/surface_utils.h"
25 #include "content/browser/frame_host/cross_process_frame_connector.h" 25 #include "content/browser/frame_host/cross_process_frame_connector.h"
26 #include "content/browser/gpu/compositor_util.h" 26 #include "content/browser/gpu/compositor_util.h"
27 #include "content/browser/renderer_host/render_view_host_impl.h" 27 #include "content/browser/renderer_host/render_view_host_impl.h"
28 #include "content/browser/renderer_host/render_widget_host_delegate.h" 28 #include "content/browser/renderer_host/render_widget_host_delegate.h"
29 #include "content/browser/renderer_host/render_widget_host_impl.h" 29 #include "content/browser/renderer_host/render_widget_host_impl.h"
30 #include "content/browser/renderer_host/render_widget_host_input_event_router.h" 30 #include "content/browser/renderer_host/render_widget_host_input_event_router.h"
31 #include "content/browser/renderer_host/text_input_manager.h"
31 #include "content/common/text_input_state.h" 32 #include "content/common/text_input_state.h"
32 #include "content/common/view_messages.h" 33 #include "content/common/view_messages.h"
33 #include "content/public/browser/render_process_host.h" 34 #include "content/public/browser/render_process_host.h"
34 #include "content/public/common/browser_plugin_guest_mode.h" 35 #include "content/public/common/browser_plugin_guest_mode.h"
35 #include "gpu/ipc/common/gpu_messages.h" 36 #include "gpu/ipc/common/gpu_messages.h"
36 #include "ui/gfx/geometry/size_conversions.h" 37 #include "ui/gfx/geometry/size_conversions.h"
37 #include "ui/gfx/geometry/size_f.h" 38 #include "ui/gfx/geometry/size_f.h"
38 39
39 namespace content { 40 namespace content {
40 41
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 SetCrossProcessFrameConnector(nullptr); 281 SetCrossProcessFrameConnector(nullptr);
281 } 282 }
282 283
283 // We notify our observers about shutdown here since we are about to release 284 // We notify our observers about shutdown here since we are about to release
284 // host_ and do not want any event calls coming from 285 // host_ and do not want any event calls coming from
285 // RenderWidgetHostInputEventRouter afterwards. 286 // RenderWidgetHostInputEventRouter afterwards.
286 NotifyObserversAboutShutdown(); 287 NotifyObserversAboutShutdown();
287 288
288 host_->SetView(nullptr); 289 host_->SetView(nullptr);
289 host_ = nullptr; 290 host_ = nullptr;
291
292 if (text_input_manager_)
293 text_input_manager_->Unregister(this);
Charlie Reis 2016/06/28 18:12:41 I thought RWHVBase took care of this. Won't this
EhsanK 2016/06/28 18:56:54 When we unregister, TextInputManager calls the met
kenrb 2016/06/28 19:34:40 It isn't necessary, as I understand it, because yo
294
290 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this); 295 base::ThreadTaskRunnerHandle::Get()->DeleteSoon(FROM_HERE, this);
291 } 296 }
292 297
293 void RenderWidgetHostViewChildFrame::SetTooltipText( 298 void RenderWidgetHostViewChildFrame::SetTooltipText(
294 const base::string16& tooltip_text) { 299 const base::string16& tooltip_text) {
295 frame_connector_->GetRootRenderWidgetHostView()->SetTooltipText(tooltip_text); 300 frame_connector_->GetRootRenderWidgetHostView()->SetTooltipText(tooltip_text);
296 } 301 }
297 302
298 void RenderWidgetHostViewChildFrame::SelectionChanged( 303 void RenderWidgetHostViewChildFrame::SelectionChanged(
299 const base::string16& text, 304 const base::string16& text,
(...skipping 392 matching lines...) Expand 10 before | Expand all | Expand 10 after
692 697
693 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const { 698 bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const {
694 return true; 699 return true;
695 } 700 }
696 701
697 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const { 702 cc::SurfaceId RenderWidgetHostViewChildFrame::SurfaceIdForTesting() const {
698 return surface_id_; 703 return surface_id_;
699 }; 704 };
700 705
701 } // namespace content 706 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698