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

Side by Side Diff: chrome/browser/ui/views/tabs/tab_drag_controller.h

Issue 1003863005: Fix tab drag and drop with hi-dpi. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix tab drag and drop with hi-dpi. Created 5 years, 9 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ 5 #ifndef CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_
6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ 6 #define CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_
7 7
8 #include <vector> 8 #include <vector>
9 9
10 #include "base/memory/weak_ptr.h" 10 #include "base/memory/weak_ptr.h"
(...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after
437 // |point_in_screen|. 437 // |point_in_screen|.
438 gfx::Vector2d GetWindowOffset(const gfx::Point& point_in_screen); 438 gfx::Vector2d GetWindowOffset(const gfx::Point& point_in_screen);
439 439
440 // Returns true if moving the mouse only changes the visible tabs. 440 // Returns true if moving the mouse only changes the visible tabs.
441 bool move_only() const { 441 bool move_only() const {
442 return (move_behavior_ == MOVE_VISIBILE_TABS) != 0; 442 return (move_behavior_ == MOVE_VISIBILE_TABS) != 0;
443 } 443 }
444 444
445 // Returns the NativeWindow at the specified point. If |exclude_dragged_view| 445 // Returns the NativeWindow at the specified point. If |exclude_dragged_view|
446 // is true, then the dragged view is not considered. 446 // is true, then the dragged view is not considered.
447 gfx::NativeWindow GetLocalProcessWindow(const gfx::Point& screen_point, 447 gfx::NativeWindow GetLocalProcessWindow(gfx::Point screen_point,
sadrul 2015/03/20 17:40:24 Why this change?
stapelberg 2015/03/20 21:48:06 It saved a conditional branch by overwriting the s
448 bool exclude_dragged_view); 448 bool exclude_dragged_view);
449 449
450 // Handles registering for notifications. 450 // Handles registering for notifications.
451 content::NotificationRegistrar registrar_; 451 content::NotificationRegistrar registrar_;
452 452
453 EventSource event_source_; 453 EventSource event_source_;
454 454
455 // The TabStrip the drag originated from. 455 // The TabStrip the drag originated from.
456 TabStrip* source_tabstrip_; 456 TabStrip* source_tabstrip_;
457 457
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
599 int attach_index_; 599 int attach_index_;
600 600
601 scoped_ptr<ui::EventHandler> escape_tracker_; 601 scoped_ptr<ui::EventHandler> escape_tracker_;
602 602
603 base::WeakPtrFactory<TabDragController> weak_factory_; 603 base::WeakPtrFactory<TabDragController> weak_factory_;
604 604
605 DISALLOW_COPY_AND_ASSIGN(TabDragController); 605 DISALLOW_COPY_AND_ASSIGN(TabDragController);
606 }; 606 };
607 607
608 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_ 608 #endif // CHROME_BROWSER_UI_VIEWS_TABS_TAB_DRAG_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698