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

Unified Diff: chrome/browser/ui/views/tabs/dragged_tab_controller.cc

Issue 8372001: aura: Make tab-dragging Escape code be cross-platform. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: whoops, let's try not breaking gtk Created 9 years, 2 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 | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/dragged_tab_controller.cc
diff --git a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
index 268244e872c20fe9819c4f8857a8cb87395246ac..d82aa9ed1fb46e87d591428b3546deaf0e393ed9 100644
--- a/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
+++ b/chrome/browser/ui/views/tabs/dragged_tab_controller.cc
@@ -31,6 +31,7 @@
#include "ui/base/animation/animation.h"
#include "ui/base/animation/animation_delegate.h"
#include "ui/base/animation/slide_animation.h"
+#include "ui/base/events.h"
#include "ui/base/resource/resource_bundle.h"
#include "ui/gfx/canvas_skia.h"
#include "ui/gfx/screen.h"
@@ -501,7 +502,7 @@ void DraggedTabController::Observe(
///////////////////////////////////////////////////////////////////////////////
// DraggedTabController, MessageLoop::Observer implementation:
-#if defined(OS_WIN)
+#if defined(OS_WIN) || defined(TOUCH_UI) || defined(USE_AURA)
base::EventStatus DraggedTabController::WillProcessEvent(
const base::NativeEvent& event) {
return base::EVENT_CONTINUE;
@@ -512,17 +513,10 @@ void DraggedTabController::DidProcessEvent(const base::NativeEvent& event) {
// to the way they were. This is the most reliable way to do this since no
// single view or window reliably receives events throughout all the various
// kinds of tab dragging.
- if (event.message == WM_KEYDOWN && event.wParam == VK_ESCAPE)
+ if (ui::EventTypeFromNative(event) == ui::ET_KEY_PRESSED &&
+ ui::KeyboardCodeFromNative(event) == ui::VKEY_ESCAPE) {
EndDrag(true);
-}
-#elif defined(TOUCH_UI) || defined(USE_AURA)
-base::EventStatus DraggedTabController::WillProcessEvent(
- const base::NativeEvent& event) {
- return base::EVENT_CONTINUE;
-}
-
-void DraggedTabController::DidProcessEvent(const base::NativeEvent& event) {
- NOTIMPLEMENTED();
+ }
}
#elif defined(TOOLKIT_USES_GTK)
void DraggedTabController::WillProcessEvent(GdkEvent* event) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698