1 // Copyright 2014 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "chrome/browser/ui/views/autofill/password_generation_popup_view_tester_views.h" 6 7 #include "chrome/browser/ui/views/autofill/password_generation_popup_view_views.h" 8 9 namespace autofill { 10 11 scoped_ptr<PasswordGenerationPopupViewTester> 12 PasswordGenerationPopupViewTester::For(PasswordGenerationPopupView* view) { 13 return scoped_ptr<PasswordGenerationPopupViewTester>( 14 new PasswordGenerationPopupViewTesterViews( 15 static_cast<PasswordGenerationPopupViewViews*>(view))); 16 } 17 18 PasswordGenerationPopupViewTesterViews::PasswordGenerationPopupViewTesterViews( 19 PasswordGenerationPopupViewViews* popup_view) 20 : view_(popup_view) {} 21 22 PasswordGenerationPopupViewTesterViews:: 23 ~PasswordGenerationPopupViewTesterViews() {} 24 25 void PasswordGenerationPopupViewTesterViews::SimulateMouseMovementAt( 26 const gfx::Point& point) { 27 ui::MouseEvent mouse_down(ui::ET_MOUSE_MOVED, 28 point, 29 gfx::Point(0, 0), 30 0, 0); 31 static_cast<views::View*>(view_)->OnMouseMoved(mouse_down); 32 } 33 34 } // namespace autofill 35