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

Side by Side Diff: chrome/browser/ui/views/tabs/dragged_tab_controller.cc

Issue 8632001: Removed TOUCH_UI (mostly constants) from chrome/browser/ui/views. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge Created 9 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/views/tabs/dragged_tab_controller.h" 5 #include "chrome/browser/ui/views/tabs/dragged_tab_controller.h"
6 6
7 #include <math.h> 7 #include <math.h>
8 #include <set> 8 #include <set>
9 9
10 #include "base/callback.h" 10 #include "base/callback.h"
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after
498 return; 498 return;
499 } 499 }
500 } 500 }
501 // If we get here it means we got notification for a tab we don't know about. 501 // If we get here it means we got notification for a tab we don't know about.
502 NOTREACHED(); 502 NOTREACHED();
503 } 503 }
504 504
505 /////////////////////////////////////////////////////////////////////////////// 505 ///////////////////////////////////////////////////////////////////////////////
506 // DraggedTabController, MessageLoop::Observer implementation: 506 // DraggedTabController, MessageLoop::Observer implementation:
507 507
508 #if defined(OS_WIN) || defined(TOUCH_UI) || defined(USE_AURA) 508 #if defined(OS_WIN) || defined(USE_AURA)
509 base::EventStatus DraggedTabController::WillProcessEvent( 509 base::EventStatus DraggedTabController::WillProcessEvent(
510 const base::NativeEvent& event) { 510 const base::NativeEvent& event) {
511 return base::EVENT_CONTINUE; 511 return base::EVENT_CONTINUE;
512 } 512 }
513 513
514 void DraggedTabController::DidProcessEvent(const base::NativeEvent& event) { 514 void DraggedTabController::DidProcessEvent(const base::NativeEvent& event) {
515 // If the user presses ESC during a drag, we need to abort and revert things 515 // If the user presses ESC during a drag, we need to abort and revert things
516 // to the way they were. This is the most reliable way to do this since no 516 // to the way they were. This is the most reliable way to do this since no
517 // single view or window reliably receives events throughout all the various 517 // single view or window reliably receives events throughout all the various
518 // kinds of tab dragging. 518 // kinds of tab dragging.
(...skipping 883 matching lines...) Expand 10 before | Expand all | Expand 10 after
1402 1402
1403 bool DraggedTabController::AreTabsConsecutive() { 1403 bool DraggedTabController::AreTabsConsecutive() {
1404 for (size_t i = 1; i < drag_data_.size(); ++i) { 1404 for (size_t i = 1; i < drag_data_.size(); ++i) {
1405 if (drag_data_[i - 1].source_model_index + 1 != 1405 if (drag_data_[i - 1].source_model_index + 1 !=
1406 drag_data_[i].source_model_index) { 1406 drag_data_[i].source_model_index) {
1407 return false; 1407 return false;
1408 } 1408 }
1409 } 1409 }
1410 return true; 1410 return true;
1411 } 1411 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/dragged_tab_controller.h ('k') | chrome/browser/ui/views/tabs/tab.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698