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

Unified Diff: ash/desktop_background/desktop_background_view.cc

Issue 810033010: Remove TransparentActivateWindowButton from Overview Mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 11 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: ash/desktop_background/desktop_background_view.cc
diff --git a/ash/desktop_background/desktop_background_view.cc b/ash/desktop_background/desktop_background_view.cc
index 4ffc3e11f32c1f48151b0a8c77777f9cafa5af6c..1fa424bcf6f8ef0a4b4a94339a3f6532db36906d 100644
--- a/ash/desktop_background/desktop_background_view.cc
+++ b/ash/desktop_background/desktop_background_view.cc
@@ -15,7 +15,6 @@
#include "ash/session/session_state_delegate.h"
#include "ash/shell.h"
#include "ash/shell_window_ids.h"
-#include "ash/wm/overview/window_selector_controller.h"
#include "ash/wm/window_animations.h"
#include "base/message_loop/message_loop.h"
#include "base/strings/utf_string_conversions.h"
@@ -78,51 +77,14 @@ class LayerControlView : public views::View {
} // namespace
-// This event handler receives events in the pre-target phase and takes care of
-// the following:
-// - Disabling overview mode on touch release.
-// - Disabling overview mode on mouse release.
-class PreEventDispatchHandler : public ui::EventHandler {
- public:
- PreEventDispatchHandler() {}
- ~PreEventDispatchHandler() override {}
-
- private:
- // ui::EventHandler:
- void OnMouseEvent(ui::MouseEvent* event) override {
- CHECK_EQ(ui::EP_PRETARGET, event->phase());
- WindowSelectorController* controller =
- Shell::GetInstance()->window_selector_controller();
- if (event->type() == ui::ET_MOUSE_RELEASED && controller->IsSelecting()) {
- controller->ToggleOverview();
- event->StopPropagation();
- }
- }
-
- void OnGestureEvent(ui::GestureEvent* event) override {
- CHECK_EQ(ui::EP_PRETARGET, event->phase());
- WindowSelectorController* controller =
- Shell::GetInstance()->window_selector_controller();
- if (event->type() == ui::ET_GESTURE_TAP && controller->IsSelecting()) {
- controller->ToggleOverview();
- event->StopPropagation();
- }
- }
-
- DISALLOW_COPY_AND_ASSIGN(PreEventDispatchHandler);
-};
-
////////////////////////////////////////////////////////////////////////////////
// DesktopBackgroundView, public:
-DesktopBackgroundView::DesktopBackgroundView()
- : pre_dispatch_handler_(new PreEventDispatchHandler()) {
+DesktopBackgroundView::DesktopBackgroundView() {
set_context_menu_controller(this);
- AddPreTargetHandler(pre_dispatch_handler_.get());
}
DesktopBackgroundView::~DesktopBackgroundView() {
- RemovePreTargetHandler(pre_dispatch_handler_.get());
}
////////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698