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

Unified Diff: ui/views/widget/desktop_native_widget_helper_aura.cc

Issue 10332145: aura/ash split: Moves RootWindowEventFilter and InputMethodEventFilter to ui/aura/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Moved to ui/aura/shared/ Created 8 years, 7 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
Index: ui/views/widget/desktop_native_widget_helper_aura.cc
diff --git a/ui/views/widget/desktop_native_widget_helper_aura.cc b/ui/views/widget/desktop_native_widget_helper_aura.cc
index 38588367e0c47e6837be3122897cf9216ad787aa..0e4870eab0617188b5d8565296b8b9beab8702fd 100644
--- a/ui/views/widget/desktop_native_widget_helper_aura.cc
+++ b/ui/views/widget/desktop_native_widget_helper_aura.cc
@@ -7,8 +7,9 @@
#include "ui/aura/root_window.h"
#include "ui/aura/desktop/desktop_activation_client.h"
#include "ui/aura/desktop/desktop_dispatcher_client.h"
-#include "ui/aura/desktop/desktop_root_window_event_filter.h"
#include "ui/aura/client/dispatcher_client.h"
+#include "ui/aura/shared/input_method_event_filter.h"
+#include "ui/aura/shared/root_window_event_filter.h"
#include "ui/views/widget/native_widget_aura.h"
#if defined(OS_WIN)
@@ -21,10 +22,15 @@ namespace views {
DesktopNativeWidgetHelperAura::DesktopNativeWidgetHelperAura(
NativeWidgetAura* widget)
: widget_(widget),
+ root_window_event_filter_(NULL),
is_embedded_window_(false) {
}
-DesktopNativeWidgetHelperAura::~DesktopNativeWidgetHelperAura() {}
+DesktopNativeWidgetHelperAura::~DesktopNativeWidgetHelperAura() {
+ if (root_window_event_filter_) {
Ben Goodger (Google) 2012/05/15 17:35:13 nit no braces
+ root_window_event_filter_->RemoveFilter(input_method_filter_.get());
+ }
+}
void DesktopNativeWidgetHelperAura::PreInitialize(
const Widget::InitParams& params) {
@@ -49,8 +55,15 @@ void DesktopNativeWidgetHelperAura::PreInitialize(
}
root_window_.reset(new aura::RootWindow(bounds));
root_window_->Init();
- root_window_->SetEventFilter(
- new aura::DesktopRootWindowEventFilter(root_window_.get()));
+
+ root_window_event_filter_ =
+ new aura::shared::RootWindowEventFilter(root_window_.get());
+ root_window_->SetEventFilter(root_window_event_filter_);
+
+ input_method_filter_.reset(
+ new aura::shared::InputMethodEventFilter(root_window_.get()));
+ root_window_event_filter_->AddFilter(input_method_filter_.get());
+
root_window_->AddRootWindowObserver(this);
aura::client::SetActivationClient(

Powered by Google App Engine
This is Rietveld 408576698