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/renderer_host/render_widget_host_impl.cc

Issue 1457203002: Make WebContentsImpl aware of all of its RWHs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: sync @tott Created 5 years 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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/renderer_host/render_widget_host_impl.h" 5 #include "content/browser/renderer_host/render_widget_host_impl.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after
238 if (!base::CommandLine::ForCurrentProcess()->HasSwitch( 238 if (!base::CommandLine::ForCurrentProcess()->HasSwitch(
239 switches::kDisableHangMonitor)) { 239 switches::kDisableHangMonitor)) {
240 hang_monitor_timeout_.reset(new TimeoutMonitor( 240 hang_monitor_timeout_.reset(new TimeoutMonitor(
241 base::Bind(&RenderWidgetHostImpl::RendererIsUnresponsive, 241 base::Bind(&RenderWidgetHostImpl::RendererIsUnresponsive,
242 weak_factory_.GetWeakPtr()))); 242 weak_factory_.GetWeakPtr())));
243 } 243 }
244 244
245 new_content_rendering_timeout_.reset(new TimeoutMonitor( 245 new_content_rendering_timeout_.reset(new TimeoutMonitor(
246 base::Bind(&RenderWidgetHostImpl::ClearDisplayedGraphics, 246 base::Bind(&RenderWidgetHostImpl::ClearDisplayedGraphics,
247 weak_factory_.GetWeakPtr()))); 247 weak_factory_.GetWeakPtr())));
248
249 delegate_->RenderWidgetCreated(this);
248 } 250 }
249 251
250 RenderWidgetHostImpl::~RenderWidgetHostImpl() { 252 RenderWidgetHostImpl::~RenderWidgetHostImpl() {
251 if (view_weak_) 253 if (view_weak_)
252 view_weak_->RenderWidgetHostGone(); 254 view_weak_->RenderWidgetHostGone();
253 SetView(NULL); 255 SetView(NULL);
254 256
255 process_->RemoveRoute(routing_id_); 257 process_->RemoveRoute(routing_id_);
256 g_routing_id_widget_map.Get().erase( 258 g_routing_id_widget_map.Get().erase(
257 RenderWidgetHostID(process_->GetID(), routing_id_)); 259 RenderWidgetHostID(process_->GetID(), routing_id_));
(...skipping 1983 matching lines...) Expand 10 before | Expand all | Expand 10 after
2241 } 2243 }
2242 2244
2243 #if defined(OS_WIN) 2245 #if defined(OS_WIN)
2244 gfx::NativeViewAccessible 2246 gfx::NativeViewAccessible
2245 RenderWidgetHostImpl::GetParentNativeViewAccessible() { 2247 RenderWidgetHostImpl::GetParentNativeViewAccessible() {
2246 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; 2248 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL;
2247 } 2249 }
2248 #endif 2250 #endif
2249 2251
2250 } // namespace content 2252 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_delegate.h ('k') | content/browser/web_contents/web_contents_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698