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

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

Issue 13932029: SIGSEGV in content::RenderWidgetHostViewAura::ApplyEventFilterForPopupExit() (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: removed DCHECK Created 7 years, 8 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_aura.h" 5 #include "content/browser/renderer_host/render_widget_host_view_aura.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/bind_helpers.h" 8 #include "base/bind_helpers.h"
9 #include "base/command_line.h" 9 #include "base/command_line.h"
10 #include "base/debug/trace_event.h" 10 #include "base/debug/trace_event.h"
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 } 392 }
393 393
394 private: 394 private:
395 RenderWidgetHostViewAura* rwhva_; 395 RenderWidgetHostViewAura* rwhva_;
396 396
397 DISALLOW_COPY_AND_ASSIGN(EventFilterForPopupExit); 397 DISALLOW_COPY_AND_ASSIGN(EventFilterForPopupExit);
398 }; 398 };
399 399
400 void RenderWidgetHostViewAura::ApplyEventFilterForPopupExit( 400 void RenderWidgetHostViewAura::ApplyEventFilterForPopupExit(
401 ui::MouseEvent* event) { 401 ui::MouseEvent* event) {
402 if (in_shutdown_) { 402 if (in_shutdown_ || is_fullscreen_)
403 event_filter_for_popup_exit_.reset();
404 return; 403 return;
405 } 404
406 if (is_fullscreen_ || event->type() != ui::ET_MOUSE_PRESSED || 405 if (event->type() != ui::ET_MOUSE_PRESSED || !event->target())
407 !event->target())
408 return; 406 return;
409 407
410 DCHECK(popup_parent_host_view_); 408 DCHECK(popup_parent_host_view_);
411 aura::Window* target = static_cast<aura::Window*>(event->target()); 409 aura::Window* target = static_cast<aura::Window*>(event->target());
412 if (target != window_ && target != popup_parent_host_view_->window_) { 410 if (target != window_ && target != popup_parent_host_view_->window_) {
413 event_filter_for_popup_exit_.reset();
414 in_shutdown_ = true; 411 in_shutdown_ = true;
415 host_->Shutdown(); 412 host_->Shutdown();
416 } 413 }
417 } 414 }
418 415
419 // We have to implement the WindowObserver interface on a separate object 416 // We have to implement the WindowObserver interface on a separate object
420 // because clang doesn't like implementing multiple interfaces that have 417 // because clang doesn't like implementing multiple interfaces that have
421 // methods with the same name. This object is owned by the 418 // methods with the same name. This object is owned by the
422 // RenderWidgetHostViewAura. 419 // RenderWidgetHostViewAura.
423 class RenderWidgetHostViewAura::WindowObserver : public aura::WindowObserver { 420 class RenderWidgetHostViewAura::WindowObserver : public aura::WindowObserver {
(...skipping 2418 matching lines...) Expand 10 before | Expand all | Expand 10 after
2842 RenderWidgetHost* widget) { 2839 RenderWidgetHost* widget) {
2843 return new RenderWidgetHostViewAura(widget); 2840 return new RenderWidgetHostViewAura(widget);
2844 } 2841 }
2845 2842
2846 // static 2843 // static
2847 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { 2844 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) {
2848 GetScreenInfoForWindow(results, NULL); 2845 GetScreenInfoForWindow(results, NULL);
2849 } 2846 }
2850 2847
2851 } // namespace content 2848 } // namespace content
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698