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

Side by Side Diff: content/browser/renderer_host/render_widget_host_impl.cc

Issue 1413643002: Separate RenderViewHost from RenderWidgetHost, part 2: public implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years, 2 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 (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 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
301 it != widgets->end(); 301 it != widgets->end();
302 ++it) { 302 ++it) {
303 hosts->Add(it->second); 303 hosts->Add(it->second);
304 } 304 }
305 305
306 return scoped_ptr<RenderWidgetHostIterator>(hosts); 306 return scoped_ptr<RenderWidgetHostIterator>(hosts);
307 } 307 }
308 308
309 // static 309 // static
310 RenderWidgetHostImpl* RenderWidgetHostImpl::From(RenderWidgetHost* rwh) { 310 RenderWidgetHostImpl* RenderWidgetHostImpl::From(RenderWidgetHost* rwh) {
311 return rwh->AsRenderWidgetHostImpl(); 311 return static_cast<RenderWidgetHostImpl*>(rwh);
312 } 312 }
313 313
314 void RenderWidgetHostImpl::SetView(RenderWidgetHostViewBase* view) { 314 void RenderWidgetHostImpl::SetView(RenderWidgetHostViewBase* view) {
315 if (view) 315 if (view)
316 view_weak_ = view->GetWeakPtr(); 316 view_weak_ = view->GetWeakPtr();
317 else 317 else
318 view_weak_.reset(); 318 view_weak_.reset();
319 view_ = view; 319 view_ = view;
320 320
321 // If the renderer has not yet been initialized, then the surface ID 321 // If the renderer has not yet been initialized, then the surface ID
(...skipping 11 matching lines...) Expand all
333 } 333 }
334 334
335 int RenderWidgetHostImpl::GetRoutingID() const { 335 int RenderWidgetHostImpl::GetRoutingID() const {
336 return routing_id_; 336 return routing_id_;
337 } 337 }
338 338
339 RenderWidgetHostView* RenderWidgetHostImpl::GetView() const { 339 RenderWidgetHostView* RenderWidgetHostImpl::GetView() const {
340 return view_; 340 return view_;
341 } 341 }
342 342
343 RenderWidgetHostImpl* RenderWidgetHostImpl::AsRenderWidgetHostImpl() {
344 return this;
345 }
346
347 gfx::NativeViewId RenderWidgetHostImpl::GetNativeViewId() const { 343 gfx::NativeViewId RenderWidgetHostImpl::GetNativeViewId() const {
348 if (view_) 344 if (view_)
349 return view_->GetNativeViewId(); 345 return view_->GetNativeViewId();
350 return 0; 346 return 0;
351 } 347 }
352 348
353 void RenderWidgetHostImpl::ResetSizeAndRepaintPendingFlags() { 349 void RenderWidgetHostImpl::ResetSizeAndRepaintPendingFlags() {
354 resize_ack_pending_ = false; 350 resize_ack_pending_ = false;
355 if (repaint_ack_pending_) { 351 if (repaint_ack_pending_) {
356 TRACE_EVENT_ASYNC_END0( 352 TRACE_EVENT_ASYNC_END0(
(...skipping 1836 matching lines...) Expand 10 before | Expand all | Expand 10 after
2193 } 2189 }
2194 2190
2195 #if defined(OS_WIN) 2191 #if defined(OS_WIN)
2196 gfx::NativeViewAccessible 2192 gfx::NativeViewAccessible
2197 RenderWidgetHostImpl::GetParentNativeViewAccessible() { 2193 RenderWidgetHostImpl::GetParentNativeViewAccessible() {
2198 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL; 2194 return delegate_ ? delegate_->GetParentNativeViewAccessible() : NULL;
2199 } 2195 }
2200 #endif 2196 #endif
2201 2197
2202 } // namespace content 2198 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698