| 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::GetCursorScreenPoint( |
| 570 gfx::Screen::BadTwoWorldsContext()); |
| 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 1980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2560 if (!adjust_layout_) | 2561 if (!adjust_layout_) |
| 2561 return false; | 2562 return false; |
| 2562 | 2563 |
| 2563 #if !defined(OS_CHROMEOS) | 2564 #if !defined(OS_CHROMEOS) |
| 2564 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) | 2565 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) |
| 2565 return false; | 2566 return false; |
| 2566 #endif | 2567 #endif |
| 2567 | 2568 |
| 2568 return true; | 2569 return true; |
| 2569 } | 2570 } |
| OLD | NEW |