| 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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |