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

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

Issue 155242: Add temporary TabStripWrapper interface that is implemented by both TabStrip ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 11 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « chrome/browser/views/tabs/browser_tab_strip.cc ('k') | chrome/browser/views/tabs/tab_strip.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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/views/tabs/dragged_tab_controller.h" 5 #include "chrome/browser/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 "app/animation.h" 10 #include "app/animation.h"
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
682 DockInfo::GetLocalProcessWindowAtPoint(screen_point, dock_windows_); 682 DockInfo::GetLocalProcessWindowAtPoint(screen_point, dock_windows_);
683 dock_windows_.erase(dragged_view); 683 dock_windows_.erase(dragged_view);
684 if (!local_window) 684 if (!local_window)
685 return NULL; 685 return NULL;
686 BrowserView* browser = 686 BrowserView* browser =
687 BrowserView::GetBrowserViewForNativeWindow(local_window); 687 BrowserView::GetBrowserViewForNativeWindow(local_window);
688 // We don't allow drops on windows that don't have tabstrips. 688 // We don't allow drops on windows that don't have tabstrips.
689 if (!browser || !browser->IsBrowserTypeNormal()) 689 if (!browser || !browser->IsBrowserTypeNormal())
690 return NULL; 690 return NULL;
691 691
692 TabStrip* other_tabstrip = browser->tabstrip(); 692 TabStripWrapper* other_tabstrip = browser->tabstrip();
693 if (!other_tabstrip->IsCompatibleWith(source_tabstrip_)) 693 if (!other_tabstrip->IsCompatibleWith(source_tabstrip_))
694 return NULL; 694 return NULL;
695 return GetTabStripIfItContains(other_tabstrip, screen_point); 695 return GetTabStripIfItContains(other_tabstrip->AsTabStrip(), screen_point);
696 } 696 }
697 697
698 TabStrip* DraggedTabController::GetTabStripIfItContains( 698 TabStrip* DraggedTabController::GetTabStripIfItContains(
699 TabStrip* tabstrip, const gfx::Point& screen_point) const { 699 TabStrip* tabstrip, const gfx::Point& screen_point) const {
700 static const int kVerticalDetachMagnetism = 15; 700 static const int kVerticalDetachMagnetism = 15;
701 // Make sure the specified screen point is actually within the bounds of the 701 // Make sure the specified screen point is actually within the bounds of the
702 // specified tabstrip... 702 // specified tabstrip...
703 gfx::Rect tabstrip_bounds = GetViewScreenBounds(tabstrip); 703 gfx::Rect tabstrip_bounds = GetViewScreenBounds(tabstrip);
704 if (screen_point.x() < tabstrip_bounds.right() && 704 if (screen_point.x() < tabstrip_bounds.right() &&
705 screen_point.x() >= tabstrip_bounds.x()) { 705 screen_point.x() >= tabstrip_bounds.x()) {
(...skipping 521 matching lines...) Expand 10 before | Expand all | Expand 10 after
1227 1227
1228 // The previous call made the window appear on top of the dragged window, 1228 // The previous call made the window appear on top of the dragged window,
1229 // move the dragged window to the front. 1229 // move the dragged window to the front.
1230 SetWindowPos(view_->GetWidget()->GetNativeView(), HWND_TOP, 0, 0, 0, 0, 1230 SetWindowPos(view_->GetWidget()->GetNativeView(), HWND_TOP, 0, 0, 0, 0,
1231 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); 1231 SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
1232 #else 1232 #else
1233 NOTIMPLEMENTED(); 1233 NOTIMPLEMENTED();
1234 #endif 1234 #endif
1235 } 1235 }
1236 } 1236 }
OLDNEW
« no previous file with comments | « chrome/browser/views/tabs/browser_tab_strip.cc ('k') | chrome/browser/views/tabs/tab_strip.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698