| 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_strip.h" | 5 #include "chrome/browser/ui/views/tabs/tab_strip.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <windowsx.h> | 8 #include <windowsx.h> |
| 9 #endif | 9 #endif |
| 10 | 10 |
| (...skipping 548 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 559 // spawned by non-mouse closes and drag-detaches. | 559 // spawned by non-mouse closes and drag-detaches. |
| 560 return; | 560 return; |
| 561 } | 561 } |
| 562 | 562 |
| 563 views::Widget* widget = tabstrip_->GetWidget(); | 563 views::Widget* widget = tabstrip_->GetWidget(); |
| 564 // This can be null during shutdown. See http://crbug.com/42737. | 564 // This can be null during shutdown. See http://crbug.com/42737. |
| 565 if (!widget) | 565 if (!widget) |
| 566 return; | 566 return; |
| 567 | 567 |
| 568 widget->ResetLastMouseMoveFlag(); | 568 widget->ResetLastMouseMoveFlag(); |
| 569 gfx::Point position = gfx::Screen::GetCursorScreenPoint(); | 569 gfx::Point position = gfx::Screen::GetScreenFor( |
| 570 widget->GetNativeView())->GetCursorScreenPoint(); |
| 570 views::View* root_view = widget->GetRootView(); | 571 views::View* root_view = widget->GetRootView(); |
| 571 views::View::ConvertPointFromScreen(root_view, &position); | 572 views::View::ConvertPointFromScreen(root_view, &position); |
| 572 ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, | 573 ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED, |
| 573 position, position, | 574 position, position, |
| 574 ui::EF_IS_SYNTHESIZED); | 575 ui::EF_IS_SYNTHESIZED); |
| 575 root_view->OnMouseMoved(mouse_event); | 576 root_view->OnMouseMoved(mouse_event); |
| 576 } | 577 } |
| 577 | 578 |
| 578 /////////////////////////////////////////////////////////////////////////////// | 579 /////////////////////////////////////////////////////////////////////////////// |
| 579 // TabStrip, public: | 580 // TabStrip, public: |
| (...skipping 1990 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2570 if (!adjust_layout_) | 2571 if (!adjust_layout_) |
| 2571 return false; | 2572 return false; |
| 2572 | 2573 |
| 2573 #if !defined(OS_CHROMEOS) | 2574 #if !defined(OS_CHROMEOS) |
| 2574 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) | 2575 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) |
| 2575 return false; | 2576 return false; |
| 2576 #endif | 2577 #endif |
| 2577 | 2578 |
| 2578 return true; | 2579 return true; |
| 2579 } | 2580 } |
| OLD | NEW |