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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 22254003: Nukes aura::WindowDestructionObserver. It's effectively the same as (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ui/aura/aura.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/renderer_host/render_widget_host_view_aura.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc
index dc239349e4d65a872c5b0bee4f1603740e051823..15baa0a54085bb5a235e9c295a9ff0ef315a3e34 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -54,7 +54,6 @@
#include "ui/aura/env.h"
#include "ui/aura/root_window.h"
#include "ui/aura/window.h"
-#include "ui/aura/window_destruction_observer.h"
#include "ui/aura/window_observer.h"
#include "ui/aura/window_tracker.h"
#include "ui/base/clipboard/scoped_clipboard_writer.h"
@@ -2476,12 +2475,13 @@ void RenderWidgetHostViewAura::OnKeyEvent(ui::KeyEvent* event) {
aura::Window* host = *(host_tracker_->windows().begin());
aura::client::FocusClient* client = aura::client::GetFocusClient(host);
if (client) {
- // Calling host->Focus() may delete |this|. We create a local
- // observer for that. In that case we exit without further
- // access to any members.
- aura::WindowDestructionObserver destruction_observer(window_);
+ // Calling host->Focus() may delete |this|. We create a local observer
+ // for that. In that case we exit without further access to any members.
+ aura::WindowTracker tracker;
+ aura::Window* window = window_;
+ tracker.Add(window);
host->Focus();
- if (destruction_observer.destroyed()) {
+ if (!tracker.Contains(window)) {
event->SetHandled();
return;
}
« no previous file with comments | « no previous file | ui/aura/aura.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698