| OLD | NEW |
| 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 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" | 5 #include "chrome/browser/ui/views/tabs/tab_drag_controller.h" |
| 6 | 6 |
| 7 #include <math.h> | 7 #include <math.h> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/auto_reset.h" | 10 #include "base/auto_reset.h" |
| 11 #include "base/callback.h" | 11 #include "base/callback.h" |
| 12 #include "base/i18n/rtl.h" | 12 #include "base/i18n/rtl.h" |
| 13 #include "base/macros.h" | 13 #include "base/macros.h" |
| 14 #include "base/memory/ptr_util.h" |
| 14 #include "build/build_config.h" | 15 #include "build/build_config.h" |
| 15 #include "chrome/browser/chrome_notification_types.h" | 16 #include "chrome/browser/chrome_notification_types.h" |
| 16 #include "chrome/browser/profiles/profile.h" | 17 #include "chrome/browser/profiles/profile.h" |
| 17 #include "chrome/browser/ui/browser_list.h" | 18 #include "chrome/browser/ui/browser_list.h" |
| 18 #include "chrome/browser/ui/browser_window.h" | 19 #include "chrome/browser/ui/browser_window.h" |
| 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 20 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 20 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" | 21 #include "chrome/browser/ui/tabs/tab_strip_model_delegate.h" |
| 21 #include "chrome/browser/ui/views/frame/browser_view.h" | 22 #include "chrome/browser/ui/views/frame/browser_view.h" |
| 22 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" | 23 #include "chrome/browser/ui/views/tabs/browser_tab_strip_controller.h" |
| 23 #include "chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h" | 24 #include "chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h" |
| (...skipping 1770 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1794 // TODO(pkotwicz): Fix this properly (crbug.com/358482) | 1795 // TODO(pkotwicz): Fix this properly (crbug.com/358482) |
| 1795 for (auto* browser : *BrowserList::GetInstance()) { | 1796 for (auto* browser : *BrowserList::GetInstance()) { |
| 1796 if (browser->tab_strip_model()->empty()) | 1797 if (browser->tab_strip_model()->empty()) |
| 1797 exclude.insert(browser->window()->GetNativeWindow()); | 1798 exclude.insert(browser->window()->GetNativeWindow()); |
| 1798 } | 1799 } |
| 1799 #endif | 1800 #endif |
| 1800 base::WeakPtr<TabDragController> ref(weak_factory_.GetWeakPtr()); | 1801 base::WeakPtr<TabDragController> ref(weak_factory_.GetWeakPtr()); |
| 1801 *window = window_finder_->GetLocalProcessWindowAtPoint(screen_point, exclude); | 1802 *window = window_finder_->GetLocalProcessWindowAtPoint(screen_point, exclude); |
| 1802 return ref ? Liveness::ALIVE : Liveness::DELETED; | 1803 return ref ? Liveness::ALIVE : Liveness::DELETED; |
| 1803 } | 1804 } |
| OLD | NEW |