OLD | NEW |
---|---|
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 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
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_) { |
403 event_filter_for_popup_exit_.reset(); | 403 event_filter_for_popup_exit_.reset(); |
404 return; | 404 return; |
405 } | 405 } |
406 if (is_fullscreen_ || event->type() != ui::ET_MOUSE_PRESSED || | 406 if (is_fullscreen_ || !event || event->type() != ui::ET_MOUSE_PRESSED || |
Ben Goodger (Google)
2013/04/16 16:23:14
Why is event NULL?
| |
407 !event->target()) | 407 !event->target()) |
408 return; | 408 return; |
409 | 409 |
410 DCHECK(popup_parent_host_view_); | 410 DCHECK(popup_parent_host_view_); |
411 aura::Window* target = static_cast<aura::Window*>(event->target()); | 411 aura::Window* target = static_cast<aura::Window*>(event->target()); |
412 if (target != window_ && target != popup_parent_host_view_->window_) { | 412 if (target != window_ && target != popup_parent_host_view_->window_) { |
413 event_filter_for_popup_exit_.reset(); | 413 event_filter_for_popup_exit_.reset(); |
414 in_shutdown_ = true; | 414 in_shutdown_ = true; |
415 host_->Shutdown(); | 415 host_->Shutdown(); |
416 } | 416 } |
(...skipping 2418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2835 RenderWidgetHost* widget) { | 2835 RenderWidgetHost* widget) { |
2836 return new RenderWidgetHostViewAura(widget); | 2836 return new RenderWidgetHostViewAura(widget); |
2837 } | 2837 } |
2838 | 2838 |
2839 // static | 2839 // static |
2840 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 2840 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
2841 GetScreenInfoForWindow(results, NULL); | 2841 GetScreenInfoForWindow(results, NULL); |
2842 } | 2842 } |
2843 | 2843 |
2844 } // namespace content | 2844 } // namespace content |
OLD | NEW |