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_strip.cc

Issue 11030017: Add context to gfx::Screen calls in support of simultaneous desktop+ash (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix other os's Created 8 years, 2 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
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 #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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698