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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.cc

Issue 10832282: Replace views::MouseEvent with ui::MouseEvent (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 4 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.h ('k') | chrome/browser/ui/views/tabs/tab_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_strip.cc
===================================================================
--- chrome/browser/ui/views/tabs/tab_strip.cc (revision 151406)
+++ chrome/browser/ui/views/tabs/tab_strip.cc (working copy)
@@ -294,7 +294,7 @@
virtual bool HasHitTestMask() const OVERRIDE;
virtual void GetHitTestMask(gfx::Path* path) const OVERRIDE;
#if defined(OS_WIN) && !defined(USE_AURA)
- void OnMouseReleased(const views::MouseEvent& event) OVERRIDE;
+ void OnMouseReleased(const ui::MouseEvent& event) OVERRIDE;
#endif
virtual ui::GestureStatus OnGestureEvent(
const views::GestureEvent& event) OVERRIDE;
@@ -353,7 +353,7 @@
}
#if defined(OS_WIN) && !defined(USE_AURA)
-void NewTabButton::OnMouseReleased(const views::MouseEvent& event) {
+void NewTabButton::OnMouseReleased(const ui::MouseEvent& event) {
if (event.IsOnlyRightMouseButton()) {
gfx::Point point(event.x(), event.y());
views::View::ConvertPointToScreen(this, &point);
@@ -556,8 +556,9 @@
gfx::Point position = gfx::Screen::GetCursorScreenPoint();
views::View* root_view = widget->GetRootView();
views::View::ConvertPointFromScreen(root_view, &position);
- views::MouseEvent mouse_event(
- ui::ET_MOUSE_MOVED, position.x(), position.y(), ui::EF_IS_SYNTHESIZED);
+ ui::MouseEvent mouse_event(ui::ET_MOUSE_MOVED,
+ position, position,
+ ui::EF_IS_SYNTHESIZED);
root_view->OnMouseMoved(mouse_event);
}
@@ -1023,9 +1024,9 @@
if (adjust_layout_ &&
((event.type() == ui::ET_MOUSE_PRESSED &&
(((event.flags() & ui::EF_FROM_TOUCH) &&
- static_cast<const views::MouseEvent&>(event).IsLeftMouseButton()) ||
+ static_cast<const ui::MouseEvent&>(event).IsLeftMouseButton()) ||
(!(event.flags() & ui::EF_FROM_TOUCH) &&
- static_cast<const views::MouseEvent&>(event).IsControlDown()))) ||
+ static_cast<const ui::MouseEvent&>(event).IsControlDown()))) ||
(event.type() == ui::ET_GESTURE_BEGIN && !event.IsControlDown()))) {
move_behavior = TabDragController::MOVE_VISIBILE_TABS;
}
@@ -1084,7 +1085,7 @@
}
void TabStrip::OnMouseEventInTab(views::View* source,
- const views::MouseEvent& event) {
+ const ui::MouseEvent& event) {
UpdateLayoutTypeFromMouseEvent(source, event);
}
@@ -1383,19 +1384,19 @@
return View::GetViewByID(view_id);
}
-bool TabStrip::OnMousePressed(const views::MouseEvent& event) {
+bool TabStrip::OnMousePressed(const ui::MouseEvent& event) {
UpdateLayoutTypeFromMouseEvent(this, event);
// We can't return true here, else clicking in an empty area won't drag the
// window.
return false;
}
-bool TabStrip::OnMouseDragged(const views::MouseEvent& event) {
+bool TabStrip::OnMouseDragged(const ui::MouseEvent& event) {
ContinueDrag(this, event.location());
return true;
}
-void TabStrip::OnMouseReleased(const views::MouseEvent& event) {
+void TabStrip::OnMouseReleased(const ui::MouseEvent& event) {
EndDrag(false);
UpdateLayoutTypeFromMouseEvent(this, event);
}
@@ -1404,7 +1405,7 @@
EndDrag(true);
}
-void TabStrip::OnMouseMoved(const views::MouseEvent& event) {
+void TabStrip::OnMouseMoved(const ui::MouseEvent& event) {
UpdateLayoutTypeFromMouseEvent(this, event);
}
@@ -1797,7 +1798,7 @@
}
void TabStrip::UpdateLayoutTypeFromMouseEvent(views::View* source,
- const views::MouseEvent& event) {
+ const ui::MouseEvent& event) {
if (!adjust_layout_ || ui::GetDisplayLayout() != ui::LAYOUT_TOUCH)
return;
« no previous file with comments | « chrome/browser/ui/views/tabs/tab_strip.h ('k') | chrome/browser/ui/views/tabs/tab_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698