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

Side by Side Diff: content/public/test/browser_test_utils.h

Issue 2815823003: Notify OverscrollController of gesture events in plugins. (Closed)
Patch Set: Address comments. Created 3 years, 6 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
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 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 5 #ifndef CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 6 #define CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
7 7
8 #include <queue> 8 #include <queue>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 832 matching lines...) Expand 10 before | Expand all | Expand 10 after
843 bool user_gesture, 843 bool user_gesture,
844 bool last_unlocked_by_target, 844 bool last_unlocked_by_target,
845 bool privileged); 845 bool privileged);
846 846
847 private: 847 private:
848 PwnMessageHelper(); // Not instantiable. 848 PwnMessageHelper(); // Not instantiable.
849 849
850 DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper); 850 DISALLOW_COPY_AND_ASSIGN(PwnMessageHelper);
851 }; 851 };
852 852
853 #if defined(USE_AURA)
854 // Mock of an OverscrollController so we can inspect the scroll events that it
855 // receives. Note that this is only a partial mock as the methods of a real
856 // OverscrollController are being invoked.
857 // TODO(mcnee): Tests needing this are BrowserPlugin specific. Remove after
858 // removing BrowserPlugin (crbug.com/533069).
859 class MockOverscrollController {
860 public:
861 // Creates a mock and installs it on the given RenderWidgetHostViewAura.
862 // The returned mock is owned by the RWHVA.
863 static MockOverscrollController* Create(RenderWidgetHostView* rwhv);
864
865 virtual ~MockOverscrollController() {}
866
867 // Waits until the mock receives a consumed GestureScrollUpdate.
868 virtual void WaitForConsumedScroll() = 0;
869 };
870 #endif // defined(USE_AURA)
871
853 } // namespace content 872 } // namespace content
854 873
855 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_ 874 #endif // CONTENT_PUBLIC_TEST_BROWSER_TEST_UTILS_H_
OLDNEW
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_base.cc ('k') | content/public/test/browser_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698