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

Unified Diff: ui/wm/core/focus_controller.cc

Issue 1153633006: Added UMA statistics for changing the active window via click or touch events. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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/wm/core/focus_controller.cc
diff --git a/ui/wm/core/focus_controller.cc b/ui/wm/core/focus_controller.cc
index 446e82c269fc4e852491886d1207ecfeaddc93cf..d76689ae7ccca2c37a6f879bb404b04a6a98e49b 100644
--- a/ui/wm/core/focus_controller.cc
+++ b/ui/wm/core/focus_controller.cc
@@ -11,7 +11,6 @@
#include "ui/aura/env.h"
#include "ui/aura/window_tracker.h"
#include "ui/base/ime/text_input_focus_manager.h"
-#include "ui/events/event.h"
#include "ui/wm/core/focus_rules.h"
#include "ui/wm/core/window_util.h"
#include "ui/wm/public/activation_change_observer.h"
@@ -151,30 +150,6 @@ aura::Window* FocusController::GetFocusedWindow() {
}
////////////////////////////////////////////////////////////////////////////////
-// FocusController, ui::EventHandler implementation:
-void FocusController::OnKeyEvent(ui::KeyEvent* event) {
-}
-
-void FocusController::OnMouseEvent(ui::MouseEvent* event) {
- if (event->type() == ui::ET_MOUSE_PRESSED && !event->handled())
- WindowFocusedFromInputEvent(static_cast<aura::Window*>(event->target()));
-}
-
-void FocusController::OnScrollEvent(ui::ScrollEvent* event) {
-}
-
-void FocusController::OnTouchEvent(ui::TouchEvent* event) {
-}
-
-void FocusController::OnGestureEvent(ui::GestureEvent* event) {
- if (event->type() == ui::ET_GESTURE_BEGIN &&
- event->details().touch_points() == 1 &&
- !event->handled()) {
- WindowFocusedFromInputEvent(static_cast<aura::Window*>(event->target()));
- }
-}
-
-////////////////////////////////////////////////////////////////////////////////
// FocusController, aura::WindowObserver implementation:
void FocusController::OnWindowVisibilityChanged(aura::Window* window,
@@ -344,12 +319,4 @@ void FocusController::WindowLostFocusFromDispositionChange(
}
}
-void FocusController::WindowFocusedFromInputEvent(aura::Window* window) {
- // Only focus |window| if it or any of its parents can be focused. Otherwise
- // FocusWindow() will focus the topmost window, which may not be the
- // currently focused one.
- if (rules_->CanFocusWindow(GetToplevelWindow(window)))
- FocusWindow(window);
-}
-
} // namespace wm

Powered by Google App Engine
This is Rietveld 408576698