Chromium Code Reviews| 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 DCHECK(event); |
|
Ben Goodger (Google)
2013/04/18 17:04:51
I think you shouldn't need this. We make the assum
sschmitz
2013/04/18 17:21:43
Done.
| |
| 407 !event->target()) | 406 if (event->type() != ui::ET_MOUSE_PRESSED || !event->target()) |
| 408 return; | 407 return; |
| 409 | 408 |
| 410 DCHECK(popup_parent_host_view_); | 409 DCHECK(popup_parent_host_view_); |
| 411 aura::Window* target = static_cast<aura::Window*>(event->target()); | 410 aura::Window* target = static_cast<aura::Window*>(event->target()); |
| 412 if (target != window_ && target != popup_parent_host_view_->window_) { | 411 if (target != window_ && target != popup_parent_host_view_->window_) { |
| 413 event_filter_for_popup_exit_.reset(); | |
| 414 in_shutdown_ = true; | 412 in_shutdown_ = true; |
| 415 host_->Shutdown(); | 413 host_->Shutdown(); |
| 416 } | 414 } |
| 417 } | 415 } |
| 418 | 416 |
| 419 // We have to implement the WindowObserver interface on a separate object | 417 // We have to implement the WindowObserver interface on a separate object |
| 420 // because clang doesn't like implementing multiple interfaces that have | 418 // because clang doesn't like implementing multiple interfaces that have |
| 421 // methods with the same name. This object is owned by the | 419 // methods with the same name. This object is owned by the |
| 422 // RenderWidgetHostViewAura. | 420 // RenderWidgetHostViewAura. |
| 423 class RenderWidgetHostViewAura::WindowObserver : public aura::WindowObserver { | 421 class RenderWidgetHostViewAura::WindowObserver : public aura::WindowObserver { |
| (...skipping 2418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2842 RenderWidgetHost* widget) { | 2840 RenderWidgetHost* widget) { |
| 2843 return new RenderWidgetHostViewAura(widget); | 2841 return new RenderWidgetHostViewAura(widget); |
| 2844 } | 2842 } |
| 2845 | 2843 |
| 2846 // static | 2844 // static |
| 2847 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { | 2845 void RenderWidgetHostViewPort::GetDefaultScreenInfo(WebScreenInfo* results) { |
| 2848 GetScreenInfoForWindow(results, NULL); | 2846 GetScreenInfoForWindow(results, NULL); |
| 2849 } | 2847 } |
| 2850 | 2848 |
| 2851 } // namespace content | 2849 } // namespace content |
| OLD | NEW |