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

Unified Diff: ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc

Issue 23874013: Remove old activation code and disable-focus-controller flags (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 3 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_aura/desktop_root_window_host_x11.cc
diff --git a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
index 4853741f29ecebad82fef777845998a49cf3e3bd..e39838391b486df17c3debd9c08ee2bb68f365a4 100644
--- a/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
+++ b/ui/views/widget/desktop_aura/desktop_root_window_host_x11.cc
@@ -32,7 +32,6 @@
#include "ui/views/corewm/cursor_manager.h"
#include "ui/views/corewm/focus_controller.h"
#include "ui/views/ime/input_method.h"
-#include "ui/views/widget/desktop_aura/desktop_activation_client.h"
#include "ui/views/widget/desktop_aura/desktop_cursor_loader_updater_aurax11.h"
#include "ui/views/widget/desktop_aura/desktop_dispatcher_client.h"
#include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h"
@@ -128,10 +127,8 @@ DesktopRootWindowHostX11::DesktopRootWindowHostX11(
DesktopRootWindowHostX11::~DesktopRootWindowHostX11() {
root_window_->ClearProperty(kHostForRootWindow);
- if (corewm::UseFocusControllerOnDesktop()) {
- aura::client::SetFocusClient(root_window_, NULL);
- aura::client::SetActivationClient(root_window_, NULL);
- }
+ aura::client::SetFocusClient(root_window_, NULL);
+ aura::client::SetActivationClient(root_window_, NULL);
}
// static
@@ -896,18 +893,12 @@ aura::RootWindow* DesktopRootWindowHostX11::InitRootWindow(
// messages to us.
X11DesktopHandler::get();
- if (corewm::UseFocusControllerOnDesktop()) {
- corewm::FocusController* focus_controller =
- new corewm::FocusController(new DesktopFocusRules);
- focus_client_.reset(focus_controller);
- aura::client::SetFocusClient(root_window_, focus_controller);
- aura::client::SetActivationClient(root_window_, focus_controller);
- root_window_->AddPreTargetHandler(focus_controller);
- } else {
- focus_client_.reset(new aura::FocusManager);
- aura::client::SetFocusClient(root_window_, focus_client_.get());
- activation_client_.reset(new DesktopActivationClient(root_window_));
- }
+ corewm::FocusController* focus_controller =
+ new corewm::FocusController(new DesktopFocusRules);
+ focus_client_.reset(focus_controller);
+ aura::client::SetFocusClient(root_window_, focus_controller);
+ aura::client::SetActivationClient(root_window_, focus_controller);
+ root_window_->AddPreTargetHandler(focus_controller);
dispatcher_client_.reset(new DesktopDispatcherClient);
aura::client::SetDispatcherClient(root_window_,
@@ -936,8 +927,7 @@ aura::RootWindow* DesktopRootWindowHostX11::InitRootWindow(
aura::client::SetDragDropClient(root_window_, drag_drop_client_.get());
// TODO(erg): Unify this code once the other consumer goes away.
- x11_window_event_filter_.reset(
- new X11WindowEventFilter(root_window_, activation_client_.get()));
+ x11_window_event_filter_.reset(new X11WindowEventFilter(root_window_));
x11_window_event_filter_->SetUseHostWindowBorders(false);
desktop_native_widget_aura_->root_window_event_filter()->AddHandler(
x11_window_event_filter_.get());

Powered by Google App Engine
This is Rietveld 408576698