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

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 some new gfx::Screen additions 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::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 1982 matching lines...) Expand 10 before | Expand all | Expand 10 after
2562 if (!adjust_layout_) 2563 if (!adjust_layout_)
2563 return false; 2564 return false;
2564 2565
2565 #if !defined(OS_CHROMEOS) 2566 #if !defined(OS_CHROMEOS)
2566 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH) 2567 if (ui::GetDisplayLayout() != ui::LAYOUT_TOUCH)
2567 return false; 2568 return false;
2568 #endif 2569 #endif
2569 2570
2570 return true; 2571 return true;
2571 } 2572 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698