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

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

Issue 538883002: Speculative fix for DelegatedFrameHost destructor crashes (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Absolutely minimal fix Created 6 years, 3 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_view_base.h" 5 #include "content/browser/renderer_host/render_widget_host_view_base.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "content/browser/accessibility/browser_accessibility_manager.h" 8 #include "content/browser/accessibility/browser_accessibility_manager.h"
9 #include "content/browser/gpu/gpu_data_manager_impl.h" 9 #include "content/browser/gpu/gpu_data_manager_impl.h"
10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h" 10 #include "content/browser/renderer_host/input/synthetic_gesture_target_base.h"
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 RenderWidgetHostViewBase::RenderWidgetHostViewBase() 367 RenderWidgetHostViewBase::RenderWidgetHostViewBase()
368 : popup_type_(blink::WebPopupTypeNone), 368 : popup_type_(blink::WebPopupTypeNone),
369 background_opaque_(true), 369 background_opaque_(true),
370 mouse_locked_(false), 370 mouse_locked_(false),
371 showing_context_menu_(false), 371 showing_context_menu_(false),
372 selection_text_offset_(0), 372 selection_text_offset_(0),
373 selection_range_(gfx::Range::InvalidRange()), 373 selection_range_(gfx::Range::InvalidRange()),
374 current_device_scale_factor_(0), 374 current_device_scale_factor_(0),
375 current_display_rotation_(gfx::Display::ROTATE_0), 375 current_display_rotation_(gfx::Display::ROTATE_0),
376 pinch_zoom_enabled_(content::IsPinchToZoomEnabled()), 376 pinch_zoom_enabled_(content::IsPinchToZoomEnabled()),
377 renderer_frame_number_(0) { 377 renderer_frame_number_(0),
378 weak_factory_(this) {
378 } 379 }
379 380
380 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() { 381 RenderWidgetHostViewBase::~RenderWidgetHostViewBase() {
381 DCHECK(!mouse_locked_); 382 DCHECK(!mouse_locked_);
382 } 383 }
383 384
384 bool RenderWidgetHostViewBase::OnMessageReceived(const IPC::Message& msg){ 385 bool RenderWidgetHostViewBase::OnMessageReceived(const IPC::Message& msg){
385 return false; 386 return false;
386 } 387 }
387 388
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
528 current_display_rotation_ == display.rotation()) { 529 current_display_rotation_ == display.rotation()) {
529 return false; 530 return false;
530 } 531 }
531 532
532 current_display_area_ = display.work_area(); 533 current_display_area_ = display.work_area();
533 current_device_scale_factor_ = display.device_scale_factor(); 534 current_device_scale_factor_ = display.device_scale_factor();
534 current_display_rotation_ = display.rotation(); 535 current_display_rotation_ = display.rotation();
535 return true; 536 return true;
536 } 537 }
537 538
539 base::WeakPtr<RenderWidgetHostViewBase> RenderWidgetHostViewBase::GetWeakPtr() {
540 return weak_factory_.GetWeakPtr();
541 }
542
538 scoped_ptr<SyntheticGestureTarget> 543 scoped_ptr<SyntheticGestureTarget>
539 RenderWidgetHostViewBase::CreateSyntheticGestureTarget() { 544 RenderWidgetHostViewBase::CreateSyntheticGestureTarget() {
540 RenderWidgetHostImpl* host = 545 RenderWidgetHostImpl* host =
541 RenderWidgetHostImpl::From(GetRenderWidgetHost()); 546 RenderWidgetHostImpl::From(GetRenderWidgetHost());
542 return scoped_ptr<SyntheticGestureTarget>( 547 return scoped_ptr<SyntheticGestureTarget>(
543 new SyntheticGestureTargetBase(host)); 548 new SyntheticGestureTargetBase(host));
544 } 549 }
545 550
546 // Platform implementation should override this method to allow frame 551 // Platform implementation should override this method to allow frame
547 // subscription. Frame subscriber is set to RenderProcessHost, which is 552 // subscription. Frame subscriber is set to RenderProcessHost, which is
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
663 ? blink::WebScreenOrientationPortraitPrimary 668 ? blink::WebScreenOrientationPortraitPrimary
664 : blink::WebScreenOrientationPortraitSecondary; 669 : blink::WebScreenOrientationPortraitSecondary;
665 } 670 }
666 671
667 return primary_landscape_angle == angle 672 return primary_landscape_angle == angle
668 ? blink::WebScreenOrientationLandscapePrimary 673 ? blink::WebScreenOrientationLandscapePrimary
669 : blink::WebScreenOrientationLandscapeSecondary; 674 : blink::WebScreenOrientationLandscapeSecondary;
670 } 675 }
671 676
672 } // namespace content 677 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698